Browse Source

added polybar theme toggler

master
Marc 4 years ago
parent
commit
fc42917eb7
4 changed files with 36 additions and 1 deletions
  1. 2
      .config/polybar/config.ini
  2. 8
      .config/polybar/themes/onehalf-dark.ini
  3. 8
      .config/polybar/themes/onehalf-light.ini
  4. 19
      .config/scripts/toggle_theme.sh

2
.config/polybar/config.ini

@ -4,7 +4,7 @@
margin-bottom = 0 margin-bottom = 0
margin-top = 0 margin-top = 0
include-file = ~/.config/polybar/colors.ini
include-file = ~/.config/polybar/themes/current.ini
include-file = ~/.config/polybar/modules.ini include-file = ~/.config/polybar/modules.ini
include-file = ~/.config/polybar/user_modules.ini include-file = ~/.config/polybar/user_modules.ini

8
.config/polybar/themes/onehalf-dark.ini

@ -0,0 +1,8 @@
;; based on papercolor-light
[color]
background = #282c34
foreground = #dcdfe4
accent = #98c379
attention = #e08c75

8
.config/polybar/themes/onehalf-light.ini

@ -0,0 +1,8 @@
;; based on onehalf-light
[color]
background = #fafafa
foreground = #383a42
accent = #40a14f
attention = #e45649

19
.config/scripts/toggle_theme.sh

@ -9,6 +9,25 @@
# ncmpcpp? uses xresources, but might want customizations # ncmpcpp? uses xresources, but might want customizations
# nvim # nvim
#polybar
PATH_THEME="$XDG_CONFIG_HOME/polybar/themes"
case "$1" in
light)
cp "$PATH_THEME/onehalf-light.ini" "$PATH_THEME/current.ini"
;;
dark)
cp "$PATH_THEME/onehalf-dark.ini" "$PATH_THEME/current.ini"
;;
esac
if pgrep -u $UID -x polybar >/dev/null; then
killall -q polybar
polybar -c ~/.config/polybar/config.ini main &
polybar -c ~/.config/polybar/config.ini system &
fi
#x11 #x11
PATH_THEME="$XDG_CONFIG_HOME/X11/colors" PATH_THEME="$XDG_CONFIG_HOME/X11/colors"

Loading…
Cancel
Save