Replace Rofi with Walker as application launcher
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.
This commit is contained in:
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
# ABOUTME: Walker-dmenu settings menu that lists desktop files from /usr/share/settings-menu/.
|
||||
# ABOUTME: Reads Name and Icon from .desktop files and launches the selected entry.
|
||||
|
||||
SETTINGS_DIR="/usr/share/settings-menu"
|
||||
|
||||
declare -A EXEC_MAP
|
||||
|
||||
get_name() {
|
||||
local lang
|
||||
lang=$(locale | grep "^LANG=" | cut -d= -f2 | cut -d_ -f1)
|
||||
local find="Name[$lang]="
|
||||
local name
|
||||
|
||||
name=$(grep "^$find" "$1" | tail -1 | sed "s/^$find//" | sed 's/%.//' | sed 's/^"//g' | sed 's/" *$//g')
|
||||
|
||||
if [[ -z "$name" ]]; then
|
||||
name=$(grep "^Name=" "$1" | tail -1 | sed 's/^Name=//' | sed 's/%.//' | sed 's/^"//g' | sed 's/" *$//g')
|
||||
fi
|
||||
|
||||
echo "$name"
|
||||
}
|
||||
|
||||
get_exec() {
|
||||
grep '^Exec=' "$1" | tail -1 | sed 's/^Exec=//' | sed 's/%.//' | sed 's/^"//g' | sed 's/" *$//g'
|
||||
}
|
||||
|
||||
entries=""
|
||||
for file in "$SETTINGS_DIR"/*.desktop; do
|
||||
[[ -f "$file" ]] || continue
|
||||
name=$(get_name "$file")
|
||||
[[ -z "$name" ]] && continue
|
||||
EXEC_MAP["$name"]=$(get_exec "$file")
|
||||
entries+="$name\n"
|
||||
done
|
||||
|
||||
chosen=$(echo -e "$entries" | sed '/^$/d' | sort | walker -d -p "⚙ Settings")
|
||||
|
||||
if [[ -n "$chosen" && -n "${EXEC_MAP[$chosen]}" ]]; then
|
||||
${EXEC_MAP[$chosen]} &disown
|
||||
fi
|
||||
Reference in New Issue
Block a user