From 1e534616c74c4b3d1656d2f493f53639ba514852 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sun, 30 Oct 2022 19:33:47 +0100 Subject: [PATCH] Add shortcut for toggling swayidle --- home/.config/hypr/hyprland.conf | 1 + home/.local/bin/scripts/gui/hyprland/toggle-idle | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100755 home/.local/bin/scripts/gui/hyprland/toggle-idle diff --git a/home/.config/hypr/hyprland.conf b/home/.config/hypr/hyprland.conf index 81e464e..9be9060 100644 --- a/home/.config/hypr/hyprland.conf +++ b/home/.config/hypr/hyprland.conf @@ -106,6 +106,7 @@ bind = SUPER_SHIFT, Q, exec, menuprompt --yesno -p "Quit Hyprland?" && hyprctl d # Utilities bind = SUPER_CTRL, L, exec, swaylock -fF bind = SUPER_SHIFT, L, exec, wlogout -p layer-shell +bind = SUPER_SHIFT, T, exec, toggle-idle # Programs bind = SUPER, Return, exec, alacritty diff --git a/home/.local/bin/scripts/gui/hyprland/toggle-idle b/home/.local/bin/scripts/gui/hyprland/toggle-idle new file mode 100755 index 0000000..b2de02a --- /dev/null +++ b/home/.local/bin/scripts/gui/hyprland/toggle-idle @@ -0,0 +1,9 @@ +#!/bin/sh + +if pgrep swayidle >/dev/null; then + killall swayidle + notify-send "Idle" "Idle timeouts disabled" +else + swayidle & disown + notify-send "Idle" "Idle timeouts enabled" +fi