diff options
author | Vasil Zlatanov <vasil.zlatanov@gmail.com> | 2015-08-06 20:26:32 +0200 |
---|---|---|
committer | Vasil Zlatanov <vasil.zlatanov@gmail.com> | 2015-08-06 20:26:32 +0200 |
commit | b0708ad010b4e557f52bf3c8dc37b3b3b9e08fc6 (patch) | |
tree | a6b13f774febd22a62a86321c23ed17ee9ca7e1d /tools | |
parent | 933a36bf3cc532b0f6070772defa067dad8472da (diff) | |
download | dotfiles-b0708ad010b4e557f52bf3c8dc37b3b3b9e08fc6.tar.gz dotfiles-b0708ad010b4e557f52bf3c8dc37b3b3b9e08fc6.tar.bz2 dotfiles-b0708ad010b4e557f52bf3c8dc37b3b3b9e08fc6.zip |
switching back to ratpoison
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/exec_to_workspace | 3 | ||||
-rwxr-xr-x | tools/panel/panel | 9 | ||||
-rwxr-xr-x | tools/panel/panel_bar | 77 | ||||
-rw-r--r-- | tools/panel/panel_colors | 33 | ||||
-rwxr-xr-x | tools/ratcolor | 1 | ||||
-rw-r--r-- | tools/ratpoisonrc.conf | 75 | ||||
-rwxr-xr-x | tools/wp | 2 |
7 files changed, 72 insertions, 128 deletions
diff --git a/tools/exec_to_workspace b/tools/exec_to_workspace index 8bacd78..c7968f2 100755 --- a/tools/exec_to_workspace +++ b/tools/exec_to_workspace @@ -8,5 +8,6 @@ wg=$1; shift cmd="$@" -bspc desktop -f $wg & +rpws $wg eval $cmd & +ratpoison -c 'barsend' diff --git a/tools/panel/panel b/tools/panel/panel index 472b180..69eb2f2 100755 --- a/tools/panel/panel +++ b/tools/panel/panel @@ -9,7 +9,8 @@ mkfifo -m 777 "$PANEL_FIFO" bspc config top_padding $PANEL_HEIGHT bspc control --subscribe > "$PANEL_FIFO" & -xtitle -sf 'T%s' > "$PANEL_FIFO" & +./windows > "$PANEL_FIFO" & +echo "D`rpws current`" > "$PANEL_FIFO" & volume -f 'V%i' > "$PANEL_FIFO" & battery -i 60 -sf 'B%s %i' > "$PANEL_FIFO" & clock -i 60 -sf 'Z%d %a %H:%M' > "$PANEL_FIFO" & @@ -22,7 +23,7 @@ unbuffer alsactl monitor | grep --line-buffered 'Headphone Jack' | while read li source ./panel_colors -cat "$PANEL_FIFO" | ./panel_bar | lemonbar -f "$FONT_FONT" -f "$ICON_FONT" -g x$PANEL_HEIGHT -F "$COLOR_FOREGROUND" -B "$COLOR_BACKGROUND" & +cat "$PANEL_FIFO" | ./panel_bar | lemonbar -f "$FONT_FONT" -f "$ICON_FONT" -g x$PANEL_HEIGHT -F "$COLOR11" -B "$COLOR0" & -sleep 1; -stalonetray --geometry 1x1-415+2 --icon-gravity E --grow-gravity E -bg $COLOR0 -i 18 & +#sleep 1; +#stalonetray --geometry 1x1-415+2 --icon-gravity E --grow-gravity E -bg $COLOR0 -i 20 & diff --git a/tools/panel/panel_bar b/tools/panel/panel_bar index 779c5bb..ab39edf 100755 --- a/tools/panel/panel_bar +++ b/tools/panel/panel_bar @@ -1,7 +1,4 @@ #! /bin/sh -# -# Example panel for LemonBoy's bar - num_mon=$(bspc query -M | wc -l) @@ -111,51 +108,31 @@ while read -r line ; do # clock output time_infos="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${line#?} %{B-}%{F-}" ;; - T*) - # xtitle output - title="%{F$COLOR_TITLE_FG}%{B$COLOR_TITLE_BG} ${line#?} %{B-}%{F-}" - ;; - W*) - # bspwm internal state +# T*) +# # xtitle output +# title="%{F$COLOR_TITLE_FG}%{B$COLOR_TITLE_BG} ${line#?} %{B-}%{F-}" +# ;; + D*) + # active desktop + desktop="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${line#?}%{B-}%{F-} " + ;; + Wclear) + # focused occupied desktop wm_infos="" - IFS=':' - set -- ${line#?} - while [ $# -gt 0 ] ; do - item=$1 - name=${item#?} - case $item in - M*) - # active monitor - if [ $num_mon -gt 1 ] ; then - wm_infos="$wm_infos %{F$COLOR_FOCUSED_FG}%{B$COLOR_FOCUSED_BG} ${name} %{B-}%{F-} " - fi - ;; -# m*) -# # inactive monitor -# if [ $num_mon -gt 1 ] ; then -# wm_infos="$wm_infos %{F$COLOR_INACTIVE_MONITOR_FG}%{B$COLOR_INACTIVE_MONITOR_BG} ${name} %{B-}%{F-} " -# fi -# ;; - O*) - # focused occupied desktop - wm_infos="${wm_infos}%{F$COLOR_FOCUSED_FG}%{B$COLOR_FOCUSED_BG}%{U$COLOR_FOREGROUND} ${name} %{-u}%{B-}%{F-}" - ;; - F*) - # focused free desktop - wm_infos="${wm_infos}%{F$COLOR_FOCUSED_FG}%{B$COLOR_FOCUSED_BG}%{U$COLOR_FOREGROUND} ${name} %{-u}%{B-}%{F-}" - ;; - U*) - # focused urgent desktop - wm_infos="${wm_infos}%{F$COLOR_FOCUSED_FG}%{B$COLOR_FOCUSED_BG}%{U$COLOR_FOREGROUND} ${name} %{-u}%{B-}%{F-}" - ;; -# o*) -# # occupied desktop -# wm_infos="${wm_infos}%{F$COLOR_OCCUPIED_FG}%{B$COLOR_OCCUPIED_BG} ${name} %{B-}%{F-}" -# ;; -# f*) -# # free desktop -# wm_infos="${wm_infos}%{F$COLOR_FREE_FG}%{B$COLOR_FREE_BG} ${name} %{B-}%{F-}" -# ;; + ;; + + \**) + # focused occupied desktop + wm_infos="${wm_infos}%{F$COLOR_FOCUSED_FG}%{B$COLOR_FOCUSED_BG}%{U$COLOR_FOCUSED_UG} ${line#?} %{-u}%{B-}%{F-}" + ;; + +*) + # occupied desktop + wm_infos="${wm_infos}%{F$COLOR_OTHER_FG}%{B$COLOR_OTHER_BG} ${line#?} %{B-}%{F-}" + ;; + -*) + # free desktop + wm_infos="${wm_infos}%{F$COLOR_ELSE_FG}%{B$COLOR_ELSE_BG} ${line#?} %{B-}%{F-}" + ;; # u*) # # urgent desktop # wm_infos="${wm_infos}%{F$COLOR_URGENT_FG}%{B$COLOR_URGENT_BG} ${name} %{B-}%{F-}" @@ -164,11 +141,7 @@ while read -r line ; do # # layout # wm_infos="$wm_infos %{F$COLOR_LAYOUT_FG}%{B$COLOR_LAYOUT_BG} ${name} %{B-}%{F-}" # ;; - esac - shift - done - ;; esac # printf "%s\n" "%{l}${wm_infos}${title}%{r}${playing}${paused}${cpu}${ram}${essid}${signal}${volume}${musicvol}${battery}${time_infos} " - printf "%s\n" "%{l}${wm_infos}${title}%{r}${face}${priv}${pub}${mail}${playing}${paused}${cpu}${ram}${volume}${musicvol}${battery}${time_infos}" + printf "%s\n" "%{l}${desktop}${wm_infos}${title}%{r}${face}${priv}${pub}${mail}${playing}${paused}${cpu}${ram}${volume}${musicvol}${battery}${time_infos}" done diff --git a/tools/panel/panel_colors b/tools/panel/panel_colors index f436113..f04ddbb 100644 --- a/tools/panel/panel_colors +++ b/tools/panel/panel_colors @@ -1,33 +1,14 @@ source ~/.colors - -COLOR_FOREGROUND="#FF`echo $COLOR11 | cut -c 2-`" -COLOR_BACKGROUND="#FF`echo $COLOR0 | cut -c 2-`" -COLOR_ACTIVE_MONITOR_FG='#FF34322E' -COLOR_ACTIVE_MONITOR_BG='#FF58C5F1' -COLOR_INACTIVE_MONITOR_FG='#FF58C5F1' -COLOR_INACTIVE_MONITOR_BG='#FF34322E' -COLOR_FOCUSED_OCCUPIED_FG='#FFF6F9FF' -COLOR_FOCUSED_OCCUPIED_BG='#FF5C5955' -COLOR_FOCUSED_FREE_FG='#FFF6F9FF' -COLOR_FOCUSED_FREE_BG='#FF6D561C' -COLOR_FOCUSED_URGENT_FG='#FF34322E' -COLOR_FOCUSED_URGENT_BG='#FFF9A299' -COLOR_OCCUPIED_FG='#FFA3A6AB' -COLOR_OCCUPIED_BG='#FF34322E' -COLOR_FREE_FG='#FF6F7277' -COLOR_FREE_BG='#FF34322E' -COLOR_URGENT_FG='#FFF9A299' -COLOR_URGENT_BG='#FF34322E' -COLOR_LAYOUT_FG='#FFA3A6AB' -COLOR_LAYOUT_BG='#FF34322E' - - -COLOR_FOCUSED_FG="#FF`echo $COLOR10 | cut -c 2-`" +COLOR_FOCUSED_FG="#FF`echo $COLOR4 | cut -c 2-`" COLOR_FOCUSED_BG="#FF`echo $COLOR0 | cut -c 2-`" +COLOR_FOCUSED_UG="#FF`echo $COLOR1 | cut -c 2-`" -COLOR_TITLE_FG="#FF`echo $COLOR11 | cut -c 2-`" -COLOR_TITLE_BG="#FF`echo $COLOR0 | cut -c 2-`" +COLOR_OTHER_FG="#FF`echo $COLOR10 | cut -c 2-`" +COLOR_OTHER_BG="#FF`echo $COLOR0 | cut -c 2-`" COLOR_STATUS_FG="#FF`echo $COLOR12 | cut -c 2-`" COLOR_STATUS_BG="#FF`echo $COLOR0 | cut -c 2-`" + +COLOR_ELSE_FG="#FF`echo $COLOR11 | cut -c 2-`" +COLOR_ELSE_BG="#FF`echo $COLOR0 | cut -c 2-`" diff --git a/tools/ratcolor b/tools/ratcolor index 97cd406..e6e59a8 100755 --- a/tools/ratcolor +++ b/tools/ratcolor @@ -5,3 +5,4 @@ ratpoison -c "set bwcolor $COLOR0" ratpoison -c "set fgcolor $COLOR11" ratpoison -c "set fwcolor $COLOR11" + diff --git a/tools/ratpoisonrc.conf b/tools/ratpoisonrc.conf index 079e9c4..a40ce54 100644 --- a/tools/ratpoisonrc.conf +++ b/tools/ratpoisonrc.conf @@ -4,9 +4,6 @@ escape grave definekey top s-grave meta definekey top Arabic_dammatan meta -#unmanage Nautilus Desktop -unmanage Desktop - #find files script bind f exec ~/.tools/spotlight @@ -14,10 +11,6 @@ bind f exec ~/.tools/spotlight #set font -*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-* set font "DejaVu Sans Mono" -#Style message box -set bgcolour #fdf6e3 -set fgcolor #657b83 - # Enable xcb copy/paste source .tools/ratpoisonrc.clipboard @@ -28,7 +21,7 @@ bind Tab nextscreen set wingravity center # Use the name of the program rather than the title in the window list -set winname title +set winname class #Pest control. banish @@ -48,42 +41,34 @@ exec xsetroot -cursor_name left_ptr #exec nitrogen --restore #Border & Padding -alias showpadding set padding 10 10 10 10 -alias hidepadding set padding 0 0 0 0 -showpadding +alias showpanel set padding 0 27 0 0 +alias hidepanel set padding 0 0 0 0 +showpanel -barinpadding 0 alias showborder set border 3 alias hideborder set border 0 showborder -set fwcolor #657b83 -set bwcolor #839496 - ###################################### # Panel ###################################### -alias rpbarsend exec ~/.tools/rpbarsend +alias barsend exec ~/.tools/panel/windows -# tell ratpoison to ignore rpbar +# tell ratpoison to ignore panels unmanage rpbar +unmanage bar +unmanage stalonetray # hooks -#addhook switchwin rpbarsend -#addhook switchframe rpbarsend -#addhook switchgroup rpbarsend -#addhook deletewindow rpbarsend -## RP versions >= 1.4.6 (from the git repo) have these hooks. -## Recommended! -#addhook titlechanged rpbarsend -#addhook newwindow rpbarsend +addhook switchwin barsend +addhook deletewindow barsend +addhook switchframe barsend +addhook switchgroup barsend +#addhook titlechanged barsend unmanage conky unmanage xfce4-panel unmanage ratbar.pl -alias showpanel set padding 0 27 0 0 -alias hidepanel set padding 0 0 0 0 -#showpanel #------------------------------------------------------------- # Workspaces #------------------------------------------------------------- @@ -95,18 +80,18 @@ bind W workspace_menu #Get F-keys to switch windows now in /usr/bin/rpws -definekey top F1 exec rpws 1 #&& ratpoison -c bordscript -definekey top F2 exec rpws 2 #&& ratpoison -c bordscript -definekey top F3 exec rpws 3 -definekey top F4 exec rpws 4 #&& ratpoison -c bordscript -definekey top F5 exec rpws 5 #&& ratpoison -c bordscript -definekey top F6 exec rpws 6 #&& ratpoison -c bordscript -definekey top F7 exec rpws 7 #&& ratpoison -c bordscript -definekey top F8 exec rpws 8 #&& ratpoison -c bordscript -definekey top F9 exec rpws 9 #&& ratpoison -c bordscript -definekey top F10 exec xset -led 3 & exec ratpoison -c "exec rpws 10" -definekey top F11 exec rpws 11 #3&& ratpoison -c bordscript -definekey top F12 exec rpws 12 #3&& ratpoison -c bordscript +definekey top F1 exec rpws 1 && echo "D1" > /tmp/panel-fifo #&& ratpoison -c bordscript +definekey top F2 exec rpws 2 && echo "D2" > /tmp/panel-fifo #&& ratpoison -c bordscript +definekey top F3 exec rpws 3 && echo "D3" > /tmp/panel-fifo #&& ratpoison -c bordscript +definekey top F4 exec rpws 4 && echo "D4" > /tmp/panel-fifo #&& ratpoison -c bordscript +definekey top F5 exec rpws 5 && echo "D5" > /tmp/panel-fifo #&& ratpoison -c bordscript +definekey top F6 exec rpws 6 && echo "D6" > /tmp/panel-fifo #&& ratpoison -c bordscript +definekey top F7 exec rpws 7 && echo "D8" > /tmp/panel-fifo #&& ratpoison -c bordscript +definekey top F8 exec rpws 8 && echo "D8" > /tmp/panel-fifo #&& ratpoison -c bordscript +definekey top F9 exec rpws 9 && printf "D9\nIxlear\n" > /tmp/panel-fifo #&& ratpoison -c bordscript +definekey top F10 exec rpws 10 && printf "D10\nIclear\n" > /tmp/panel-fifo & xset -led named "Scroll Lock" #&& ratpoison -c bordscript +definekey top F11 exec rpws 11 && echo "D11" > /tmp/panel-fifo #&& ratpoison -c bordscript +definekey top F12 exec rpws 12 && echo "D12" > /tmp/panel-fifo #&& ratpoison -c bordscript definekey top M-F1 rpwsm1 definekey top M-F2 rpwsm2 @@ -169,7 +154,7 @@ bind J exchangedown bind K exchangeup bind w window_menu -bind a title +bind a exec ratpoison -i -c 'title' && ratpoison -c 'barsend' bind t time definekey top s-l exec i3lock -n -i ~/.wallpaper.png definekey top s-s exec ~/bin/sus @@ -210,11 +195,11 @@ definekey top s-p paneltoggle # b : Open url -alias browse_cmd exec .tools/exec_to_workspace 2 firefox -new-tab +alias browse_cmd exec .tools/exec_to_workspace 2 vimb alias browse colon browse_cmd bind b browse # B : open a new firefox tab and browse to the X clipboard selection -alias browse_selection exec .tools/exec_to_workspace 2 firefox -new-tab `ratpoison -c getsel` +alias browse_selection exec .tools/exec_to_workspace 2 vimb `ratpoison -c getsel` bind B browse_selection # Paste with X selection @@ -229,7 +214,7 @@ bind i insert_X_selection definekey top s-f exec firefox definekey top s-u exec uzbl-browser definekey top s-m exec /home/vasko/.tools/pentfocus -definekey top s-v exec vlc +definekey top s-v exec vimb definekey top s-g exec gvim #definekey top s-l exec libreoffice @@ -244,7 +229,7 @@ definekey top KP_Enter exec ~/Dropbox/speech/run-duplex.sh # Up alias volup exec amixer -q set Master 5+ && ratpoison -c "echo `$HOME/.tools/volind`" -defivhave`havhave`nekey top XF86AudioRaiseVolume volup +definekey top XF86AudioRaiseVolume volup definekey top s-Prior volup # Down @@ -254,3 +254,5 @@ pkill stalone source ~/.colors #convert -font DejaVuSansB -pointsize 30 -stroke $COLOR0 -strokewidth 1 -fill $COLOR11 -draw 'text 70,60 "Vasil Zlatanov -> +46 723537981 vasil.zlatanov@gmail.com" ' $background ~/.wallpaper.png & convert $background ~/.wallpaper.png & +~/.config/vimb/color-gen +~/.tools/ratcolor |