petits-scripts-persos/toggle_suspend
2022-02-10 09:05:07 +01:00

9 lines
249 B
Bash
Executable File

#!/bin/sh
if [ -z "$(grep off "/run/user/1000/enable_suspend")" ] ; then
echo off > "$XDG_RUNTIME_DIR/enable_suspend"
notify-send "Sleep mode is now" "off"
else
echo on > "$XDG_RUNTIME_DIR/enable_suspend"
notify-send "Sleep mode is now" "on"
fi