Krolyxon
Commit ffeaf34

Branches

Refs →

auroraffeaf34

move to fuzzel from rofi

rofi is bad when it comes to fuzzy matching and also you cannot execute
command as it is, for example you cannot pass arguements to commands
like "setwall -m".
Fuzzel is way simpler, natively supports wayland and is a drop in
replacement for dmenu.
Author
krolxon
Date
2025-08-25 15:44 +0530
Parent
a81ab03
Commit
ffeaf344c429ab195160be967a5fb62346f3eed9

+58 −233

15 files changed

  1. A .config/fuzzel/fuzzel.ini +29 −0
  2. M .config/newsboat/urls +1 −0
  3. D .config/rofi/config.rasi +0 −209
  4. M .config/shell/profile +1 −1
  5. M .config/waybar/scripts/envyswitch.sh +1 −1
  6. M .config/yazi/keymap.toml +3 −2
  7. A .local/bin/askpass-fuzzel +12 −0
  8. R .local/bin/rofiunicode → .local/bin/fuzzelunicode +1 −1
  9. M .local/bin/madd +1 −1
  10. M .local/bin/mounter +4 −4
  11. M .local/bin/movie +1 −1
  12. D .local/bin/rofipass +0 −9
  13. M .local/bin/screenshot +1 −1
  14. M .local/bin/sysact +1 −1
  15. M .local/bin/unmounter +2 −2
