]> Freerunner's - dotfiles.git/commitdiff
hypr: update config, add sleep script
authorAndre Ramnitz <tux.rising@gmail.com>
Sun, 24 Dec 2023 16:58:28 +0000 (17:58 +0100)
committerAndre Ramnitz <tux.rising@gmail.com>
Sun, 18 Aug 2024 16:18:52 +0000 (18:18 +0200)
config/hypr/hyprland.conf
config/hypr/scripts/sleep-dpms.sh [new file with mode: 0755]
config/hypr/scripts/sleep.sh [new file with mode: 0755]

index 348ac1e86a4807903c24c2c1b23f754f38b93c28..1d869be53c69243bc4eaf8da1397fa61f9faa8f6 100644 (file)
@@ -24,20 +24,24 @@ env = XDG_SESSION_DESKTOP, Hyprland
 
 exec-once = ~/.config/hypr/scripts/startup.sh
 exec-once = ~/.config/hypr/scripts/daemons.sh
+exec-once = ~/.config/hypr/scripts/sleep.sh
 
 # Source a file (multi-file configs)
 # source = ~/.config/hypr/myColors.conf
 
 # Some default env vars.
-env = GDK_SCALE=1 # scaling XWayland clients
-env = XCURSOR_SIZE,24
-env = QT_QPA_PLATFORM,wayland
+#env = QT_QPA_PLATFORM,wayland,xcb
+#env = QT_AUTO_SCREEN_SCALE_FACTOR,1
 env = QT_QPA_PLATFORMTHEME,qt6ct
-env = GDK_BACKEND=wayland
-env = QT_AUTO_SCREEN_SCALE_FACTOR,1
-env = MOZ_ENABLE_WAYLAND,1
+
+#env = GDK_BACKEND=wayland,xcb
+#env = GDK_SCALE=1 # scaling XWayland clients
 env = GTK_USE_PORTAL,1
 
+env = XCURSOR_SIZE,28
+env = XCURSOR_THEME,BreezeX-Dark
+env = MOZ_ENABLE_WAYLAND,1
+
 # For all categories, see https://wiki.hyprland.org/Configuring/Variables/
 input {
     kb_layout = us
diff --git a/config/hypr/scripts/sleep-dpms.sh b/config/hypr/scripts/sleep-dpms.sh
new file mode 100755 (executable)
index 0000000..c1ffc73
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+swayidle -w timeout 600 'swaylock -f -c 000000' \
+            timeout 900 'hyprctl dispatch dpms off' \
+            resume 'hyprctl dispatch dpms on' \
+            timeout 1200 'loginctl suspend' \
+            before-sleep 'swaylock -f -c 000000' &
+
+
diff --git a/config/hypr/scripts/sleep.sh b/config/hypr/scripts/sleep.sh
new file mode 100755 (executable)
index 0000000..84a09cb
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+swayidle -w timeout 600 'swaylock -f -c 000000' \
+            timeout 1200 'loginctl suspend' \
+            before-sleep 'swaylock -f -c 000000' &
+
+