diff options
Diffstat (limited to 'herbstluftwm/bin')
-rwxr-xr-x | herbstluftwm/bin/calendar | 15 | ||||
-rwxr-xr-x | herbstluftwm/bin/herbstluftwm-add-gap | 12 | ||||
-rwxr-xr-x | herbstluftwm/bin/herbstluftwm-remove-gap | 12 |
3 files changed, 39 insertions, 0 deletions
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" |