feat(symlinks, hyprlock): add battery label config for laptops and update hyprlock to source battery fragment

This commit is contained in:
Martin Büchler 2025-08-14 23:26:06 +02:00
parent 98e2dfe5a4
commit 4f06bad41b
3 changed files with 18 additions and 0 deletions

View File

@ -52,6 +52,8 @@ label {
shadow_size = 10
}
source = hyprlock-battery.conf
image {
monitor =
path = ~/.local/share/avatar.jpg

View File

@ -0,0 +1,12 @@
label {
monitor =
text = cmd[update:10000] cat /sys/class/power_supply/BAT0/capacity | awk '{print $1 "%"}'
color = rgb(221, 194, 160) # Rose Pine text
font_size = 20
font_family = JetBrainsMono
position = 40, 160
halign = left
valign = bottom
shadow_passes = 5
shadow_size = 10
}

View File

@ -96,6 +96,10 @@ if [ -d "$CONFIG_DIR" ]; then
"hypr/includes/hypridle-$DOTFILES_DEVICE.conf:hypr/hypridle.conf" # Idle config per device type
"waybar/config-$DOTFILES_DEVICE:waybar/config" # Waybar config per device type
)
# Add battery label for laptops
if [ "$DOTFILES_DEVICE" = "laptop" ]; then
fragment_types+=("hypr/includes/battery-label.conf:hyprlock-battery.conf")
fi
# Symlink each device-specific fragment
for fragment in "${fragment_types[@]}"; do