diff options
author | shmibs <shmibs@gmail.com> | 2015-06-15 14:55:33 -0700 |
---|---|---|
committer | shmibs <shmibs@gmail.com> | 2015-06-15 14:55:33 -0700 |
commit | 04ea964440221a09d9a66af52749287ddbf49315 (patch) | |
tree | c48de9d8dea5f0a1229427e8f93167fba9d64b11 /.config | |
parent | cff2bcd79c676b35a8850d792304a26ef68b78f9 (diff) | |
download | dotfiles-04ea964440221a09d9a66af52749287ddbf49315.tar.gz |
incremental update
changes i've let back up over time
Diffstat (limited to '.config')
-rw-r--r-- | .config/dunst/dunstrc | 2 | ||||
-rwxr-xr-x | .config/herbstluftwm/autostart | 2 | ||||
-rwxr-xr-x | .config/herbstluftwm/config_vars | 33 | ||||
-rwxr-xr-x | .config/herbstluftwm/panel.sh | 83 | ||||
-rw-r--r-- | .config/nitrogen/bg-saved.cfg | 2 | ||||
-rw-r--r-- | .config/ranger/rc.conf | 2 | ||||
-rw-r--r-- | .config/ranger/rifle.conf | 18 | ||||
-rwxr-xr-x | .config/sxiv/exec/key-handler | 4 |
8 files changed, 102 insertions, 44 deletions
diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index 749ebed..1202f9b 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -1,5 +1,5 @@ [global] - font = Tamsyn 12 + font = Tamsyn 16 # allow a small subset of html markup: # <b>bold</b> diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart index 5c9841b..8963277 100755 --- a/.config/herbstluftwm/autostart +++ b/.config/herbstluftwm/autostart @@ -173,7 +173,7 @@ hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off # set apppropriate things to pseudotile hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on focus=on hc rule class~'(VBoxSDL|SleepIsDeathApp|freeciv-sdl|milkytracker)' pseudotile=on focus=on -hc rule class~'(FTL|Tegaki-recognize|PlayOnLinux|Pcsx2|Tilem2|Wine)' pseudotile=on focus=on +hc rule class~'(FTL|Tegaki-recognize|PlayOnLinux|PCSX2|Tilem2|Wine)' pseudotile=on focus=on hc rule class~'(mednafen)' pseudotile=on focus=on # unlock, just to be sure diff --git a/.config/herbstluftwm/config_vars b/.config/herbstluftwm/config_vars index c736528..b910fed 100755 --- a/.config/herbstluftwm/config_vars +++ b/.config/herbstluftwm/config_vars @@ -37,6 +37,23 @@ ############### # Lain Blind # ############### +# +#bg_normal='#262626' +#fg_normal='#c1b48e' +#bg_focus='#d0758b' +#fg_focus='#efefef' +#bg_urgent='#ff4070' +#fg_urgent='#efefef' +# +#fg_grey='#808080' +#fg_red='#d0758b' +#fg_green='#d0758b' +#fg_yellow='#d0758b' +#fg_blue='#d0758b' + +########### +# Aigis # +########### bg_normal='#262626' fg_normal='#c1b48e' @@ -45,13 +62,17 @@ fg_focus='#efefef' bg_urgent='#ff4070' fg_urgent='#efefef' -fg_grey='#808080' -fg_red='#d0758b' -fg_green='#d0758b' -fg_yellow='#d0758b' -fg_blue='#d0758b' +fg_grey='#566a72' +fg_red='#ba5654' +fg_green='#badbb4' +fg_yellow='#b9c780' +fg_blue='#99cff3' bheight=18 -dfont='-*-stlarch-medium-r-*-*-10-*-*-*-*-*-*-*,-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*' +#dfont='-*-stlarch-medium-r-*-*-10-*-*-*-*-*-*-*,-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*' +bfont1='-*-stlarch-medium-r-*-*-10-*-*-*-*-*-*-*' +bfont2='-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*' efont='-*-tamsyn-medium-*-*-*-14-*-*-*-*-*-*-*' + + diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh index eff47cb..7588e54 100755 --- a/.config/herbstluftwm/panel.sh +++ b/.config/herbstluftwm/panel.sh @@ -34,6 +34,12 @@ fg_green=$(echo -n '#ff'; echo "$fg_green" | tr -d '#') fg_yellow=$(echo -n '#ff'; echo "$fg_yellow" | tr -d '#') fg_blue=$(echo -n '#ff'; echo "$fg_blue" | tr -d '#') +# these are annoying, but i can't figure out a stateless way to handle rotation +declare -i mpd_offset +declare -i mpd_length +declare mpd_current +declare mpd_playing + hc pad $monitor $bheight @@ -45,6 +51,20 @@ hc pad $monitor $bheight # functions for retrieving and processing data # upon events +update_mpd() { + echo -n "%{F${bg_focus}}|%{F${fg_normal} A:mpd:} " + echo -n "%{F${fg_green}}\uE05C%{F${fg_normal}} " + #echo -n "$mpd_current" | cut -c -$(expr 20 - "$mpd_offset") + echo "%{A}" + if [[ $mpd_length -gt 20 ]]; then + if [[ $mpd_offset -lt $[mpd_length-1] ]]; then + mpd_offset=$[mpd_offset+1] + else + mpd_offset=0 + fi + fi +} + update_taglist() { echo -n "%{l}%{B${bg_normal} F${fg_normal} U${fg_normal}}" hc tag_status | tr '\t' '\n' | sed \ @@ -62,7 +82,7 @@ update_taglist() { update_winlist() { focus_id=$(hc get_attr clients.focus.winid) - if [[ "$focus_id" == "" ]]; then + if [[ -z "$focus_id" ]]; then return fi @@ -102,8 +122,7 @@ fields[5]="" fields[6]="" # date fields[7]="" -# vertical separator and gap for tray -#fields[8]="%{F${bg_focus}}| %{F${fg_normal}}" + ###################### @@ -123,6 +142,17 @@ get_date() { } | awk '$0 != l { print ; l=$0 ; fflush(); }' } +get_mpd() { + while true; do + if [[ -z "$(mpc status | grep '\[playing\]')" ]]; then + echo -e "mpd\tpaused" + else + echo -e "mpd\tplaying" + fi + mpc idle player + done +} + get_stat() { { conky -c ~/.config/herbstluftwm/panel/conky_stats @@ -132,7 +162,7 @@ get_stat() { get_when() { { while true; do - if [[ "$(when --future=2 | sed '1,2d')" == "" ]]; then + if [[ -z "$(when --future=2 | sed '1,2d')" ]]; then echo -e 'when\t0' else echo -e 'when\t1' @@ -142,12 +172,6 @@ get_when() { } | awk '$0 != l { print ; l=$0 ; fflush(); }' } -get_mpd() { - while true; do - mpc current -f "mpd\t%artist%\t%album%\t%title%" --wait - done -} - ####################### @@ -164,8 +188,8 @@ get_mpd() { child[2]=$! get_when & child[3]=$! - #get_mpd & - #child[4]=$! + get_mpd & + child[4]=$! hc --idle @@ -173,7 +197,7 @@ get_mpd() { kill $id done - pkill bar + pkill lemonbar } 2> /dev/null | { @@ -198,6 +222,24 @@ get_mpd() { case "${event[0]}" in date) fields[7]="%{F${bg_focus}}|%{F${fg_normal} A:date:} \uE015 ${event[@]:1} %{A}" + if [[ $mpd_playing ]]; then + fields[5]=$(update_mpd) + fi + ;; + + mpd) + if [[ "${event[1]}" == "playing" ]]; then + mpd_offset=0 + mpd_current="$(mpc current) " + mpd_length=${#mpd_current} + mpd_playing=true + fields[5]=$(update_mpd) + else + mpd_offset=0 + mpd_length=0 + mpd_current="" + mpd_playing=false + fi ;; stats) @@ -245,7 +287,8 @@ get_mpd() { done # pass the events into bar -} 2> /dev/null | bar -f $dfont -g${width}x${bheight}+${xpos}+${ypos} \ +} 2> /dev/null | lemonbar -f "$bfont1" -f "$bfont2" \ + -g${width}x${bheight}+${xpos}+${ypos} \ -B ${bg_normal} -F ${fg_normal} | \ { @@ -259,15 +302,9 @@ get_mpd() { date) notify-send "$(cal)" ;; - #mpd) - # artist=$(mpc current -f '%artist%') - # albumartist=$(mpc current -f '%albumartist%') - # if [[ "$artist" != "$albumartist" ]]; then - # artist=$(echo -e "album artist: $albumartist\nartist: $artist") - # else - # artist=$(echo "artist: $artist") - # fi - # file="/home/shmibs/music/$(mpc current -f '%file%')" + mpd) + notify-send "$(mpc status)" + ;; stats) urxvt -e htop & ;; diff --git a/.config/nitrogen/bg-saved.cfg b/.config/nitrogen/bg-saved.cfg index 025fc89..71190f2 100644 --- a/.config/nitrogen/bg-saved.cfg +++ b/.config/nitrogen/bg-saved.cfg @@ -1,4 +1,4 @@ [:0.0] -file=/home/shmibs/backdrops/shadowed/lain-bed.png +file=/home/shmibs/backdrops/shadowed/aigis-1920x1080.png mode=5 bgcolor=#000000 diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf index d8a94ac..ab29508 100644 --- a/.config/ranger/rc.conf +++ b/.config/ranger/rc.conf @@ -61,7 +61,7 @@ set vcs_backend_bzr disabled set preview_images false # Use a unicode "..." character to mark cut-off filenames? -set unicode_ellipsis true +set unicode_ellipsis false # Show dotfiles in the bookmark preview box? set show_hidden_bookmarks true diff --git a/.config/ranger/rifle.conf b/.config/ranger/rifle.conf index ed66344..aa57817 100644 --- a/.config/ranger/rifle.conf +++ b/.config/ranger/rifle.conf @@ -48,6 +48,15 @@ # only running the current file even if you have marked multiple files. #------------------------------------------- +# Misc +#------------------------------------------- +# Define the "editor" for text files as first action +mime ^text, label editor = "$EDITOR" -- "$@" +mime ^text, has urxvt, X, flag f = "urxvt" "-e" "$EDITOR" "$@" +!mime ^text, ext xml|html|xhtml|csv|tex|py|pl|rb|sh|php = "$EDITOR" -- "$@" +!mime ^text, ext xml|html|xhtml|csv|tex|py|pl|rb|sh|php, has urxvt, X, flag f = "urxvt" "-e" "$EDITOR" "$@" + +#------------------------------------------- # Websites #------------------------------------------- # Rarely installed browsers get higher priority; It is assumed that if you @@ -69,15 +78,6 @@ ext x?html?, has links, terminal = links "$@" ext x?html?, has lynx, terminal = lynx -- "$@" ext x?html?, has w3m, terminal = w3m "$@" -#------------------------------------------- -# Misc -#------------------------------------------- -# Define the "editor" for text files as first action -mime ^text, label editor = "$EDITOR" -- "$@" -mime ^text, has urxvt, X, flag f = "urxvt" "-e" "$EDITOR" "$@" -!mime ^text, ext xml|csv|tex|py|pl|rb|sh|php = "$EDITOR" -- "$@" -!mime ^text, ext xml|csv|tex|py|pl|rb|sh|php, has urxvt, X, flag f = "urxvt" "-e" "$EDITOR" "$@" - # wine ext exe, has wine, X, flag f = wine "$1" diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler index 9eed7d3..01ec679 100755 --- a/.config/sxiv/exec/key-handler +++ b/.config/sxiv/exec/key-handler @@ -14,7 +14,7 @@ do "g") gimp "$file" & ;; "s") - scp "$file" shmibbles.me:/srv/http/tmp/ + scp "$file" shmibbles.me:http/tmp/ if [ $? -ne 0 ]; then notify-send "uploading $(basename $file) to /tmp/ failed" else @@ -25,7 +25,7 @@ do fi ;; "i") - scp "$file" shmibbles.me:/srv/http/img/ + scp "$file" shmibbles.me:http/img/ if [ $? -ne 0 ]; then notify-send "uploading $(basename $file) to /img/ failed" else |