From 6c2db7df0e40962537ce74d6f6213fac1782bd1b Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 15 May 2013 17:35:51 +0200 Subject: Update dotfiles --- .config/herbstluftwm/Makefile | 6 -- .config/herbstluftwm/autostart | 121 --------------------------------- .config/herbstluftwm/panel.sh | 150 ----------------------------------------- 3 files changed, 277 deletions(-) delete mode 100644 .config/herbstluftwm/Makefile delete mode 100755 .config/herbstluftwm/autostart delete mode 100755 .config/herbstluftwm/panel.sh (limited to '.config/herbstluftwm') diff --git a/.config/herbstluftwm/Makefile b/.config/herbstluftwm/Makefile deleted file mode 100644 index 62151ad..0000000 --- a/.config/herbstluftwm/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -DESTDIR:=$(DESTDIR)/herbstluftwm -objects=autostart panel.sh - -include ../../dotfiles.mk - -install-autostart: MODE=744 diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart deleted file mode 100755 index 83d236f..0000000 --- a/.config/herbstluftwm/autostart +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/bash - -# this is a simple config for herbstluftwm - -function hc() { - herbstclient "$@" -} - -hc emit_hook reload - -# remove all existing keybindings -hc keyunbind --all - -# keybindings -Mod=Mod4 -hc keybind $Mod-Shift-q quit -hc keybind $Mod-Shift-r reload -hc keybind $Mod-Shift-c close - -hc keybind $Mod-c spawn urxvt -hc keybind $Mod-e spawn emacsclient -ca emacs -hc keybind $Mod-w spawn conkeror - -# tags -TAG_NAMES=( {1..9} ) -TAG_KEYS=( {1..9} 0 ) - -hc rename default "${TAG_NAMES[0]}" || true -for i in ${!TAG_NAMES[@]} ; do - hc add "${TAG_NAMES[$i]}" - key="${TAG_KEYS[$i]}" - if ! [ -z "$key" ] ; then - hc keybind "$Mod-$key" use_index "$i" - hc keybind "$Mod-Shift-$key" move_index "$i" - fi -done - -# cycle through tags -hc keybind $Mod-period use_index +1 --skip-visible -hc keybind $Mod-comma use_index -1 --skip-visible -hc keybind $Mod-Right use_index +1 --skip-visible -hc keybind $Mod-Left use_index -1 --skip-visible - -# layouting -hc keybind $Mod-r remove -hc keybind $Mod-space cycle_layout 1 -hc keybind $Mod-u split vertical 0.5 -hc keybind $Mod-o split horizontal 0.5 -hc keybind $Mod-s floating toggle -# hc keybind $Mod-f fullscreen toggle -# hc keybind $Mod-p pseudotile toggle - -# resizing -RESIZESTEP=0.05 -hc keybind $Mod-Control-h resize left +$RESIZESTEP -hc keybind $Mod-Control-j resize down +$RESIZESTEP -hc keybind $Mod-Control-k resize up +$RESIZESTEP -hc keybind $Mod-Control-l resize right +$RESIZESTEP - -# mouse -hc mouseunbind --all -hc mousebind $Mod-Button1 move -hc mousebind $Mod-Button2 resize -hc mousebind $Mod-Button3 zoom - -# focus -hc keybind $Mod-BackSpace cycle_monitor -hc keybind $Mod-Tab cycle_all +1 -hc keybind $Mod-Shift-Tab cycle_all -1 -# hc keybind $Mod-c cycle -hc keybind $Mod-b focus left -hc keybind $Mod-n focus down -hc keybind $Mod-p focus up -hc keybind $Mod-f focus right -hc keybind $Mod-i jumpto urgent -hc keybind $Mod-Shift-h shift left -hc keybind $Mod-Shift-j shift down -hc keybind $Mod-Shift-k shift up -hc keybind $Mod-Shift-l shift right - -# colors -hc set frame_border_active_color '#222222' -hc set frame_border_normal_color '#101010' -hc set frame_bg_normal_color '#565656' -hc set frame_bg_active_color '#345F0C' -hc set frame_border_width 1 -hc set window_border_width 3 -hc set window_border_inner_width 1 -hc set window_border_normal_color '#454545' -hc set window_border_active_color '#9fbc00' -hc set always_show_frame 1 -hc set frame_gap 4 -# add overlapping window borders -hc set window_gap -2 -hc set frame_padding 2 -hc set smart_window_surroundings 0 -hc set smart_frame_surroundings 1 -hc set mouse_recenter_gap 0 - - -# rules -hc unrule -F -#hc rule class=XTerm tag=3 # move all xterms to tag 3 -hc rule focus=off # normally do not focus new clients -# give focus to most common terminals -hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on -hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on -hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on -hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off - -# unlock, just to be sure -hc unlock - -herbstclient set tree_style '╾│ ├└╼─┐' - -# do multi monitor setup here, e.g.: -# hc set_monitors 1280x1024+0+0 1280x1024+1280+0 -# or simply: -# hc detect_monitors - -hc pad 0 21 diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh deleted file mode 100755 index 22b46ae..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 httpd mysqld dunst xbindkeys mpdscribble sshd mpd) - 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: -- cgit v1.2.3-54-g00ecf