From f228e2ad2aaac15ae522565661698decc84ccbca Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Tue, 13 May 2014 21:40:58 +0200 Subject: added Xresources and tweeked herbstluft configs --- .Xresources | 41 +++++++++++++++++++++++++++++++++++++++++ .config/herbstluftwm/autostart | 8 +++++--- .config/herbstluftwm/panel.sh | 18 ++++++++---------- Makefile | 9 ++++++++- 4 files changed, 62 insertions(+), 14 deletions(-) create mode 100644 .Xresources diff --git a/.Xresources b/.Xresources new file mode 100644 index 0000000..3bbf083 --- /dev/null +++ b/.Xresources @@ -0,0 +1,41 @@ +! Font and Fontsize +*faceName: Droid Sans Mono +*faceSize: 11 + +! Colors +*background: #2d2d2d +*foreground: #f9f9f9 + +! Darks +*color0: #2d2d2d +*color8: #333333 + +! Reds +*color1: #690a03 +*color9: #d64937 + +! Greens +*color2: #13a43b +*color10: #6dfb2d + +! Yellows +*color3: #f5a711 +*color11: #ffdc00 + +! Blues +*color4: #0f6cc9 +*color12: #32abd8 + +! Magentas +*color5: #93116b +*color13: #c61f93 + +! Cyanes +*color6: #3cb691 +*color14: #53b4bd + +!Whites +*color7: #d9d9d9 +*color15: #f9f9f9 + +XTerm*selectToClipboard: true diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart index 51dcd9d..e9cf3ee 100755 --- a/.config/herbstluftwm/autostart +++ b/.config/herbstluftwm/autostart @@ -32,7 +32,7 @@ Mod=Mod4 # Use the super key as the main modifier hc keybind $Mod-Shift-q quit hc keybind $Mod-Shift-r reload hc keybind $Mod-Shift-c close -hc keybind $Mod-Return spawn xfce4-terminal +hc keybind $Mod-Return spawn xterm hc keybind $Mod-grave spawn dmenu_run -h $PANEL_HEIGHT -p "Run:" -nb $DARK -nf $LIGHT -sb $ACCENT -sf $DARK # basic movement @@ -172,8 +172,7 @@ herbstclient set tree_style '╾│ ├└╼─┐' #Start panel in all monitors start_panel() { for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do - "$1" $monitor $PANEL_HEIGHT $LIGHT $LLIGHT $ACCENT $LDARK $DARK - $2& + "$1" $monitor $PANEL_HEIGHT $LIGHT $LLIGHT $ACCENT $LDARK $DARK $2& done } @@ -200,3 +199,6 @@ then else start_compton fi + +#Load .Xresources +xrdb -load ~/.Xresources diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh index ec3b546..3448e62 100755 --- a/.config/herbstluftwm/panel.sh +++ b/.config/herbstluftwm/panel.sh @@ -77,16 +77,14 @@ hc pad $monitor $panel_height while true ; do # Network - IFS=' ' read -a wlaninfo <<< $(iwconfig wlp3s0) - for item in ${wlaninfo[@]} ; do - case $item in - ESSID*) - ssid=$(echo $item | cut -d '"' -f2) ;; - Quality*) - quality=$(echo $item | cut -d '=' -f2) ;; - esac - done - quality_p=$(echo "$(echo $quality | cut -d '/' -f1) * 100 / $(echo $quality | cut -d '/' -f2)" | bc) + iwconfig=$(iwconfig wlp3s0) + ssid_regex=".*ESSID:\"\(.*\)\".*" + quality_regex=".*Link Quality=\([0-9]*\)\/\([0-9]*\).*" + ssid=$(echo $iwconfig | sed "s/$ssid_regex/\1/") + IFS=',' read -a quality_info <<< $(echo $iwconfig | sed "s/$quality_regex/\1,\2/") + cur_qual=${quality_info[0]} + max_qual=${quality_info[1]} + quality_p=$(echo "$cur_qual*100/$max_qual" | bc) echo -e "wireless\t^fg($normal_txt)Wlan: $quality_p% ^fg($inactive_txt)($ssid)" # Battery diff --git a/Makefile b/Makefile index e233395..0e0dd70 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,12 @@ NUMIX = .local/share/themes/numix-no-title BASHRC = .bashrc VIMRC = .vimrc HERBSTLUFT = .config/herbstluftwm +XRESOURCES = .Xresources + install: all -all: bash vim numix-no-title herbstluftwm +all: bash vim xresources numix-no-title herbstluftwm numix-no-title: #create wm theme dir if not exist @@ -35,9 +37,14 @@ vim: #copy vimrc to home cp -f $(VIMRC) ~ +xresources: + #copy Xresources to home + cp -f $(XRESOURCES) ~ + uninstall: #remove all -rm -rf ~/$(WM-THEME-DIR) -rm -rf ~/$(HERBSTLUFT) -rm -f ~/$(BASHRC) -rm -f ~/$(VIMRC) + -rm -f ~/$(XRESOURCES) -- cgit v1.2.3