summaryrefslogtreecommitdiff
path: root/archsetup
diff options
context:
space:
mode:
Diffstat (limited to 'archsetup')
-rwxr-xr-xarchsetup12
1 files changed, 12 insertions, 0 deletions
diff --git a/archsetup b/archsetup
index 63e53ec..2b23a71 100755
--- a/archsetup
+++ b/archsetup
@@ -833,6 +833,17 @@ user_customizations() {
action="linking hyprland dotfiles" && display "task" "$action"
(cd "$dotfiles_dir" && stow --target="/home/$username" --no-folding --adopt hyprland \
>> "$logfile" 2>&1 ) || error_warn "$action" "$?"
+
+ # Remove battery module from waybar config on desktops (no battery)
+ if ! ls /sys/class/power_supply/BAT* &>/dev/null; then
+ action="removing waybar battery module (no battery detected)" && display "task" "$action"
+ waybar_config="/home/$username/.config/waybar/config"
+ # Remove "battery" from sysmonitor modules array and fix trailing comma
+ sed -i '/"battery"$/d' "$waybar_config"
+ sed -i 's/"custom\/disk",/"custom\/disk"/' "$waybar_config"
+ # Remove the battery config block
+ sed -i '/"battery": {/,/^ },$/d' "$waybar_config"
+ fi
fi
# Refresh font cache for any fonts in dotfiles
@@ -870,6 +881,7 @@ user_customizations() {
mkdir -p -m 751 "/home/$username/pictures/screenshots"
mkdir -p -m 751 "/home/$username/videos"
mkdir -p -m 751 "/home/$username/vms"
+ mkdir -p -m 751 "/home/$username/.local/var/log"
chown -R "$username": "/home/$username"
mkdir -p -m 751 /media/backup