diff --git a/hyprland/.config/waybar/config b/hyprland/.config/waybar/config index ca6328a..ea903f9 100644 --- a/hyprland/.config/waybar/config +++ b/hyprland/.config/waybar/config @@ -9,4 +9,5 @@ "tray", "clock" ], + "reload_style_on_change": true, } diff --git a/hyprland/.config/waybar/dark.css b/hyprland/.config/waybar/dark.css new file mode 100644 index 0000000..2c58682 --- /dev/null +++ b/hyprland/.config/waybar/dark.css @@ -0,0 +1,12 @@ +* { + background-color: #263c59; + color: #7b899d; +} + +#workspaces button.active { + border-bottom: 3px solid #7b899d; +} + +#workspaces button.urgent { + border-bottom: 3px solid #a65959; +} diff --git a/hyprland/.config/waybar/light.css b/hyprland/.config/waybar/light.css new file mode 100644 index 0000000..413baeb --- /dev/null +++ b/hyprland/.config/waybar/light.css @@ -0,0 +1,12 @@ +* { + background-color: #85a7ad; + color: #394446; +} + +#workspaces button.active { + border-bottom: 3px solid #5c6d70; +} + +#workspaces button.urgent { + border-bottom: 3px solid #9e412e; +} diff --git a/hyprland/.config/waybar/style.css b/hyprland/.config/waybar/style.css index 854825c..75639f4 100644 --- a/hyprland/.config/waybar/style.css +++ b/hyprland/.config/waybar/style.css @@ -1,8 +1,8 @@ +@import url("file:///home/lupan/.config/waybar/dark.css"); + * { font-family: Fira Code Nerd Font; - font-size: 14; - background-color: #263c59; - color: #7b899d; + font-size: 14px; } #workspaces { @@ -15,14 +15,6 @@ border-bottom: 3px solid transparent; } -#workspaces button.active { - border-bottom: 3px solid #7b899d; -} - -#workspaces button.urgent { - border-bottom: 3px solid #a65959; -} - #window { border-bottom: 3px solid transparent; } diff --git a/xsession/bin/lupan-set-theme b/xsession/bin/lupan-set-theme index 9c788a8..2f11c95 100755 --- a/xsession/bin/lupan-set-theme +++ b/xsession/bin/lupan-set-theme @@ -33,3 +33,8 @@ if [ -f ~/.config/xsettingsd/xsettingsd.conf ]; then pkill -HUP -x xsettingsd gsettings set org.gnome.desktop.interface gtk-theme "${GTK_THEME}" fi + +# waybar +if [ -f ~/.config/waybar/style.css ]; then + sed -i -E "s#file:///.*/(light|dark)[.]css#file://$HOME/.config/waybar/$THEME.css#" ~/.config/waybar/style.css +fi