mirror of
https://git.sr.ht/~coasteen/dotfiles
synced 2026-02-04 06:03:45 +01:00
13 lines
312 B
Bash
Executable file
13 lines
312 B
Bash
Executable file
#!/bin/sh
|
|
|
|
outputs_json="$(niri msg --json outputs)"
|
|
|
|
echo "$outputs_json" | jq -c '.[]' | while read -r out; do
|
|
name=$(echo "$out" | jq -r '.name')
|
|
dpms=$(echo "$out" | jq -r '.dpms')
|
|
|
|
if [ "$dpms" = "On" ]; then
|
|
echo "Turning off $name"
|
|
niri msg output "$name" dpms off
|
|
fi
|
|
done
|