Prepare for battery monitor to be installed on first run
This commit is contained in:
parent
bdfc0fad5d
commit
28ba0bff7a
@ -19,7 +19,6 @@ source $OMARCHY_INSTALL/preflight/migrations.sh
|
|||||||
source $OMARCHY_INSTALL/config/config.sh
|
source $OMARCHY_INSTALL/config/config.sh
|
||||||
source $OMARCHY_INSTALL/config/branding.sh
|
source $OMARCHY_INSTALL/config/branding.sh
|
||||||
source $OMARCHY_INSTALL/config/network.sh
|
source $OMARCHY_INSTALL/config/network.sh
|
||||||
source $OMARCHY_INSTALL/config/power.sh
|
|
||||||
source $OMARCHY_INSTALL/config/git.sh
|
source $OMARCHY_INSTALL/config/git.sh
|
||||||
source $OMARCHY_INSTALL/config/gpg.sh
|
source $OMARCHY_INSTALL/config/gpg.sh
|
||||||
source $OMARCHY_INSTALL/config/usb-autosuspend.sh
|
source $OMARCHY_INSTALL/config/usb-autosuspend.sh
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Setting the performance profile can make a big difference. By default, most systems seem to start in balanced mode,
|
|
||||||
# even if they're not running off a battery. So let's make sure that's changed to performance.
|
|
||||||
sudo pacman -S --noconfirm python-gobject power-profiles-daemon
|
|
||||||
|
|
||||||
# FIXME: Can't set powerprofilesctl during CHROOT, must do it afterwards
|
|
||||||
if [ -z "${OMARCHY_CHROOT_INSTALL:-}" ]; then
|
|
||||||
if ls /sys/class/power_supply/BAT* &>/dev/null; then
|
|
||||||
# This computer runs on a battery
|
|
||||||
powerprofilesctl set balanced || true
|
|
||||||
|
|
||||||
# Enable battery monitoring timer for low battery notifications
|
|
||||||
systemctl --user enable --now omarchy-battery-monitor.timer
|
|
||||||
else
|
|
||||||
# This computer runs on power outlet
|
|
||||||
powerprofilesctl set performance || true
|
|
||||||
fi
|
|
||||||
fi
|
|
@ -4,6 +4,7 @@ sudo pacman -S --noconfirm --needed \
|
|||||||
brightnessctl playerctl pamixer wiremix wireplumber \
|
brightnessctl playerctl pamixer wiremix wireplumber \
|
||||||
fcitx5 fcitx5-gtk fcitx5-qt wl-clip-persist \
|
fcitx5 fcitx5-gtk fcitx5-qt wl-clip-persist \
|
||||||
nautilus sushi ffmpegthumbnailer gvfs-mtp \
|
nautilus sushi ffmpegthumbnailer gvfs-mtp \
|
||||||
|
python-gobject power-profiles-daemon \
|
||||||
slurp satty wf-recorder wl-screenrec \
|
slurp satty wf-recorder wl-screenrec \
|
||||||
mpv evince imv \
|
mpv evince imv \
|
||||||
walker-bin omarchy-chromium
|
walker-bin omarchy-chromium
|
||||||
|
12
install/first-run/battery-monitor.sh
Normal file
12
install/first-run/battery-monitor.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if ls /sys/class/power_supply/BAT* &>/dev/null; then
|
||||||
|
# This computer runs on a battery
|
||||||
|
powerprofilesctl set balanced || true
|
||||||
|
|
||||||
|
# Enable battery monitoring timer for low battery notifications
|
||||||
|
systemctl --user enable --now omarchy-battery-monitor.timer
|
||||||
|
else
|
||||||
|
# This computer runs on power outlet
|
||||||
|
powerprofilesctl set performance || true
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user