#!/bin/sh if [ -z "$(grep off "$XDG_RUNTIME_DIR/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