From bcff64f0fce952ed066e27599db0b83467a8643d Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 24 Feb 2025 23:19:32 +0100 Subject: [PATCH] Make hyprland-monitord start eww windows with systemd --- home/.config/hyprland-monitord/added.sh | 3 ++- home/.config/hyprland-monitord/init.sh | 8 ++++++-- home/.config/hyprland-monitord/removed.sh | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/home/.config/hyprland-monitord/added.sh b/home/.config/hyprland-monitord/added.sh index 2ae53cb..41a6f90 100755 --- a/home/.config/hyprland-monitord/added.sh +++ b/home/.config/hyprland-monitord/added.sh @@ -5,4 +5,5 @@ MONITOR_ID="$1" MONITOR_NAME="$2" MONITOR_DESCRIPTION="$3" -eww open bar1 +systemctl --user start eww-window@bar1.service +#eww open bar1 diff --git a/home/.config/hyprland-monitord/init.sh b/home/.config/hyprland-monitord/init.sh index 4236d92..23fffde 100755 --- a/home/.config/hyprland-monitord/init.sh +++ b/home/.config/hyprland-monitord/init.sh @@ -9,11 +9,15 @@ if [ "$MONITORS_AMT" -lt 1 ]; then fi if [ "$MONITORS_AMT" -eq 2 ]; then - eww open bar1 + systemctl --user start eww-window@bar1.service + #eww open bar1 fi if [ "$MONITORS_AMT" -eq 1 ]; then - eww active-windows | grep "bar1" && eww close bar1 + if eww active-windows | grep "bar1"; then + systemctl --user stop eww-window@bar1.service + #eww close bar1 + fi fi if [ "$MONITORS_AMT" -gt 2 ]; then diff --git a/home/.config/hyprland-monitord/removed.sh b/home/.config/hyprland-monitord/removed.sh index e9b0900..b9b7a10 100755 --- a/home/.config/hyprland-monitord/removed.sh +++ b/home/.config/hyprland-monitord/removed.sh @@ -3,4 +3,5 @@ set -euo pipefail MONITOR_NAME="$1" -eww close bar1 +systemctl --user stop eww-window@bar1.service +# eww close bar1