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