diff options
author | Tom Willemsen | 2012-09-16 02:07:48 +0200 |
---|---|---|
committer | Tom Willemsen | 2012-09-16 02:07:48 +0200 |
commit | c4ea2643f6cbac10d5b7300e13325c59eb23c5d8 (patch) | |
tree | 3556421a5bc83722d2d9f382a11ab98adb972170 /.config/herbstluftwm | |
parent | 72d124100d3fc4fb7ee9ada43385867b0c171a4d (diff) | |
parent | bbc17210a1d3b0c69c36207891d9fb18fd8759f9 (diff) | |
download | dotfiles-c4ea2643f6cbac10d5b7300e13325c59eb23c5d8.tar.gz dotfiles-c4ea2643f6cbac10d5b7300e13325c59eb23c5d8.zip |
Merge remote-tracking branch 'origin/master' into phoenix
Conflicts:
.config/herbstluftwm/autostart
.config/herbstluftwm/panel.sh
Diffstat (limited to '.config/herbstluftwm')
-rwxr-xr-x | .config/herbstluftwm/autostart | 49 | ||||
-rwxr-xr-x | .config/herbstluftwm/panel.sh | 150 |
2 files changed, 0 insertions, 199 deletions
diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart deleted file mode 100755 index 8b44366..0000000 --- a/.config/herbstluftwm/autostart +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/zsh - -function hc () { - herbstclient $@ -} - -modkey="Mod4" - -# Looks -hc set frame_bg_normal_color "#0c191c" -hc set frame_bg_active_color "#000000" -hc set frame_border_width 0 -hc set window_border_width 1 -hc set window_border_normal_color "#15abc3" -hc set window_border_active_color "#e0c625" -hc set focus_stealing_prevention 0 -hc set swap_monitors_to_get_tag 0 - -# Layout -hc set default_frame_layout 2 -hc set_layout max - -# Keys -#hc keybind $modkey-t spawn ~/bin/hlwm/capture-todo -#hc keybind $modkey-Shift-t spawn ~/bin/hlwm/show-todo - -# Mouse -hc mousebind $modkey-Button1 move -hc mousebind $modkey-Button2 resize -hc mousebind $modkey-Button3 zoom - -# Rules -hc unrule -F -hc rule focus=on -hc rule windowtype=_NET_WM_WINDOW_TYPE_DIALOG focus=on pseudotile=on -hc rule class=Xephyr pseudotile=on -hc rule instance=Xine\ Window pseudotile=on - -xbindkeys - -# Panel -~/.config/herbstluftwm/panel.sh & - -# Prep default -hc load default "(split horizontal:0.550000:0 (split vertical:0.850000:0 (split horizontal:0.180000:1 (clients max:0) (clients max:0 0x140001a)) (clients max:0)) (clients max:0 0xc00077))" - -# Local Variables: -# eval: (git-auto-commit-mode 1) -# End: diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh deleted file mode 100755 index ae5aedd..0000000 --- a/.config/herbstluftwm/panel.sh +++ /dev/null @@ -1,150 +0,0 @@ -#!/bin/bash - -monitor=${1:-0} -monitor2=1 -geometry=( $(herbstclient monitor_rect "$monitor") ) -if [ -z "$geometry" ] ;then - echo "Invalid monitor $monitor" - exit 1 -fi -# geometry has the format: WxH+X+Y -x=${geometry[0]} -width=${geometry[2]} -height=12 -y=0 #$(expr ${geometry[3]} - $height) -tag_width=40 -font="-misc-tamsyn-medium-r-normal-*-14-*-*-*-*-*-iso8859-*" - -selcolor='#24c6e0' -locolor='#657b83' -bgcolor='#002b36' -hicolor="#808080" -urcolor="#e0c625" - -function uniq_linebuffered() { - awk '$0 != l { print ; l=$0 ; fflush(); }' "$@" -} - -function print_tags() { - # draw tags - echo -n "$separator" - for i in "${TAGS[@]}" ; do - if [[ "${TAGS2[@]}" == *"#${i:1}"* ]]; then - echo -n "^bg($selcolor)^fg(#000000) ${i:1} ^fg()^bg()" - elif [[ "${TAGS2[@]}" == *"+${i:1}"* ]]; then - echo -n "^bg($locolor)^fg(#000000) ${i:1} ^fg()^bg()" - else - case ${i:0:1} in - '#') - echo -n "^bg($selcolor)^fg(#000000) ${i:1} ^fg()^bg()" - ;; - '+') - echo -n "^bg($locolor)^fg(#000000) ${i:1} ^fg()^bg()" - ;; - ':') - echo -n "^bg($hicolor)^fg(#000000) ${i:1} ^fg()^bg()" - ;; - '!') - echo -n "^bg($urcolor)^fg(#000000) ${i:1} ^fg()^bg()" - ;; - *) - echo -n "^bg($bgcolor)^fg(#ffffff) ${i:1} ^fg()^bg()" - ;; - esac - fi - echo -n "$separator" - done -} - -function print_mailboxes() { - declare -A mailnames - mailboxes=(ninthfloor gmail aethon ryuslash.org) - mailnames=( - [ninthfloor]="9f" - [gmail]="gm" - [aethon]="aet" - [ryuslash.org]="ryu") - mailtxt="" - for j in "${mailboxes[@]}"; do - mailfile="$HOME/documents/mail/$j/inbox/new/" - mailcnt=$(ls $mailfile | wc -l) - - if [ $mailcnt -gt 0 ]; then - mailsha1=$(echo $j | sha1sum) - mailcolor="#${mailsha1:0:6}" - else - mailcolor=$bgcolor - fi - - mailtxt="$mailtxt${separator}^bg($mailcolor)^fg(#ffffff) ${mailnames[$j]} ^fg()^bg()" - done - mailtxt_only=$(echo -n "$mailtxt" | sed 's.\^[^(]*([^)]*)..g') - let mailtxt_width=$(textwidth "$font" "$mailtxt_only")+10 - echo -n "^p(_RIGHT)^p(-$mailtxt_width)$mailtxt" -} - -function print_services() { - services=(emacs dunst xbindkeys sshd) - servicetxt="" - for j in "${services[@]}"; do - servicetxt="$servicetxt$separator$(status $j)" - done - servicetxt_only=$(echo -n "$servicetxt" | sed 's.\^[^(]*([^)]*)..g') - let servicetxt_width=($(textwidth "$font" "$servicetxt_only")+7)/2 - - echo -n "^p(_CENTER)^p(-$servicetxt_width)$servicetxt" -} - -function status() -{ - running=$(${1}_running 2>/dev/null || pidof $1) - - if [ -n "$running" ]; then - color="darkgreen" - else - color="darkred" - fi - - echo -n "^bg($color)^fg(#ffffff) $1 ^fg()^bg()" -} - -function emacs_running() -{ - ps ax | awk '{ print $5 " " $6 }' | grep -E "^emacs --daemon" -} - -{ - childpid=$! - herbstclient --idle - kill $childpid -} 2> /dev/null | { - TAGS=( $(herbstclient tag_status $monitor) ) - TAGS2=( $(herbstclient tag_status $monitor2) ) - - separator="^fg($bgcolor)^ro(1x$height)^fg()" - print_tags - print_services - print_mailboxes - - echo - # wait for next event - read line || break - cmd=( $line ) - # find out event origin - case "${cmd[0]}" in - tag*) - TAGS=( $(herbstclient tag_status $monitor) ) - TAGS2=( $(herbstclient tag_status $monitor2) ) - ;; - quit_panel) - exit - ;; - esac - - sleep 1s -} 2> /dev/null | dzen2 -w $width -x $x -y $y -fn "$font" -h $height \ - -ta l -bg "$bgcolor" - -# Local Variables: -# eval: (git-auto-commit-mode 1) -# End: |