commit 6b8d179d42d217946e12035b33f19a4bb4812ac9 parent 6503831549e20c02cd2a2242b6d10e17d30fde8d Author: Claudio Alessi <smoppy@gmail.com> Date: Sun, 18 Sep 2016 12:15:59 +0200 [acpi] Exports DISPLAY and XAUTHORITY. Diffstat:
M | src/acpi | | | 8 | +++++--- |
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/acpi b/src/acpi @@ -6,14 +6,16 @@ BATTWARNING=12 ACPLUGGED="$(cat $(du -a /sys/devices |grep 'AC0/online' |awk '{print $2}'))" LIDSTATE="$(cat /proc/acpi/button/lid/LID/state |awk '{print $2}')" +export DISPLAY=:0 +export XAUTHORITY=~/.Xauthority + warning() { pct="$1" L=" OK " - xmessage -display :0 -center -buttons "$L" -default "$L" "WARNING: battery level is ${pct}%" & + xmessage -center -buttons "$L" -default "$L" "WARNING: battery level is ${pct}%" & - for i in $(seq 3) - do + for i in $(seq 3); do play -qn synth 00:00.1 sine 500 done }