From d0fc98ca4f6317e070228519c889a9958af0e79e Mon Sep 17 00:00:00 2001 From: Aleksandr Lebedev Date: Thu, 5 Feb 2026 13:06:33 +0100 Subject: [PATCH] Hypridle, searxng --- hypridle/.config/hypr/hypridle.conf | 16 ++++++++++++++++ hypridle/.config/hypr/suspend-script.sh | 7 +++++++ niri/bin/start-searxng.sh | 5 +++++ 3 files changed, 28 insertions(+) create mode 100644 hypridle/.config/hypr/hypridle.conf create mode 100755 hypridle/.config/hypr/suspend-script.sh create mode 100755 niri/bin/start-searxng.sh diff --git a/hypridle/.config/hypr/hypridle.conf b/hypridle/.config/hypr/hypridle.conf new file mode 100644 index 0000000..4c91ed4 --- /dev/null +++ b/hypridle/.config/hypr/hypridle.conf @@ -0,0 +1,16 @@ +general { + lock_cmd = qs ipc call lock lock + before_sleep_cmd = loginctl lock-session + ignore_dbus_inhibit = false + ignore_systemd_inhibit = false +} + +listener { + timeout = 870 + on-timeout = ~/.config/hypr/suspend-script.sh 'notify-send "You are idle. Going to sleep in 30 seconds"' +} + +listener { + timeout = 900 + on-timeout = ~/.config/hypr/suspend-script.sh 'loginctl suspend' +} \ No newline at end of file diff --git a/hypridle/.config/hypr/suspend-script.sh b/hypridle/.config/hypr/suspend-script.sh new file mode 100755 index 0000000..3b9f9ea --- /dev/null +++ b/hypridle/.config/hypr/suspend-script.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + # check if any player has status "Playing" +playerctl -a status | pkgs.ripgrep Playing -q +# only suspend if nothing is playing +if [ $? == 1 ]; then + bash -c $1 +fi diff --git a/niri/bin/start-searxng.sh b/niri/bin/start-searxng.sh new file mode 100755 index 0000000..8a12b9a --- /dev/null +++ b/niri/bin/start-searxng.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +cd "$HOME/Git/searxng" +. venv/bin/activate +export SEARXNG_SETTINGS_PATH="$HOME/Git/searxng/searx/settings.yml" +exec python searx/webapp.py