A .config/fuzzel/fuzzel.ini View
@@ -0,0 +1,29 @@
1+[main]
2+dpi-aware=no
3+lines=10
4+filter-desktop=yes
5+icon-theme=Papirus-Dark
6+font=Fira Code:size=12
7+terminal=foot -e
8+list-executables-in-path=yes
9+password-character=*
10+width=80
11+horizontal-pad=10
12+vertical-pad=10
13+inner-pad=5
14+
15+[colors]
16+background=1e1e2edd
17+text=cdd6f4ff
18+prompt=bac2deff
19+placeholder=7f849cff
20+input=cdd6f4ff
21+match=89b4faff
22+selection=585b70ff
23+selection-text=cdd6f4ff
24+selection-match=89b4faff
25+counter=7f849cff
26+border=89b4faff
27+
28+[key-bindings]
29+execute-input=Control+Return Shift+KP_Enter
M .config/newsboat/urls View
@@ -15,3 +15,4 @@ https://lukesmith.xyz/rss.xml
1515 https://landchad.net/rss
1616 https://togglebit.io/atom.xml
1717 https://ben.page/rss
18+https://albert.nz/rss.xml
D .config/rofi/config.rasi View
@@ -1,209 +0,0 @@
1−configuration {
2− modi: "run,drun,window";
3− matching: "fuzzy";
4− terminal: "foot";
5− sort: true;
6− case-sensitive: false;
7− disable-history: true;
8− font: "Fira Code 11";
9− window-format: "{w} · {c} · {t}";
10−}
11−
12−* {
13− rosewater: #f5e0dc;
14− flamingo: #f2cdcd;
15− pink: #f5c2e7;
16− mauve: #cba6f7;
17− red: #f38ba8;
18− maroon: #eba0ac;
19− peach: #fab387;
20− yellow: #f9e2af;
21− green: #a6e3a1;
22− teal: #94e2d5;
23− sky: #89dceb;
24− sapphire: #74c7ec;
25− blue: #89b4fa;
26− lavender: #b4befe;
27− text: #cdd6f4;
28− subtext1: #bac2de;
29− subtext0: #a6adc8;
30− overlay2: #9399b2;
31− overlay1: #7f849c;
32− overlay0: #6c7086;
33− surface2: #585b70;
34− surface1: #45475a;
35− surface0: #313244;
36− base: #1e1e2e;
37− mantle: #181825;
38− crust: #11111b;
39−}
40−
41−* {
42− selected-active-foreground: @background;
43− lightfg: @text;
44− separatorcolor: @foreground;
45− urgent-foreground: @red;
46− alternate-urgent-background: @lightbg;
47− lightbg: @mantle;
48− background-color: transparent;
49− border-color: @foreground;
50− normal-background: @background;
51− selected-urgent-background: @red;
52− alternate-active-background: @lightbg;
53− spacing: 2;
54− alternate-normal-foreground: @foreground;
55− urgent-background: @background;
56− selected-normal-foreground: @lightbg;
57− active-foreground: @blue;
58− background: @base;
59− selected-active-background: @blue;
60− active-background: @background;
61− selected-normal-background: @lightfg;
62− alternate-normal-background: @lightbg;
63− foreground: @text;
64− selected-urgent-foreground: @background;
65− normal-foreground: @foreground;
66− alternate-urgent-foreground: @red;
67− alternate-active-foreground: @blue;
68−
69−}
70−element {
71− cursor: pointer;
72− spacing: 5px ;
73− border: 0;
74−}
75−element normal.normal {
76− background-color: @normal-background;
77− text-color: @normal-foreground;
78−}
79−element normal.urgent {
80− background-color: @urgent-background;
81− text-color: @urgent-foreground;
82−}
83−element normal.active {
84− background-color: @active-background;
85− text-color: @active-foreground;
86−}
87−element selected.normal {
88− background-color: @selected-normal-background;
89− text-color: @selected-normal-foreground;
90−}
91−element selected.urgent {
92− background-color: @selected-urgent-background;
93− text-color: @selected-urgent-foreground;
94−}
95−element selected.active {
96− background-color: @selected-active-background;
97− text-color: @selected-active-foreground;
98−}
99−element alternate.normal {
100− background-color: @alternate-normal-background;
101− text-color: @alternate-normal-foreground;
102−}
103−element alternate.urgent {
104− background-color: @alternate-urgent-background;
105− text-color: @alternate-urgent-foreground;
106−}
107−element alternate.active {
108− background-color: @alternate-active-background;
109− text-color: @alternate-active-foreground;
110−}
111−element-text {
112− background-color: transparent;
113− cursor: inherit;
114− highlight: inherit;
115− text-color: inherit;
116−}
117−element-icon {
118− background-color: transparent;
119− size: 1.0000em ;
120− cursor: inherit;
121− text-color: inherit;
122−}
123−window {
124− padding: 5;
125− background-color: @background;
126− border: 1;
127− // width: 100%;
128−}
129−mainbox {
130− padding: 0;
131− border: 0;
132−}
133−message {
134− padding: 1px ;
135− border-color: @separatorcolor;
136− border: 2px dash 0px 0px ;
137−}
138−textbox {
139− text-color: @foreground;
140−}
141−listview {
142− padding: 2px 0px 0px ;
143− scrollbar: true;
144− border-color: @separatorcolor;
145− spacing: 2px ;
146− fixed-height: 0;
147− border: 2px 0px 0px ;
148−}
149−scrollbar {
150− width: 4px ;
151− padding: 0;
152− handle-width: 8px ;
153− border: 0;
154− handle-color: @normal-foreground;
155−}
156−sidebar {
157− border-color: @separatorcolor;
158− border: 2px dash 0px 0px ;
159−}
160−button {
161− cursor: pointer;
162− spacing: 0;
163− text-color: @normal-foreground;
164−}
165−button selected {
166− background-color: @selected-normal-background;
167− text-color: @selected-normal-foreground;
168−}
169−num-filtered-rows {
170− expand: false;
171− text-color: Gray;
172−}
173−num-rows {
174− expand: false;
175− text-color: Gray;
176−}
177−textbox-num-sep {
178− expand: false;
179− str: "/";
180− text-color: Gray;
181−}
182−inputbar {
183− padding: 1px ;
184− spacing: 0px ;
185− text-color: @normal-foreground;
186− children: [ "prompt","textbox-prompt-colon","entry","num-filtered-rows","textbox-num-sep","num-rows","case-indicator" ];
187−}
188−case-indicator {
189− spacing: 0;
190− text-color: @normal-foreground;
191−}
192−entry {
193− text-color: @normal-foreground;
194− cursor: text;
195− spacing: 0;
196− placeholder-color: Gray;
197− placeholder: "Type to filter";
198−}
199−prompt {
200− spacing: 0;
201− text-color: @normal-foreground;
202−}
203−textbox-prompt-colon {
204− margin: 0px 0.3000em 0.0000em 0.0000em ;
205− expand: false;
206− str: ":";
207− text-color: inherit;
208−}
209−
M .config/shell/profile View
@@ -32,7 +32,7 @@ export MYSQL_HISTFILE="$XDG_CACHE_HOME/.mariadb_history"
3232 export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv"
3333
3434 # Other program settings
35−export SUDO_ASKPASS="$HOME/.local/bin/rofipass"
35+export SUDO_ASKPASS="$HOME/.local/bin/askpass-fuzzel"
3636 export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
3737 export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
3838 export ANDROID_HOME="$HOME/Android/Sdk/"
M .config/waybar/scripts/envyswitch.sh View
@@ -1,6 +1,6 @@
11 #!/bin/env bash
22
3−mode="$(printf "Integrated\nHybrid\nNvidia" | rofi -dmenu -case-smart -matching "fuzzy" -p "Select the graphics mode:")"
3+mode="$(printf "Integrated\nHybrid\nNvidia" | fuzzel --dmenu -p "Select the graphics mode:")"
44
55 # Exit if no selection was made
66 [ -z "$mode" ] && exit 1
M .config/yazi/keymap.toml View
@@ -128,8 +128,9 @@ keymap = [
128128 # Goto
129129 { on = [ "g", "h" ], run = "cd ~", desc = "Go home" },
130130 { on = [ "g", "c" ], run = "cd ~/.config", desc = "Go ~/.config" },
131− { on = [ "g", "d" ], run = "cd ~/dl", desc = "Go ~/dl" },
132− { on = [ "g", "d" ], run = "cd ~/pix", desc = "Go ~/pix" },
131+ { on = [ "g", "d" ], run = "cd ~/dox", desc = "Go ~/dox" },
132+ { on = [ "g", "D" ], run = "cd ~/dl", desc = "Go ~/dl" },
133+ { on = [ "g", "p" ], run = "cd ~/pix", desc = "Go ~/pix" },
133134 { on = [ "g", "C" ], run = "cd ~/.cache", desc = "Go ~/.cache" },
134135 { on = [ "g", "r" ], run = "cd ~/code/repos", desc = "Go ~/code/repos" },
135136 { on = [ "g", "v" ], run = "cd ~/vids", desc = "Go ~/vids" },
A .local/bin/askpass-fuzzel View
@@ -0,0 +1,12 @@
1+#!/bin/bash
2+
3+prompt="${1:-Password:}"
4+
5+password=$(fuzzel --dmenu --password --prompt="" --placeholder="$prompt" --width=60 --lines=0 --keyboard-focus=on-demand --no-exit-on-keyboard-focus-loss)
6+
7+if [ $? -eq 0 ]; then
8+ echo "$password"
9+ exit 0
10+else
11+ exit 1
12+fi
R .local/bin/rofiunicode → .local/bin/fuzzelunicode View
@@ -3,7 +3,7 @@
33 # The famous "get a menu of emojis to copy" script.
44
55 # Get user selection via dmenu from emoji file.
6−chosen=$(cut -d ';' -f1 ~/.local/share/chars/* | rofi -dmenu -i -l 30 | sed "s/ .*//")
6+chosen=$(cut -d ';' -f1 ~/.local/share/chars/* | fuzzel -d -i -l 30 | sed "s/ .*//")
77
88 # Exit if none chosen.
99 [ -z "$chosen" ] && exit
M .local/bin/madd View
@@ -14,7 +14,7 @@ madd() {
1414 if [ -t 0 ]; then
1515 filename=$(mpc listall | fzf)
1616 else
17− filename=$(mpc listall | rofi -dmenu -l 30 -case-smart)
17+ filename=$(mpc listall | fuzzel -d -l 30)
1818 fi
1919
2020 if [ -n "$filename" ]; then
M .local/bin/mounter View
@@ -1,6 +1,6 @@
11 #!/bin/sh
22
3−# Gives a rofi -dmenu prompt to mount unmounted drives. If
3+# Gives a dmenu prompt to mount unmounted drives. If
44 # they're in /etc/fstab, they'll be mounted automatically. Otherwise, you'll
55 # be prompted to give a mountpoint from already existsing directories. If you
66 # input a novel directory, it will prompt you to create that directory.
@@ -8,16 +8,16 @@
88 getmount() { \
99 [ -z "$chosen" ] && exit 1
1010 # shellcheck disable=SC2086
11− mp="$(find $1 2>/dev/null | rofi -dmenu -i -p "Type in mount point.")" || exit 1
11+ mp="$(find $1 2>/dev/null | fuzzel -d -i -p "Type in mount point.")" || exit 1
1212 test -z "$mp" && exit 1
1313 if [ ! -d "$mp" ]; then
14− mkdiryn=$(printf "No\\nYes" | rofi -dmenu -i -p "$mp does not exist. Create it?") || exit 1
14+ mkdiryn=$(printf "No\\nYes" | fuzzel -d -i -p "$mp does not exist. Create it?") || exit 1
1515 [ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp")
1616 fi
1717 }
1818
1919 mountusb() { \
20− chosen="$(echo "$usbdrives" | rofi -dmenu -i -p "Mount which drive?")" || exit 1
20+ chosen="$(echo "$usbdrives" | fuzzel -d -i -p "Mount which drive?")" || exit 1
2121 chosen="$(echo "$chosen" | awk '{print $1}')"
2222 sudo -A mount "$chosen" 2>/dev/null && notify-send "💻 USB mounting" "$chosen mounted." && exit 0
2323 alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not ( -path *%s -prune ) ",$3}')
M .local/bin/movie View
@@ -4,7 +4,7 @@
44 if [ -t 0 ]; then
55 filename="$(find ~/media/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | sort | fzf)"
66 else
7− filename="$(find ~/media/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | sort | rofi -case-smart -matching "fuzzy" -dmenu -l 25)"
7+ filename="$(find ~/media/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | sort | fuzzel -d -l 25)"
88 fi
99
1010 filepath="$(find ~/media/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)")"
D .local/bin/rofipass View
@@ -1,9 +0,0 @@
1−#!/bin/sh
2−#
3−# Take password prompt from STDIN, print password to STDOUT
4−# the sed piece just removes the colon from the provided
5−# prompt: rofi -p already gives us a colon
6−rofi -dmenu \
7− -password \
8− -no-fixed-num-lines \
9− -p "$(printf "$1" | sed s/://)"
M .local/bin/screenshot View
@@ -2,7 +2,7 @@
22
33 ocr_cmd="wl-copy"
44
5−case "$(printf "a selected area (copy)\ncurrent window (copy)\nfull screen (copy)\na selected area\ncurrent window\nfull screen\na selected area (OCR)" | rofi -dmenu -l 7 -i -p "Screenshot which area?")" in
5+case "$(printf "a selected area (copy)\ncurrent window (copy)\nfull screen (copy)\na selected area\ncurrent window\nfull screen\na selected area (OCR)" | fuzzel -d -l 7 -i -p "Screenshot which area?")" in
66 "a selected area (copy)") hyprshot -m region --clipboard-only ;;
77 "current window (copy)") hyprshot -m window --clipboard-only ;;
88 "full screen (copy)") hyprshot -m output --clipboard-only ;;
M .local/bin/sysact View
@@ -10,7 +10,7 @@ wmpid(){ # Get Hyprland process PID
1010 pgrep -o hyprland
1111 }
1212
13−case "$(printf " lock\n󰠚 leave $WM\n renew $WM\n󱣻 hibernate\n reboot\n shutdown\n sleep\n display off" | rofi -dmenu -i -l 15 -p 'Action: ')" in
13+case "$(printf " lock\n󰠚 leave $WM\n renew $WM\n󱣻 hibernate\n reboot\n shutdown\n sleep\n display off" | fuzzel -d -i -l 15 -p 'Action: ')" in
1414 ' lock') hyprlock ;;
1515 "󰠚 leave $WM") kill -TERM "$(wmpid)" ;;
1616 " renew $WM") hyprctl reload ;;
M .local/bin/unmounter View
@@ -1,12 +1,12 @@
11 #!/bin/sh
22
3−# A rofi -dmenu prompt to unmount drives.
3+# A dmenu prompt to unmount drives.
44 # Provides you with mounted partitions, select one to unmount.
55 # Drives mounted at /, /boot and /home will not be options to unmount.
66
77 unmountusb() {
88 [ -z "$drives" ] && exit
9− chosen="$(echo "$drives" | rofi -dmenu -i -p "Unmount which drive?")" || exit 1
9+ chosen="$(echo "$drives" | fuzzel -d -i -p "Unmount which drive?")" || exit 1
1010 chosen="$(echo "$chosen" | awk '{print $1}')"
1111 [ -z "$chosen" ] && exit
1212 sudo -A umount "$chosen" && notify-send "💻 USB unmounting" "$chosen unmounted."