Walker (GTK4 + Elephant backend) replaces rofi-lbonn-wayland-git as the central launcher and menu framework. Native Walker providers replace 5 custom rofi scripts: - App launcher (desktopapplications provider) - Clipboard (clipboard provider, replaces cliphist frontend) - Bluetooth (bluetooth provider, replaces bluetoothctl script) - Volume/audio (wireplumber provider) - Sink switcher (wireplumber provider) 3 scripts ported to Walker dmenu mode: - moonarch-vpn (nmcli) - moonarch-cpugov (auto-cpufreq) - moonarch-sink-switcher (pactl) Settings menu (moonarch-setmen) removed — apps are findable via Walker app search directly. Walker theme (gtk-inherit) inherits all colors from the active GTK4 theme instead of hardcoding Catppuccin values. Walker and Elephant run as systemd user services for instant startup. Also standardizes GTK theme to Colloid-Grey-Dark-Catppuccin across all config files (was inconsistent between gsettings and file configs). Old rofi configs preserved in legacy/rofi/ for reference.
70 lines
1.4 KiB
Bash
Executable File
70 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# ABOUTME: Walker-dmenu CPU governor switcher using auto-cpufreq.
|
|
# ABOUTME: Allows switching between performance, powersave, and reset modes.
|
|
|
|
declare -A LABELS
|
|
declare -A COMMANDS
|
|
|
|
###
|
|
# List of defined 'bangs'
|
|
|
|
COMMANDS[""]="pkexec auto-cpufreq --force=performance"
|
|
LABELS[""]="Performance"
|
|
|
|
COMMANDS[""]='pkexec auto-cpufreq --force=powersave'
|
|
LABELS[""]="Powersave"
|
|
|
|
COMMANDS[""]='pkexec auto-cpufreq --force=reset'
|
|
LABELS[""]="Reset"
|
|
|
|
|
|
################################################################################
|
|
# do not edit below
|
|
################################################################################
|
|
##
|
|
# Generate menu
|
|
##
|
|
function print_menu()
|
|
{
|
|
for key in ${!LABELS[@]}
|
|
do
|
|
# echo "$key ${LABELS}"
|
|
echo "$key ${LABELS[$key]}"
|
|
# my top version just shows the first field in labels row, not two words side by side
|
|
done
|
|
}
|
|
##
|
|
# Show rofi.
|
|
##
|
|
function start()
|
|
{
|
|
print_menu | sort | walker -d -p " CPU Mode"
|
|
}
|
|
|
|
|
|
# Run it
|
|
value="$(start)"
|
|
|
|
# Split input.
|
|
# grab upto first space.
|
|
choice=${value%%\ *}
|
|
|
|
##
|
|
# Cancelled? bail out
|
|
##
|
|
if test -z "${choice}"
|
|
then
|
|
exit
|
|
fi
|
|
|
|
# check if choice exists
|
|
if test "${COMMANDS[$choice]+isset}"
|
|
then
|
|
# Execute the choice
|
|
${COMMANDS[$choice]}
|
|
|
|
notify-send -h string:x-canonical-private-synchronous:cpugov -i cpu "CPU Mode" "Set to $choice ${LABELS[$choice]}"
|
|
else
|
|
notify-send -u critical "CPU Governor" "Unknown command: ${choice}"
|
|
fi
|