From ebef0b0c20a825a8d60a6da4b68d99f785612a71 Mon Sep 17 00:00:00 2001 From: xero Date: Sun, 1 Nov 2015 19:06:07 -0500 Subject: update herb utils to use ~/bin --- herbstluftwm/.config/herbstluftwm/autostart | 6 +++--- herbstluftwm/.config/herbstluftwm/conkypanel | 24 ------------------------ herbstluftwm/.config/herbstluftwm/panel.sh | 2 +- herbstluftwm/bin/calendar | 15 +++++++++++++++ herbstluftwm/bin/herbstluftwm-add-gap | 12 ++++++++++++ herbstluftwm/bin/herbstluftwm-remove-gap | 12 ++++++++++++ herbstluftwm/code/sys/calendar | 15 --------------- herbstluftwm/code/sys/herbstluftwm-add-gap | 12 ------------ herbstluftwm/code/sys/herbstluftwm-remove-gap | 12 ------------ 9 files changed, 43 insertions(+), 67 deletions(-) delete mode 100755 herbstluftwm/.config/herbstluftwm/conkypanel create mode 100755 herbstluftwm/bin/calendar create mode 100755 herbstluftwm/bin/herbstluftwm-add-gap create mode 100755 herbstluftwm/bin/herbstluftwm-remove-gap delete mode 100755 herbstluftwm/code/sys/calendar delete mode 100755 herbstluftwm/code/sys/herbstluftwm-add-gap delete mode 100755 herbstluftwm/code/sys/herbstluftwm-remove-gap diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart index f122503..c445ebf 100755 --- a/herbstluftwm/.config/herbstluftwm/autostart +++ b/herbstluftwm/.config/herbstluftwm/autostart @@ -33,11 +33,11 @@ hc keybind $Mod-w spawn interrobang hc keybind $Mod-r spawn interrobang # toggle touchpad -hc keybind $Mod-m spawn bash /home/xero/code/sys/toggle-touchpad +hc keybind $Mod-m spawn bash $HOME/bin/toggle-touchpad # dynamic window gap -hc keybind $Mod-9 spawn bash /home/xero/code/sys/herbstluftwm-remove-gap -hc keybind $Mod-0 spawn bash /home/xero/code/sys/herbstluftwm-add-gap +hc keybind $Mod-9 spawn bash $HOME/bin/herbstluftwm-remove-gap +hc keybind $Mod-0 spawn bash $HOME/bin/herbstluftwm-add-gap # generic actions hc keybind $Mod-Shift-q quit diff --git a/herbstluftwm/.config/herbstluftwm/conkypanel b/herbstluftwm/.config/herbstluftwm/conkypanel deleted file mode 100755 index 2893da7..0000000 --- a/herbstluftwm/.config/herbstluftwm/conkypanel +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;} -monitor=${1:-0} -geometry=( $(herbstclient monitor_rect "$monitor") ) -if [ -z "$geometry" ] ;then - echo "Invalid monitor $monitor" - exit 1 -fi -# geometry has the format W H X Y -x=${geometry[0]} -y=${geometry[1]} -panel_width=${geometry[2]} -panel_height=16 -#font="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*" -font="-Gohu-GohuFont-Medium-R-Normal--11-80-100-100-C-60-ISO10646-1" -bgcolor=$(hc get frame_border_normal_color) -fgcolor='#efefef' - -conky | dzen2 -w $panel_width -x $x -y $y -fn "$font" -h $panel_height \ - -e 'button3=;button4=exec:herbstclient use_index -1;button5=exec:herbstclient use_index +1' \ - -ta l -bg "$bgcolor" -fg "$fgcolor" & - -sleep 2 -stalonetray diff --git a/herbstluftwm/.config/herbstluftwm/panel.sh b/herbstluftwm/.config/herbstluftwm/panel.sh index 34b7bb9..26c6055 100755 --- a/herbstluftwm/.config/herbstluftwm/panel.sh +++ b/herbstluftwm/.config/herbstluftwm/panel.sh @@ -75,7 +75,7 @@ hc pad $monitor $panel_height do # "date" output is checked once a second, but an event is only # generated if the output changed compared to the previous run. - date +$'date\t ^ca(1,~/code/sys/calendar)^fg(#d9d9d9)^i(/usr/share/icons/stlarch_icons/clock1.xbm) ^fg(#efefef)%H:%M^fg(#bcbcbc) %Y-%m-^fg(#efefef)%d^ca()' + date +$'date\t ^ca(1,~/bin/calendar)^fg(#d9d9d9)^i(/usr/share/icons/stlarch_icons/clock1.xbm) ^fg(#efefef)%H:%M^fg(#bcbcbc) %Y-%m-^fg(#efefef)%d^ca()' sleep 1 || break done > >(uniq_linebuffered) & childpid=$! diff --git a/herbstluftwm/bin/calendar b/herbstluftwm/bin/calendar new file mode 100755 index 0000000..28199ae --- /dev/null +++ b/herbstluftwm/bin/calendar @@ -0,0 +1,15 @@ +#!/bin/bash +# popup calendar for dzen +font="-Gohu-GohuFont-Medium-R-Normal--11-80-100-100-C-60-ISO10646-1" +TODAY=$(expr `date +'%d'` + 0) +MONTH=`date +'%m'` +YEAR=`date +'%Y'` +LINES=$(cal -m | wc -l) +LINES=$((LINES + 2)) + +( +date +'^bg(#111111) ' +date +'' +# current month, highlight header and today +cal -m | sed -r -e "1,2 s/.*/^fg(#d3d3d3)&^fg()/" -e "s/(^| )($TODAY)($| )/\1^bg(#6A8C8C)^fg(#111111)\2^fg()^bg()\3/") | dzen2 -x 0 -y 16 -w 146 -h 12 -l $LINES -sa c -p -e 'onstart=uncollapse,hide;button1=exit;' -fg "#d3d3d3" -tw 6 -fn "$font" +) diff --git a/herbstluftwm/bin/herbstluftwm-add-gap b/herbstluftwm/bin/herbstluftwm-add-gap new file mode 100755 index 0000000..cc5492c --- /dev/null +++ b/herbstluftwm/bin/herbstluftwm-add-gap @@ -0,0 +1,12 @@ +#!/bin/sh +filename="/tmp/herbstluftwm-gap" +while read -r line +do + gap=$line + if [ "$gap" -le 90 ] + then + gap=$((gap+7)) + herbstclient set window_gap $gap + echo $gap > $filename + fi +done < "$filename" diff --git a/herbstluftwm/bin/herbstluftwm-remove-gap b/herbstluftwm/bin/herbstluftwm-remove-gap new file mode 100755 index 0000000..b30b3eb --- /dev/null +++ b/herbstluftwm/bin/herbstluftwm-remove-gap @@ -0,0 +1,12 @@ +#!/bin/sh +filename="/tmp/herbstluftwm-gap" +while read -r line +do + gap=$line + if [ "$gap" -ge 7 ] + then + gap=$((gap-7)) + herbstclient set window_gap $gap + echo $gap > $filename + fi +done < "$filename" diff --git a/herbstluftwm/code/sys/calendar b/herbstluftwm/code/sys/calendar deleted file mode 100755 index 28199ae..0000000 --- a/herbstluftwm/code/sys/calendar +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# popup calendar for dzen -font="-Gohu-GohuFont-Medium-R-Normal--11-80-100-100-C-60-ISO10646-1" -TODAY=$(expr `date +'%d'` + 0) -MONTH=`date +'%m'` -YEAR=`date +'%Y'` -LINES=$(cal -m | wc -l) -LINES=$((LINES + 2)) - -( -date +'^bg(#111111) ' -date +'' -# current month, highlight header and today -cal -m | sed -r -e "1,2 s/.*/^fg(#d3d3d3)&^fg()/" -e "s/(^| )($TODAY)($| )/\1^bg(#6A8C8C)^fg(#111111)\2^fg()^bg()\3/") | dzen2 -x 0 -y 16 -w 146 -h 12 -l $LINES -sa c -p -e 'onstart=uncollapse,hide;button1=exit;' -fg "#d3d3d3" -tw 6 -fn "$font" -) diff --git a/herbstluftwm/code/sys/herbstluftwm-add-gap b/herbstluftwm/code/sys/herbstluftwm-add-gap deleted file mode 100755 index cc5492c..0000000 --- a/herbstluftwm/code/sys/herbstluftwm-add-gap +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -filename="/tmp/herbstluftwm-gap" -while read -r line -do - gap=$line - if [ "$gap" -le 90 ] - then - gap=$((gap+7)) - herbstclient set window_gap $gap - echo $gap > $filename - fi -done < "$filename" diff --git a/herbstluftwm/code/sys/herbstluftwm-remove-gap b/herbstluftwm/code/sys/herbstluftwm-remove-gap deleted file mode 100755 index b30b3eb..0000000 --- a/herbstluftwm/code/sys/herbstluftwm-remove-gap +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -filename="/tmp/herbstluftwm-gap" -while read -r line -do - gap=$line - if [ "$gap" -ge 7 ] - then - gap=$((gap-7)) - herbstclient set window_gap $gap - echo $gap > $filename - fi -done < "$filename" -- cgit v1.2.1