diff --git a/.config/hypr/hyprlock.conf b/.config/hypr/hyprlock.conf index 87589ef..05d96bb 100644 --- a/.config/hypr/hyprlock.conf +++ b/.config/hypr/hyprlock.conf @@ -52,6 +52,8 @@ label { shadow_size = 10 } +source = hyprlock-battery.conf + image { monitor = path = ~/.local/share/avatar.jpg diff --git a/.config/hypr/includes/battery-label.conf b/.config/hypr/includes/battery-label.conf new file mode 100644 index 0000000..75334bc --- /dev/null +++ b/.config/hypr/includes/battery-label.conf @@ -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 +} diff --git a/modules/02-symlinks.sh b/modules/02-symlinks.sh index 3383a91..b12c854 100755 --- a/modules/02-symlinks.sh +++ b/modules/02-symlinks.sh @@ -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