diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-12-10 14:21:27 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-12-10 14:21:27 +0100 |
commit | 5b1d2d056ec846e47fdc259521513a06a70a7125 (patch) | |
tree | 5d331d54d246b2b00d396698f77fb681214cb6a0 | |
parent | e679621edc8ca542f396f6e7a4682636a5d30d73 (diff) |
update darkroom script and add `lights` script
-rwxr-xr-x | .local/share/bin/darkroom | 6 | ||||
-rwxr-xr-x | .local/share/bin/lights | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/.local/share/bin/darkroom b/.local/share/bin/darkroom index 1860613..28e2589 100755 --- a/.local/share/bin/darkroom +++ b/.local/share/bin/darkroom @@ -10,9 +10,11 @@ mxr() { if [ -e "$XDG_CACHE_HOME/darkroom" ]; then rm -f "$XDG_CACHE_HOME/darkroom" - mxr --gamma '1:1:1' --brightness '1.0' + mxr --gamma '1:1:1' else mkdir -p "$XDG_CACHE_HOME" touch "$XDG_CACHE_HOME/darkroom" - mxr --gamma '1:0.0001:0.0001' --brightness '-1.0' + killall -q redshift # redshift hijacks gamma + mxr --gamma '1:0.0001:0.0001' + lights darkroom fi diff --git a/.local/share/bin/lights b/.local/share/bin/lights new file mode 100755 index 0000000..d76782f --- /dev/null +++ b/.local/share/bin/lights @@ -0,0 +1,5 @@ +#!/bin/sh +cmd="$1" +[[ -z "$cmd" ]] && cmd="toggle" +curl -X POST "$HASS_SERVER/api/webhook/$cmd" + |