Vendor the command set the menu and shell depend on

This commit is contained in:
2026-09-19 23:57:12 -04:00
parent 9501f2bb4d
commit c5434026a8
179 changed files with 12414 additions and 54 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
# blob:summary=Returns a list of all the available power profiles on the system.
# blob:args=[--active-state]
if [[ ${1:-} != "" && ${1:-} != "--active-state" ]]; then
echo "Usage: blob-power-list [--active-state]" >&2
exit 1
fi
powerprofilesctl list 2>/dev/null |
awk -v with_state="${1:+1}" '/^\s*[* ]\s*[a-zA-Z0-9-]+:$/ {
active = ($1 == "*") ? 1 : 0
gsub(/^[*[:space:]]+|:$/, "")
print $0 (with_state ? "\t" active : "")
}' |
tac