From 2e8afef36dbd667d7d83b4e056b8a8acb3e2c918 Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Mon, 18 Sep 2023 19:46:41 +0200 Subject: [PATCH] Add swayidle script --- CHANGELOG | 1 + hypr/hyprland.conf | 1 + scripts/lockscreentime.sh | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100755 scripts/lockscreentime.sh diff --git a/CHANGELOG b/CHANGELOG index 60c22e6..6a4cd63 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.2 - Hyprland: Prefer dark theme for gtk3 applications e.g., nautilus - Hyprland: Add keybinding for filemanager.sh SUPER, CTRL, F to start nautilus (if installed) or thunar - Installation: Add nautilus package to become new default file manager +- Hyprland install script: Add swayidle to 2-install-hyprland.sh - Waybar: Add quickstart icon for filemanager.sh - Waybar: Style improvements diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 6db4d11..4e02ba9 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -30,6 +30,7 @@ exec-once = ~/dotfiles/waybar/launch.sh exec-once = ~/dotfiles/scripts/updatewal-swww.sh exec-once = dunst exec-once = ~/dotfiles/hypr/gtk.sh +exec-once = ~/dotfiles/scripts/lockscreentime.sh # ----------------------------------------------------- # Load pywal color file diff --git a/scripts/lockscreentime.sh b/scripts/lockscreentime.sh new file mode 100755 index 0000000..b109ca1 --- /dev/null +++ b/scripts/lockscreentime.sh @@ -0,0 +1,8 @@ +#/bin/sh + +if [ -f "/usr/bin/swayidle" ]; then + echo "swayidle is installed." + swayidle -w timeout 60 'swaylock -f' timeout 100 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' +else + echo "swayidle not installed." +fi;