Gammastep waybar

This commit is contained in:
John Mertz 2022-08-25 23:05:14 -06:00
parent 2c4ef97a1b
commit 156ff9221d
Signed by: jpm
GPG Key ID: E9C5EA2D867501AB
2 changed files with 21 additions and 1 deletions

View File

@ -17,7 +17,7 @@ unless ($pid) {
open STDOUT, '>>/dev/null';
open STDERR, '>>/dev/null';
`gammastep -l $lat_lon -b 1:0.7`;
`gammastep -l $lat_lon -b 0.7:0.3`;
}
sub fetch_lat_lon

20
waybar/waybar-gammastep.sh Executable file
View File

@ -0,0 +1,20 @@
#!/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