No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

panel_bar 3.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #! /bin/sh
  2. # . /home/rlee/scripts/panel_colors-bar
  3. #dtch
  4. #DARK="#FF666666"
  5. #WHITE="#FFFFFFFF"
  6. #BG="#FF222222"
  7. #sepia
  8. #DARK="#FF666666"
  9. #WHITE="#FFC1612E"
  10. #BG="#FF222222"
  11. #z3bra
  12. DARK="#FF666666"
  13. WHITE="#FFCEE318"
  14. BG="#FF222222"
  15. #frenchvanilla
  16. #DARK="#FFF1D4AF"
  17. #WHITE="#FF98FB98"
  18. #BG="#FF222222"
  19. #gotham
  20. #DARK="#FF98D1CE"
  21. #WHITE="#FFEDB54B"
  22. #BG="#FF10151B"
  23. #workspace(){
  24. # SPACE_NUM=$(bspc query -D -d);
  25. # case "$SPACE_NUM" in
  26. # "1")
  27. # WORKSPACE="%{F$WHITE}●%{F-} %{F$DARK}● ●%{F-}";;
  28. # "2")
  29. # WORKSPACE="%{F$DARK}●%{F-} %{F$WHITE}●%{F-} %{F$DARK}●%{F-}";;
  30. # "3")
  31. # WORKSPACE="%{F$DARK}● ●%{F-} %{F$WHITE}●%{F-}";;
  32. # esac
  33. # echo -n $WORKSPACE
  34. #}
  35. workspace(){
  36. SPACE_NUM=$(bspc query -D -d);
  37. case "$SPACE_NUM" in
  38. "1")
  39. WORKSPACE="%{F$WHITE}i%{F-} %{F$DARK}ii iii iv v%{F-}";;
  40. "2")
  41. WORKSPACE="%{F$DARK}i%{F-} %{F$WHITE}ii%{F-} %{F$DARK}iii iv v%{F-}";;
  42. "3")
  43. WORKSPACE="%{F$DARK}i ii%{F-} %{F$WHITE}iii%{F-} %{F$DARK}iv v%{F-}";;
  44. "4")
  45. WORKSPACE="%{F$DARK}i ii iii%{F-} %{F$WHITE}iv%{F-} %{F$DARK}v%{F-}";;
  46. "5")
  47. WORKSPACE="%{F$DARK}i ii iii iv%{F-} %{F$WHITE}v%{F-}";;
  48. esac
  49. echo -n $WORKSPACE
  50. }
  51. dat(){
  52. echo -n $(date "+%H.%M")
  53. }
  54. mus(){
  55. echo -n $(test -z "$(mpc current)" || mpc current -f "%title%" )
  56. #echo -n $(test -z "$(mpc current)" || mpc current -f "[[%title% - ]%artist%]" )
  57. #echo -n $(ps aux | grep -v "grep" | if grep -q "cmus"; then echo $(cmus-remote -Q | sed -n 's/tag title //p'); else echo "n/a"; fi)
  58. }
  59. vol(){
  60. echo -n $(amixer get PCM | grep "Front Left:" | awk '{print $5}' | grep [[:digit:]])
  61. }
  62. wth(){
  63. #echo -n $(python2 weather-cli/weathercli.py bicknell,in -u celsius --iconify)
  64. echo -n $(python2 weather-cli/weathercli.py bicknell,in -u celsius | grep "It's" | awk '{print $2,$4,$5,$6}')
  65. }
  66. pause(){
  67. #echo -n $(mpc | if grep -q "paused"; then echo -n ".paused"; else echo -n ".playing"; fi)
  68. echo -n $(mpc | if grep -q "paused"; then echo -n "⮔"; else echo -n "⮕"; fi)
  69. }
  70. while :; do
  71. # printf "%s\n" "%{B$BG}%{l} %{F$R2}%{B$B1} $(pause) %{B-}%{F-} %{F$WHITE}$(mus)%{F-} %{B$B1}%{F$R2} .vol %{F-}%{B-} $(vol)%{F-} %{c} $(workspace) %{r} %{B$B1}%{F$MAG} .weather %{F-}%{B-} %{F$WHITE}$(wth) %{F-} %{B$B1}%{F$MAG} .time %{F-}%{B-} %{F$WHITE}$(dat)%{F-}%{B$BG} "
  72. # printf "%s\n" "%{B$BG}%{l} %{F$R2}%{B$B1} $(pause) %{B-}%{F-} %{F$WHITE}$(mus)%{F-} %{B$B1}%{F$R2} ⮞ %{F-}%{B-} $(vol)%{F-} %{c} $(workspace) %{r} %{B$B1}%{F$MAG} ✳ %{F-}%{B-} %{F$WHITE}$(wth) %{F-} %{B$B1}%{F$MAG} ⮖ %{F-}%{B-} %{F$WHITE}$(dat)%{F-}%{B$BG} "
  73. printf "%s\n" "%{B$BG}%{l} $(workspace) %{c}$(xtitle) %{r}%{F$DARK}CLK%{F-} %{F$WHITE}$(dat)%{F-}%{B$BG} "
  74. # printf "%s\n" "%{B$BG}%{l} %{F$DARK}MPD:%{F-} %{F$WHITE}$(mus)%{F-} %{F$DARK}VOL:%{F-} %{F$WHITE}$(vol)%{F-} %{c} $(workspace) %{r} %{F$DARK}WEATHER:%{F-} %{F$WHITE}$(wth)%{F-} %{F$DARK}TIME:%{F-} %{F$WHITE}$(dat)%{F-}%{B$BG} "
  75. # printf "%s\n" "%{l} $(pause) $(mus) $(vol) %{c}$(workspace) %{r} $(wth) // $(dat) "
  76. # printf "%s\n" "%{l} $(mus) $(vol) %{c} $(workspace) %{r} $(date) "
  77. sleep 1
  78. done