diff --git a/env.sh b/env.sh index ecab141..f474890 100755 --- a/env.sh +++ b/env.sh @@ -74,6 +74,10 @@ has_fish() { has_cmd "$1" } +is_laptop() { + [ -f /sys/class/power_supply/BAT0/capacity ] +} + enhance_vim() { [ "$VIM_MODE" = "enhanced" ] && has_cmd nvim } diff --git a/gui/sysutils.sh b/gui/sysutils.sh index 5f92f89..1a6869c 100755 --- a/gui/sysutils.sh +++ b/gui/sysutils.sh @@ -30,6 +30,11 @@ case "$PM" in sudo systemctl enable bluetooth sudo systemctl start bluetooth fi + # laptop utitlies + if is_laptop; then + sudo apt install \ + acpilght tlp + fi ;; pacman) # for setting up default programs: exo-preferred-applications @@ -52,10 +57,14 @@ case "$PM" in # bluetooth if has_bluetooth; then sudo pacman -S --noconfirm --needed \ - bluez bluez-utils blueman acpilight + bluez bluez-utils blueman sudo systemctl enable bluetooth sudo systemctl start bluetooth fi + if is_laptop; then + sudo pacman -S --noconfirm --needed \ + acpilght tlp + fi ;; esac