From 7be1f838c4cdf6d0ff75498bc2a4c201e2c9eb5c Mon Sep 17 00:00:00 2001 From: Lucas Barbieri Date: Fri, 16 Feb 2024 11:18:19 -0300 Subject: [PATCH] add borders based around colorscheme and matching waybar theme when starting --- desktop/configs/hypr/init.conf | 2 +- desktop/configs/hypr/settings.conf | 3 +-- desktop/scripts/hypr.sh | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100755 desktop/scripts/hypr.sh diff --git a/desktop/configs/hypr/init.conf b/desktop/configs/hypr/init.conf index 29736fd..630f63e 100644 --- a/desktop/configs/hypr/init.conf +++ b/desktop/configs/hypr/init.conf @@ -10,5 +10,5 @@ exec-once = rm -rf ~/tmp/* exec-once = corectrl --minimize-systray exec-once = ~/scripts/weechat.sh exec-once = otd-daemon & -exec-once = waybar & exec-once = syncthing & +exec = ~/scripts/hypr.sh diff --git a/desktop/configs/hypr/settings.conf b/desktop/configs/hypr/settings.conf index db327f2..d452917 100644 --- a/desktop/configs/hypr/settings.conf +++ b/desktop/configs/hypr/settings.conf @@ -23,7 +23,6 @@ general { gaps_in = 5 gaps_out = 5 border_size = 2 - col.active_border = rgba(ff0038ee) rgba(33e2c5ee) 45deg col.inactive_border = rgba(595959aa) no_cursor_warps = false layout = master @@ -34,7 +33,7 @@ decoration { blur { enabled = true - size = 2 + size = 3 passes = 2 } diff --git a/desktop/scripts/hypr.sh b/desktop/scripts/hypr.sh new file mode 100755 index 0000000..5bcccce --- /dev/null +++ b/desktop/scripts/hypr.sh @@ -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