From f63dc663a62b2858d17cba49640f73928507037a Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 21 Dec 2023 16:42:38 +0100 Subject: [run-virt] Run xfce4-power-manager if we have a backlight --- .../openslx/scripts/start-useful-session-daemons | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 core/modules/bwlp-desktop-tweaks/data/opt/openslx/scripts/start-useful-session-daemons (limited to 'core/modules/bwlp-desktop-tweaks') diff --git a/core/modules/bwlp-desktop-tweaks/data/opt/openslx/scripts/start-useful-session-daemons b/core/modules/bwlp-desktop-tweaks/data/opt/openslx/scripts/start-useful-session-daemons new file mode 100755 index 00000000..bdbc253d --- /dev/null +++ b/core/modules/bwlp-desktop-tweaks/data/opt/openslx/scripts/start-useful-session-daemons @@ -0,0 +1,24 @@ +#!/bin/sh + +# Check environment + +file="/sys/class/backlight/intel_backlight/max_brightness" +if ! [ -e "$file" ]; then + for file in /sys/class/backlight/*/max_brightness; do + break + done +fi +have_backlight=false +[ -e "$file" ] && have_backlight=true + +# +# Run daemons +# + +# xfce4-power-manager + +if $have_backlight; then + xfce4-power-manager & +fi + +exit 0 -- cgit v1.2.3-55-g7522