dot/.local/bin/i3scripts/xoffee

24 lines
670 B
Bash
Executable File

#!/bin/bash
## Author: Shaun Reed | Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ##
## ##
## A script to toggle and notify xautolock via polybar menus ##
###############################################################################
# xoffee.sh
if [ $# -ne 1 ]; then
echo "Incorrect number of arguments provided"
exit 1
fi
if [ "$1" = "enable" ]; then
xautolock -disable
notify-send "Caffeine enabled"
elif [ "$1" = "disable" ]; then
xautolock -enable
notify-send "Caffeine disabled"
else
notify-send "Error: Incorrect arg for xoffee script"
exit 1
fi