- Relocate themes to assets/themes/ and update all references. - Implement custom SDDM theme and Plymouth theme enhancements. - Add themed templates for Alacritty, Hyprland, Waybar, and other apps. - Introduce Makima key remapper module and configuration. - Add Voxtype and Walker configurations. - Implement systemd power management and timeout optimizations. - Add Nautilus-python extensions for LocalSend. - Update branding assets and ASCII art integration.
29 lines
881 B
Bash
Executable File
29 lines
881 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Returns a formatted battery status string with percentage and power draw/charge.
|
|
# Used by the battery notification hotkey (Ctrl + Shift + Super + B).
|
|
|
|
battery_info=$(upower -i $(upower -e | grep BAT))
|
|
|
|
percentage=$(echo "$battery_info" | awk '/percentage/ {
|
|
print int($2)
|
|
exit
|
|
}')
|
|
|
|
power_rate=$(echo "$battery_info" | awk '/energy-rate/ {
|
|
rounded = sprintf("%.1f", $2)
|
|
sub(/\.0$/, "", rounded)
|
|
print rounded
|
|
exit
|
|
}')
|
|
|
|
state=$(echo "$battery_info" | awk '/state/ { print $2; exit }')
|
|
time_remaining=$(nnomarchy-battery-remaining-time)
|
|
capacity=$(nnomarchy-battery-capacity)
|
|
|
|
if [[ $state == "charging" ]]; then
|
|
echo " Battery ${percentage}% · ${time_remaining} to full · ${power_rate}W / ${capacity}Wh"
|
|
else
|
|
echo " Battery ${percentage}% · ${time_remaining} left · ${power_rate}W / ${capacity}Wh"
|
|
fi
|