From 2f0a40febd768230e895c38c77083bcc4d2fa851 Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Fri, 18 Nov 2022 23:27:26 +0100 Subject: [PATCH] disable power-manager on PC --- bin/mabox-langfiles | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/mabox-langfiles b/bin/mabox-langfiles index b1a88f4..b34ceb3 100755 --- a/bin/mabox-langfiles +++ b/bin/mabox-langfiles @@ -1,6 +1,7 @@ #!/bin/bash # Firstboot script # Copy i18n files to ~ if available +# Check if Laptop|Notebook, otherwise disable power-manager # Run only once invoked from openbox autostart LNG=${LANG:0:2} FILE="$HOME/.config/mabox/.lang" @@ -12,7 +13,14 @@ if [ ! -f "$FILE" ]; then fi echo "selenized-black" > $HOME/.theme_history # Power manager and tint2 native battery indicator only needed on Laptop/Netbook - + TYPE=$(cat /sys/class/dmi/id/chassis_type) + case "$TYPE" in + 8|9|10|14):;; + *) + echo "Hidden=true" >> "$HOME"/.config/autostart/xfce4-power-manager.desktop + ;; + esac + touch $HOME/.config/mabox/.lang fi