scripts/waybar/waybar-gammastep.sh

21 lines
490 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
RUNNING=$(pgrep gammastep)
if [[ $1 == 'toggle' ]]; then
echo "toggling"
if [ "$RUNNING" ]; then
kill -9 $RUNNING 2&>1 /dev/null
else
$HOME/scripts/sway/gammastep.pl
fi
RUNNING=$(pgrep gammastep)
fi
if [ "$RUNNING" ]; then
echo '{"text":"ɣ","icon":"ɣ","tooltip":"Disable Gammastep","class":"enabled"}'
else
echo '{"text":"ɣ","icon":"ɣ","tooltip":"Enable Gammastep","class":"disabled"}'
fi