#!/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