add borders based around colorscheme and matching waybar theme when starting

This commit is contained in:
Lucas Barbieri 2024-02-16 11:18:19 -03:00
parent ff31db83c3
commit 7be1f838c4
3 changed files with 23 additions and 3 deletions

View File

@ -10,5 +10,5 @@ exec-once = rm -rf ~/tmp/*
exec-once = corectrl --minimize-systray exec-once = corectrl --minimize-systray
exec-once = ~/scripts/weechat.sh exec-once = ~/scripts/weechat.sh
exec-once = otd-daemon & exec-once = otd-daemon &
exec-once = waybar &
exec-once = syncthing & exec-once = syncthing &
exec = ~/scripts/hypr.sh

View File

@ -23,7 +23,6 @@ general {
gaps_in = 5 gaps_in = 5
gaps_out = 5 gaps_out = 5
border_size = 2 border_size = 2
col.active_border = rgba(ff0038ee) rgba(33e2c5ee) 45deg
col.inactive_border = rgba(595959aa) col.inactive_border = rgba(595959aa)
no_cursor_warps = false no_cursor_warps = false
layout = master layout = master
@ -34,7 +33,7 @@ decoration {
blur { blur {
enabled = true enabled = true
size = 2 size = 3
passes = 2 passes = 2
} }

21
desktop/scripts/hypr.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# init script
CURRENT_THEME=$(cat ~/colorscheme)
case "$CURRENT_THEME" in
melange)
killall waybar; waybar -s ~/.config/waybar/style-melange.css > /dev/null &
hyprctl keyword general:col.active_border "rgba(7892bdff) rgba(6e9b72ff) 45deg"
;;
white)
killall waybar; waybar -s ~/.config/waybar/style-solarized.css > /dev/null &
# hyprctl keyword general:col.active_border todo
;;
red)
killall waybar; waybar > /dev/null &
hyprctl keyword general:col.active_border "rgba(ff0038ee) rgba(33e2c5ee) 45deg"
;;
*)
exit 0
esac