Hypridle, searxng
This commit is contained in:
parent
9ff8e28664
commit
d0fc98ca4f
3 changed files with 28 additions and 0 deletions
16
hypridle/.config/hypr/hypridle.conf
Normal file
16
hypridle/.config/hypr/hypridle.conf
Normal file
|
|
@ -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'
|
||||||
|
}
|
||||||
7
hypridle/.config/hypr/suspend-script.sh
Executable file
7
hypridle/.config/hypr/suspend-script.sh
Executable file
|
|
@ -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
|
||||||
5
niri/bin/start-searxng.sh
Executable file
5
niri/bin/start-searxng.sh
Executable file
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue