diff options
Diffstat (limited to 'ratpoison')
-rwxr-xr-x | ratpoison/panel/music | 31 | ||||
-rwxr-xr-x | ratpoison/panel/panel | 12 | ||||
-rwxr-xr-x | ratpoison/panel/panel_bar | 44 |
3 files changed, 29 insertions, 58 deletions
diff --git a/ratpoison/panel/music b/ratpoison/panel/music index 3de320d..caec3d7 100755 --- a/ratpoison/panel/music +++ b/ratpoison/panel/music @@ -1,25 +1,8 @@ #!/bin/sh - -f=1 -d=30 # width - while true;do new=`mpc current` -if [ "$old" != "$new" ];then -f=1; -old="$new" -fi - - -e=$(expr $f + $d) - -if [ $e -gt ${#new} ];then -e=${#new} -f=$(expr $e - $d) -if [ $f -lt 1 ];then f=1;fi -fi if mpc | grep -q playing; then symbol='p' @@ -27,17 +10,7 @@ else symbol='P' fi -echo $f -echo $e -echo ${#new} -echo "$symbol`echo $new | cut --bytes $f-$e`" +echo "$symbol`echo $new | cut --bytes 1-30`" echo "K`mpc -h 127.0.0.1 volume | perl -pe 's/^volume://' | perl -pe 's/%$//' | perl -pe 's/^ //'`" - -f=$(expr $d / 2 + $f) - -if [ $e == ${#new} ];then -f=1; -fi - -sleep 2; +mpc idle > /dev/null done diff --git a/ratpoison/panel/panel b/ratpoison/panel/panel index 95b8aa4..b998d0b 100755 --- a/ratpoison/panel/panel +++ b/ratpoison/panel/panel @@ -9,13 +9,13 @@ mkfifo "$PANEL_FIFO" bspc config top_padding $PANEL_HEIGHT bspc control --subscribe > "$PANEL_FIFO" & xtitle -sf 'T%s' > "$PANEL_FIFO" & -essid -sf 'E%s' -i 3 -w wlp2s0 > "$PANEL_FIFO" & -volume -i 10 -sf 'V%i' > "$PANEL_FIFO" & -battery -i 5 -sf 'B%i' > "$PANEL_FIFO" & -clock -sf 'Z%d %a %H:%M' > "$PANEL_FIFO" & +volume -f 'V%i' > "$PANEL_FIFO" & +battery -i 60 -sf 'B%i' > "$PANEL_FIFO" & +clock -i 60 -sf 'Z%d %a %H:%M' > "$PANEL_FIFO" & ./music > "$PANEL_FIFO" & -./load > "$PANEL_FIFO" & -./signal > "$PANEL_FIFO" & +#essid -sf 'E%s' -i 30 -w wlp2s0 > "$PANEL_FIFO" & +# ./load > "$PANEL_FIFO" & +# ./signal > "$PANEL_FIFO" & source ./panel_colors diff --git a/ratpoison/panel/panel_bar b/ratpoison/panel/panel_bar index 6ccf74b..24ec723 100755 --- a/ratpoison/panel/panel_bar +++ b/ratpoison/panel/panel_bar @@ -8,19 +8,16 @@ num_mon=$(bspc query -M | wc -l) while read -r line ; do source ./panel_colors case $line in - C*) - # playing mpc - cpu="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} C:${line#?} %{B-}%{F-}" - ;; - R*) - # playing mpc - ram="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} R:${line#?} %{B-}%{F-}" - ;; - - S*) - # playing mpc - signal="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} S:${line#?} %{B-}%{F-}" - ;; +# C*) +# cpu="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} C:${line#?} %{B-}%{F-}" +# ;; +# R*) +# ram="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} R:${line#?} %{B-}%{F-}" +# ;; +# +# S*) +# signal="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} S:${line#?} %{B-}%{F-}" +# ;; p*) # playing mpc @@ -40,7 +37,7 @@ source ./panel_colors B*) - # volume output + # battery output battery="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} B:${line#?} %{B-}%{F-}" ;; @@ -50,14 +47,14 @@ source ./panel_colors volume="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} V:${line#?} %{B-}%{F-}" ;; - E*) - # essid output - if [ -z ${line#?} ];then - essid="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} E:No WiFi %{B-}%{F-}" - else - essid="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} E:${line#?} %{B-}%{F-}" - fi - ;; +# E*) +# # essid output +# if [ -z ${line#?} ];then +# essid="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} E:No WiFi %{B-}%{F-}" +# else +# essid="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} E:${line#?} %{B-}%{F-}" +# fi +# ;; Z*) # clock output @@ -121,5 +118,6 @@ source ./panel_colors 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}${playing}${paused}${cpu}${ram}${essid}${signal}${volume}${musicvol}${battery}${time_infos} " + printf "%s\n" "%{l}${wm_infos}${title}%{r}${playing}${paused}${volume}${musicvol}${battery}${time_infos} " done |