Share a single power profile parser between list and set
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
d211de2ffc
commit
f3878b341c
@@ -27,7 +27,7 @@ case "$action" in
|
||||
*) usage ;;
|
||||
esac
|
||||
|
||||
mapfile -t profiles < <(powerprofilesctl list | awk '/^\s*[* ]\s*[a-zA-Z0-9\-]+:$/ { gsub(/^[*[:space:]]+|:$/,""); print }')
|
||||
mapfile -t profiles < <(omarchy-powerprofiles-list)
|
||||
|
||||
profile_available() {
|
||||
[[ " ${profiles[*]} " == *" $1 "* ]]
|
||||
|
||||
Reference in New Issue
Block a user