feat: auto install laptop utilities for arch
This commit is contained in:
parent
4da070528c
commit
b4fbe47f23
4
env.sh
4
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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user