- 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.
26 lines
603 B
Bash
Executable File
26 lines
603 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Returns the battery time remaining (to empty or full) in a compact format.
|
|
|
|
battery_info=$(upower -i $(upower -e | grep BAT))
|
|
|
|
echo "$battery_info" | awk '/time to (empty|full)/ {
|
|
value = $4
|
|
unit = $5
|
|
if (unit == "minutes") {
|
|
hours = int(value / 60)
|
|
minutes = int(value % 60)
|
|
} else {
|
|
hours = int(value)
|
|
minutes = int((value - hours) * 60)
|
|
}
|
|
if (hours > 0 && minutes > 0) {
|
|
printf "%dh %dm", hours, minutes
|
|
} else if (hours > 0) {
|
|
printf "%dh", hours
|
|
} else {
|
|
printf "%dm", minutes
|
|
}
|
|
exit
|
|
}'
|