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:
2026-03-30 12:06:25 +02:00
parent ee5940dec1
commit 4d9cbe7ce2
45 changed files with 1387 additions and 102 deletions
-314
View File
@@ -1,314 +0,0 @@
#!/usr/bin/env bash
# ABOUTME: Rofi-based Bluetooth device manager using bluetoothctl.
# ABOUTME: Supports connecting, pairing, trusting devices, and toggling power/scan/discoverable.
# Author: Nick Clyde (clydedroid)
#
# A script that generates a rofi menu that uses bluetoothctl to
# connect to bluetooth devices and display status info.
#
# Inspired by networkmanager-dmenu (https://github.com/firecat53/networkmanager-dmenu)
# Thanks to x70b1 (https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/system-bluetooth-bluetoothctl)
#
# Depends on:
# Arch repositories: rofi, bluez-utils (contains bluetoothctl)
# Constants
divider="---------"
goback="Back"
# Checks if bluetooth controller is powered on
power_on() {
if bluetoothctl show | grep -q "Powered: yes"; then
return 0
else
return 1
fi
}
# Toggles power state
toggle_power() {
if power_on; then
bluetoothctl power off
show_menu
else
if rfkill list bluetooth | grep -q 'blocked: yes'; then
rfkill unblock bluetooth && sleep 3
fi
bluetoothctl power on
show_menu
fi
}
# Checks if controller is scanning for new devices
scan_on() {
if bluetoothctl show | grep -q "Discovering: yes"; then
echo "Scan: on"
return 0
else
echo "Scan: off"
return 1
fi
}
# Toggles scanning state
toggle_scan() {
if scan_on; then
kill $(pgrep -f "bluetoothctl scan on")
bluetoothctl scan off
show_menu
else
bluetoothctl scan on &
echo "Scanning..."
sleep 5
show_menu
fi
}
# Checks if controller is able to pair to devices
pairable_on() {
if bluetoothctl show | grep -q "Pairable: yes"; then
echo "Pairable: on"
return 0
else
echo "Pairable: off"
return 1
fi
}
# Toggles pairable state
toggle_pairable() {
if pairable_on; then
bluetoothctl pairable off
show_menu
else
bluetoothctl pairable on
show_menu
fi
}
# Checks if controller is discoverable by other devices
discoverable_on() {
if bluetoothctl show | grep -q "Discoverable: yes"; then
echo "Discoverable: on"
return 0
else
echo "Discoverable: off"
return 1
fi
}
# Toggles discoverable state
toggle_discoverable() {
if discoverable_on; then
bluetoothctl discoverable off
show_menu
else
bluetoothctl discoverable on
show_menu
fi
}
# Checks if a device is connected
device_connected() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -q "Connected: yes"; then
return 0
else
return 1
fi
}
# Toggles device connection
toggle_connection() {
if device_connected "$1"; then
bluetoothctl disconnect "$1"
device_menu "$device"
else
bluetoothctl connect "$1"
device_menu "$device"
fi
}
# Checks if a device is paired
device_paired() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -q "Paired: yes"; then
echo "Paired: yes"
return 0
else
echo "Paired: no"
return 1
fi
}
# Toggles device paired state
toggle_paired() {
if device_paired "$1"; then
bluetoothctl remove "$1"
device_menu "$device"
else
bluetoothctl pair "$1"
device_menu "$device"
fi
}
# Checks if a device is trusted
device_trusted() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -q "Trusted: yes"; then
echo "Trusted: yes"
return 0
else
echo "Trusted: no"
return 1
fi
}
# Toggles device connection
toggle_trust() {
if device_trusted "$1"; then
bluetoothctl untrust "$1"
device_menu "$device"
else
bluetoothctl trust "$1"
device_menu "$device"
fi
}
# Prints a short string with the current bluetooth status
# Useful for status bars like polybar, etc.
print_status() {
if power_on; then
printf ''
paired_devices_cmd="devices Paired"
# Check if an outdated version of bluetoothctl is used to preserve backwards compatibility
if (( $(echo "$(bluetoothctl version | cut -d ' ' -f 2) < 5.65" | bc -l) )); then
paired_devices_cmd="paired-devices"
fi
mapfile -t paired_devices < <(bluetoothctl $paired_devices_cmd | grep Device | cut -d ' ' -f 2)
counter=0
for device in "${paired_devices[@]}"; do
if device_connected "$device"; then
device_alias=$(bluetoothctl info "$device" | grep "Alias" | cut -d ' ' -f 2-)
if [ $counter -gt 0 ]; then
printf ", %s" "$device_alias"
else
printf " %s" "$device_alias"
fi
((counter++))
fi
done
printf "\n"
else
echo ""
fi
}
# A submenu for a specific device that allows connecting, pairing, and trusting
device_menu() {
device=$1
# Get device name and mac address
device_name=$(echo "$device" | cut -d ' ' -f 3-)
mac=$(echo "$device" | cut -d ' ' -f 2)
# Build options
if device_connected "$mac"; then
connected="Connected: yes"
else
connected="Connected: no"
fi
paired=$(device_paired "$mac")
trusted=$(device_trusted "$mac")
options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"
# Open rofi menu, read chosen option
chosen="$(echo -e "$options" | $rofi_command "$device_name")"
# Match chosen option to command
case "$chosen" in
"" | "$divider")
echo "No option chosen."
;;
"$connected")
toggle_connection "$mac"
;;
"$paired")
toggle_paired "$mac"
;;
"$trusted")
toggle_trust "$mac"
;;
"$goback")
show_menu
;;
esac
}
# Opens a rofi menu with current bluetooth status and options to connect
show_menu() {
# Get menu options
if power_on; then
power="Power: on"
# Human-readable names of devices, one per line
# If scan is off, will only list paired devices
devices=$(bluetoothctl devices | grep Device | cut -d ' ' -f 3-)
# Get controller flags
scan=$(scan_on)
pairable=$(pairable_on)
discoverable=$(discoverable_on)
# Options passed to rofi
options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
else
power="Power: off"
options="$power\nExit"
fi
# Open rofi menu, read chosen option
chosen="$(echo -e "$options" | $rofi_command "Bluetooth")"
# Match chosen option to command
case "$chosen" in
"" | "$divider")
echo "No option chosen."
;;
"$power")
toggle_power
;;
"$scan")
toggle_scan
;;
"$discoverable")
toggle_discoverable
;;
"$pairable")
toggle_pairable
;;
*)
device=$(bluetoothctl devices | grep "$chosen")
# Open a submenu if a device is selected
if [[ $device ]]; then device_menu "$device"; fi
;;
esac
}
# Rofi command to pipe into, can add any options here
rofi_command="rofi -dmenu $* -p -theme /etc/xdg/rofi/themes/bluetooth.rasi -mesg -Bluetooth-Control"
case "$1" in
--status)
print_status
;;
*)
show_menu
;;
esac
-26
View File
@@ -1,26 +0,0 @@
#!/usr/bin/env bash
# ABOUTME: Rofi-based clipboard history manager using cliphist and wl-copy.
# ABOUTME: Lists clipboard entries and copies the selected one.
CLIPHIST_DB="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/cliphist/db"
function start_rofi() {
local content="$1"
echo -e "$content" | rofi -dmenu -theme /etc/xdg/rofi/themes/clipboard.rasi -mesg "󰅍 Clipboard History"
}
function main() {
local entries
local result
entries=$(cliphist -db-path "$CLIPHIST_DB" list)
result=$(start_rofi "$entries")
if [ -n "$result" ]; then
echo "$result" | cliphist -db-path "$CLIPHIST_DB" decode | wl-copy
else
exit 1
fi
}
main
+3 -4
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# ABOUTME: Rofi-based CPU governor switcher using auto-cpufreq.
# ABOUTME: Walker-dmenu CPU governor switcher using auto-cpufreq.
# ABOUTME: Allows switching between performance, powersave, and reset modes.
declare -A LABELS
@@ -38,8 +38,7 @@ function print_menu()
##
function start()
{
# print_menu | rofi -dmenu -p "?=>"
print_menu | sort | rofi -theme /etc/xdg/rofi/themes/cpugov.rasi -show "CPU Modes" -dmenu -mesg "󰓅 CPU Modes" -i -p "rofi-bangs: "
print_menu | sort | walker -d -p "󰓅 CPU Mode"
}
@@ -66,5 +65,5 @@ then
notify-send -h string:x-canonical-private-synchronous:cpugov -i cpu "CPU Mode" "Set to $choice ${LABELS[$choice]}"
else
echo "Unknown command: ${choice}" | rofi -dmenu -p "error"
notify-send -u critical "CPU Governor" "Unknown command: ${choice}"
fi
-24
View File
@@ -1,24 +0,0 @@
#!/usr/bin/env bash
# ABOUTME: Application launcher using rofi with Catppuccin Mocha theme.
# ABOUTME: Supports window, files, run, and drun modes.
case $1 in
window)
showmode="window"
;;
files)
showmode="filebrowser"
;;
run)
showmode="run"
;;
*)
showmode="drun"
;;
esac
## Run
rofi \
-show $showmode \
-click-to-exit \
-theme /etc/xdg/rofi/themes/launcher.rasi
-66
View File
@@ -1,66 +0,0 @@
#!/usr/bin/env bash
# ABOUTME: Rofi script mode that lists desktop files from /usr/share/settings-menu/.
# ABOUTME: Used with rofi -show fb -modes "fb:moonarch-setmen" for a settings launcher.
####
# @author moonarch.de (nevaforget)
# script used with rofi to list desktop files of specific dir
# dir: /usr/share/settings-menu/
# @example rofi -show fb -modes "fb:moonarch-setmen" -theme /etc/xdg/rofi/themes/settings-menu.rasi
# @dependencies glib >= 2.67.2
####
function get_name {
local lang=$(locale | grep LANG | cut -d= -f2 | cut -d_ -f1)
local find="Name\[$lang\]="
local name=$(grep "^$find" $1 | tail -1 | sed "s/^$find//" | sed 's/%.//' | sed 's/^"//g' | sed 's/" *$//g')
if [ "${name}" = "" ]
then
find="Name="
name=$(grep "^$find" $1 | tail -1 | sed "s/^$find//" | sed 's/%.//' | sed 's/^"//g' | sed 's/" *$//g')
fi
echo "$name"
}
if [ "$ROFI_RETV" = "1" ]
then
for deskfile in /usr/share/settings-menu/*
do
match=$(grep "^Name" $deskfile | grep "$@" )
if [ -n "$match" ]
then
#gio launch $deskfile
# old way
app=$(grep '^Exec' $deskfile | tail -1 | sed 's/^Exec=//' | sed 's/%.//' | sed 's/^"//g' | sed 's/" *$//g')
coproc ( $app > /dev/null 2>&1 )
break
fi
done
exit 0
fi
function init {
for file in /usr/share/settings-menu/*
do
local name=$(get_name "$file")
local iconline=$(sed -n -e '/^Icon=/p' "$file")
local icon=${iconline/Icon=/""}
if [ -n "$name" ]
then
echo -en "$name\0icon\x1f$icon\n"
fi
done
}
init
+2 -2
View File
@@ -1,11 +1,11 @@
#!/usr/bin/bash
# ABOUTME: Rofi-based PulseAudio sink switcher using pactl.
# ABOUTME: Walker-dmenu PulseAudio sink switcher using pactl.
# ABOUTME: Changes the default sink and moves all active streams to it.
# choose audio sink via rofi
# changes default sink and moves all streams to that sink
sink=$(pactl list sinks short | awk '{print $1, $2}' | rofi -dmenu -theme '/etc/xdg/rofi/themes/volume.rasi' -mesg '󱡫 Sink Switcher' -p 'audio sink:' -location 6 -width 100 | awk '{print $1}') &&
sink=$(pactl list sinks short | awk '{print $1, $2}' | walker -d -p "󱡫 Sink Switcher" | awk '{print $1}') &&
pactl set-default-sink "$sink" &&
for input in $(pactl list sink-inputs short | awk '{print $1}'); do
-122
View File
@@ -1,122 +0,0 @@
#!/usr/bin/env bash
# ABOUTME: Rofi-based volume control applet for managing speakers and microphone.
# ABOUTME: Provides mute toggles, sink switching, mixer access, and NoiseTorch.
## Author : Aditya Shakya (adi1090x)
## Github : @adi1090x
#
## Applets : Volume
theme="/etc/xdg/rofi/themes/volume.rasi"
# Volume Info
mixer="`amixer info Master | grep 'Mixer name' | cut -d':' -f2 | tr -d \',' '`"
speaker="`amixer get Master | tail -n1 | awk -F ' ' '{print $5}' | tr -d '[]'`"
mic="`amixer get Capture | tail -n1 | awk -F ' ' '{print $5}' | tr -d '[]'`"
active=""
urgent=""
# Speaker Info
amixer get Master | grep '\[on\]' &>/dev/null
if [[ "$?" == 0 ]]; then
active="-a 1"
stext='Mute Speaker'
sicon='󰓃'
else
urgent="-u 1"
stext='Unmute Speaker'
sicon='󰓄'
fi
# Microphone Info
amixer get Capture | grep '\[on\]' &>/dev/null
if [[ "$?" == 0 ]]; then
[ -n "$active" ] && active+=",3" || active="-a 3"
mtext='Mute Mic'
micon=''
else
[ -n "$urgent" ] && urgent+=",3" || urgent="-u 3"
mtext='Unmute Mic'
micon=''
fi
currentsink=$(pactl get-default-sink)
currentsource=$(pactl get-default-source)
# Theme Elements
prompt="Speaker: $sicon Mic: $micon "
mesg="$mixer Speaker: $speaker Mic: $mic"
list_col='6'
list_row='3'
win_width='670px'
# Options
option_1="$micon $mtext $currentsource"
option_2="$sicon $stext $currentsink"
option_3="󱡫 Sink Switcher"
option_4=""
option_5=" Mixer"
option_6="󰍯 Noise Torch"
# Rofi CMD
#-theme-str "listview {columns: $list_col; lines: $list_row;}" \
rofi_cmd() {
rofi -theme-str "window {width: $win_width;}" \
-dmenu \
-p "$prompt" \
-mesg "$mesg" \
${active} ${urgent} \
-markup-rows \
-theme ${theme}
}
# Pass variables to rofi dmenu
run_rofi() {
echo -e "$option_1\n$option_2\n$option_3\n$option_4\n$option_5\n$option_6" | rofi_cmd
}
# Execute Command
run_cmd() {
if [[ "$1" == '--opt3' ]]; then
#amixer -Mq set Master,0 5%+ unmute
moonarch-sink-switcher
elif [[ "$1" == '--opt2' ]]; then
amixer set Master toggle
elif [[ "$1" == '--opt4' ]]; then
amixer -Mq set Master,0 5%- unmute
elif [[ "$1" == '--opt1' ]]; then
amixer set Capture toggle
elif [[ "$1" == '--opt5' ]]; then
pavucontrol
elif [[ "$1" == '--opt6' ]]; then
noisetorch
fi
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
$option_1)
run_cmd --opt1
;;
$option_2)
run_cmd --opt2
;;
$option_3)
run_cmd --opt3
;;
$option_4)
run_cmd --opt4
;;
$option_5)
run_cmd --opt5
;;
$option_6)
run_cmd --opt6
;;
esac
+2 -2
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# ABOUTME: Rofi-based VPN connection manager using NetworkManager (nmcli).
# ABOUTME: Walker-dmenu VPN connection manager using NetworkManager (nmcli).
# ABOUTME: Lists VPN connections and toggles them on/off.
# Copyright (C) 2021 Damien Cassou
@@ -80,7 +80,7 @@ function extract_connection_name_from_result() {
# used as lines to select from.
function start_rofi() {
local content="$1"
echo -e "$content" | rofi -dmenu -theme /etc/xdg/rofi/themes/vpn.rasi -mesg "󰖂 VPN Connection Manager" -icon "󰖂"
echo -e "$content" | walker -d -p "󰖂 VPN"
}
# List the VPN connections and let the user toggle one using rofi.