feat(fuzze): goodbye rofi;

This commit is contained in:
Barrett Ruth 2026-02-14 15:43:41 -05:00
parent 996d81afb4
commit f1015c40c4
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
8 changed files with 18 additions and 30 deletions

View file

@ -80,7 +80,7 @@ audio)
if [ "$XDG_SESSION_TYPE" = x11 ]; then
choice="$(printf "%s\n" "$sinks" | awk -F'\t' '{print $1": "$2}' | dmenu -i -p "select sink:" | cut -d: -f1)"
else
choice="$(printf "%s\n" "$sinks" | awk -F'\t' '{print $1": "$2}' | rofi -dmenu -i -p "select sink" | cut -d: -f1)"
choice="$(printf "%s\n" "$sinks" | awk -F'\t' '{print $1": "$2}' | fuzzel --dmenu --prompt="sink: " | cut -d: -f1)"
fi
[ "$choice" ] && wpctl set-default "$choice"
;;
@ -90,7 +90,7 @@ audio)
if [ "$XDG_SESSION_TYPE" = x11 ]; then
choice="$(printf "%s\n" "$sources" | awk -F'\t' '{print $1": "$2}' | dmenu -i -p "select source:" | cut -d: -f1)"
else
choice="$(printf "%s\n" "$sources" | awk -F'\t' '{print $1": "$2}' | rofi -dmenu -i -p "select source" | cut -d: -f1)"
choice="$(printf "%s\n" "$sources" | awk -F'\t' '{print $1": "$2}' | fuzzel --dmenu --prompt="source: " | cut -d: -f1)"
fi
[ "$choice" ] && wpctl set-default "$choice"
;;

View file

@ -95,7 +95,7 @@ volume)
fi
;;
pull)
require hyprctl jq rofi
require hyprctl jq fuzzel
APP="$1"
case "$APP" in
google-chrome | google-chrome-stable) CLASS="google-chrome" ;;
@ -147,7 +147,7 @@ pull)
[ -z "$ROFI_LINES" ] && exit 0
SELECTED=$(echo "$ROFI_LINES" | rofi -dmenu -i -p "pull window")
SELECTED=$(echo "$ROFI_LINES" | fuzzel --dmenu --prompt="pull: ")
[ -z "$SELECTED" ] && exit 0
@ -160,7 +160,7 @@ pull)
hyprctl dispatch focuswindow "address:${WIN_ADDR}"
;;
spawnfocus)
require hyprctl jq rofi socat
require hyprctl jq fuzzel socat
WS=""
while [ $# -gt 0 ]; do
case "$1" in
@ -222,7 +222,7 @@ spawnfocus)
elif [ "$WIN_COUNT" -eq 1 ]; then
WIN_ADDR=$(echo "$WIN_ADDRS" | awk -F'\t' '{print $3}')
elif [ "$WIN_COUNT" -gt 1 ]; then
SELECTED=$(echo "$WIN_ADDRS" | awk -F'\t' '{print $1 ": " $2 "\t" $3}' | rofi -dmenu -i -p "select window")
SELECTED=$(echo "$WIN_ADDRS" | awk -F'\t' '{print $1 ": " $2 "\t" $3}' | fuzzel --dmenu --prompt="window: ")
if [ -z "$SELECTED" ]; then
exit 0

View file

@ -20,8 +20,9 @@ else
case "$(uname)" in
Linux)
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
require rofi
theme="$(printf "%s\n" "$themes" | rofi -dmenu -p 'theme')"
require fuzzel
count="$(printf "%s\n" "$themes" | wc -l)"
theme="$(printf "%s\n" "$themes" | fuzzel --dmenu --prompt="theme: " --lines="$count")"
else
require dmenu
theme="$(printf "%s\n" "$themes" | dmenu -p 'select theme: ')"
@ -75,10 +76,6 @@ Linux)
pkill -USR2 waybar
}
rofi_themes="$cfg/rofi/themes"
[ -f "$rofi_themes/$theme.rasi" ] && {
ln -sf "$rofi_themes/$theme.rasi" "$rofi_themes/theme.rasi"
}
hypr_themes="$cfg/hypr/themes"
[ -f "$hypr_themes/$theme.conf" ] && {