Skip to content

Commit ae07e5e

Browse files
committed
Detect if its niri
1 parent 727a446 commit ae07e5e

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎archlinux/install/hyprland/bin/omarchy-cmd-screensaver‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
#!/bin/bash
22

3+
function is_niri {
4+
return $XDG_CURRENT_DESKTOP == "Niri"
5+
}
6+
37
function exit_screensaver {
4-
hyprctl keyword cursor:invisible false
8+
if is_niri; then
9+
hyprctl keyword cursor:invisible false &>/dev/null
10+
fi
511
pkill -x tte 2>/dev/null
612
pkill -f "alacritty --class Screensaver" 2>/dev/null
713
exit 0
814
}
915

1016
trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT
1117

12-
hyprctl keyword cursor:invisible true &>/dev/null
18+
if is_niri; then
19+
hyprctl keyword cursor:invisible true &>/dev/null
20+
fi
21+
1322
printf '\033]11;rgb:00/00/00\007' # Set background color to black
1423

1524
while true; do

0 commit comments

Comments
 (0)