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 --- .config/herbstluftwm/autostart | 8 +++++--- .config/herbstluftwm/panel.sh | 18 ++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to '.config/herbstluftwm') 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 -- cgit v1.2.3