aboutsummaryrefslogblamecommitdiff
path: root/.config/swayrbar/scripts/idle-toggle
blob: fd1a796be5c8a45bbe50e3acd582036744f78e15 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                                                                                    
#!/usr/bin/env sh
pid_file="/tmp/wayland-idle-inhibitor-$(id --user).pid"
pid=$(cat "${pid_file}")
if [ -n "${pid}" ]
then
       kill -- "${pid}"
       rm "${pid_file}"
else
       nohup "${HOME}/.config/swayrbar/scripts/wayland-idle-inhibitor.py" > /dev/null 2>&1 & echo $! > "${pid_file}"
fi