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.
This commit is contained in:
parent
a81ab033ec
commit
ffeaf344c4
|
|
@ -0,0 +1,29 @@
|
|||
[main]
|
||||
dpi-aware=no
|
||||
lines=10
|
||||
filter-desktop=yes
|
||||
icon-theme=Papirus-Dark
|
||||
font=Fira Code:size=12
|
||||
terminal=foot -e
|
||||
list-executables-in-path=yes
|
||||
password-character=*
|
||||
width=80
|
||||
horizontal-pad=10
|
||||
vertical-pad=10
|
||||
inner-pad=5
|
||||
|
||||
[colors]
|
||||
background=1e1e2edd
|
||||
text=cdd6f4ff
|
||||
prompt=bac2deff
|
||||
placeholder=7f849cff
|
||||
input=cdd6f4ff
|
||||
match=89b4faff
|
||||
selection=585b70ff
|
||||
selection-text=cdd6f4ff
|
||||
selection-match=89b4faff
|
||||
counter=7f849cff
|
||||
border=89b4faff
|
||||
|
||||
[key-bindings]
|
||||
execute-input=Control+Return Shift+KP_Enter
|
||||
|
|
@ -15,3 +15,4 @@ https://lukesmith.xyz/rss.xml
|
|||
https://landchad.net/rss
|
||||
https://togglebit.io/atom.xml
|
||||
https://ben.page/rss
|
||||
https://albert.nz/rss.xml
|
||||
|
|
|
|||
|
|
@ -1,209 +0,0 @@
|
|||
configuration {
|
||||
modi: "run,drun,window";
|
||||
matching: "fuzzy";
|
||||
terminal: "foot";
|
||||
sort: true;
|
||||
case-sensitive: false;
|
||||
disable-history: true;
|
||||
font: "Fira Code 11";
|
||||
window-format: "{w} · {c} · {t}";
|
||||
}
|
||||
|
||||
* {
|
||||
rosewater: #f5e0dc;
|
||||
flamingo: #f2cdcd;
|
||||
pink: #f5c2e7;
|
||||
mauve: #cba6f7;
|
||||
red: #f38ba8;
|
||||
maroon: #eba0ac;
|
||||
peach: #fab387;
|
||||
yellow: #f9e2af;
|
||||
green: #a6e3a1;
|
||||
teal: #94e2d5;
|
||||
sky: #89dceb;
|
||||
sapphire: #74c7ec;
|
||||
blue: #89b4fa;
|
||||
lavender: #b4befe;
|
||||
text: #cdd6f4;
|
||||
subtext1: #bac2de;
|
||||
subtext0: #a6adc8;
|
||||
overlay2: #9399b2;
|
||||
overlay1: #7f849c;
|
||||
overlay0: #6c7086;
|
||||
surface2: #585b70;
|
||||
surface1: #45475a;
|
||||
surface0: #313244;
|
||||
base: #1e1e2e;
|
||||
mantle: #181825;
|
||||
crust: #11111b;
|
||||
}
|
||||
|
||||
* {
|
||||
selected-active-foreground: @background;
|
||||
lightfg: @text;
|
||||
separatorcolor: @foreground;
|
||||
urgent-foreground: @red;
|
||||
alternate-urgent-background: @lightbg;
|
||||
lightbg: @mantle;
|
||||
background-color: transparent;
|
||||
border-color: @foreground;
|
||||
normal-background: @background;
|
||||
selected-urgent-background: @red;
|
||||
alternate-active-background: @lightbg;
|
||||
spacing: 2;
|
||||
alternate-normal-foreground: @foreground;
|
||||
urgent-background: @background;
|
||||
selected-normal-foreground: @lightbg;
|
||||
active-foreground: @blue;
|
||||
background: @base;
|
||||
selected-active-background: @blue;
|
||||
active-background: @background;
|
||||
selected-normal-background: @lightfg;
|
||||
alternate-normal-background: @lightbg;
|
||||
foreground: @text;
|
||||
selected-urgent-foreground: @background;
|
||||
normal-foreground: @foreground;
|
||||
alternate-urgent-foreground: @red;
|
||||
alternate-active-foreground: @blue;
|
||||
|
||||
}
|
||||
element {
|
||||
cursor: pointer;
|
||||
spacing: 5px ;
|
||||
border: 0;
|
||||
}
|
||||
element normal.normal {
|
||||
background-color: @normal-background;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
element normal.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @urgent-foreground;
|
||||
}
|
||||
element normal.active {
|
||||
background-color: @active-background;
|
||||
text-color: @active-foreground;
|
||||
}
|
||||
element selected.normal {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
element selected.urgent {
|
||||
background-color: @selected-urgent-background;
|
||||
text-color: @selected-urgent-foreground;
|
||||
}
|
||||
element selected.active {
|
||||
background-color: @selected-active-background;
|
||||
text-color: @selected-active-foreground;
|
||||
}
|
||||
element alternate.normal {
|
||||
background-color: @alternate-normal-background;
|
||||
text-color: @alternate-normal-foreground;
|
||||
}
|
||||
element alternate.urgent {
|
||||
background-color: @alternate-urgent-background;
|
||||
text-color: @alternate-urgent-foreground;
|
||||
}
|
||||
element alternate.active {
|
||||
background-color: @alternate-active-background;
|
||||
text-color: @alternate-active-foreground;
|
||||
}
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
cursor: inherit;
|
||||
highlight: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
size: 1.0000em ;
|
||||
cursor: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
window {
|
||||
padding: 5;
|
||||
background-color: @background;
|
||||
border: 1;
|
||||
// width: 100%;
|
||||
}
|
||||
mainbox {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
message {
|
||||
padding: 1px ;
|
||||
border-color: @separatorcolor;
|
||||
border: 2px dash 0px 0px ;
|
||||
}
|
||||
textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
listview {
|
||||
padding: 2px 0px 0px ;
|
||||
scrollbar: true;
|
||||
border-color: @separatorcolor;
|
||||
spacing: 2px ;
|
||||
fixed-height: 0;
|
||||
border: 2px 0px 0px ;
|
||||
}
|
||||
scrollbar {
|
||||
width: 4px ;
|
||||
padding: 0;
|
||||
handle-width: 8px ;
|
||||
border: 0;
|
||||
handle-color: @normal-foreground;
|
||||
}
|
||||
sidebar {
|
||||
border-color: @separatorcolor;
|
||||
border: 2px dash 0px 0px ;
|
||||
}
|
||||
button {
|
||||
cursor: pointer;
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
button selected {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
num-filtered-rows {
|
||||
expand: false;
|
||||
text-color: Gray;
|
||||
}
|
||||
num-rows {
|
||||
expand: false;
|
||||
text-color: Gray;
|
||||
}
|
||||
textbox-num-sep {
|
||||
expand: false;
|
||||
str: "/";
|
||||
text-color: Gray;
|
||||
}
|
||||
inputbar {
|
||||
padding: 1px ;
|
||||
spacing: 0px ;
|
||||
text-color: @normal-foreground;
|
||||
children: [ "prompt","textbox-prompt-colon","entry","num-filtered-rows","textbox-num-sep","num-rows","case-indicator" ];
|
||||
}
|
||||
case-indicator {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
entry {
|
||||
text-color: @normal-foreground;
|
||||
cursor: text;
|
||||
spacing: 0;
|
||||
placeholder-color: Gray;
|
||||
placeholder: "Type to filter";
|
||||
}
|
||||
prompt {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
textbox-prompt-colon {
|
||||
margin: 0px 0.3000em 0.0000em 0.0000em ;
|
||||
expand: false;
|
||||
str: ":";
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ export MYSQL_HISTFILE="$XDG_CACHE_HOME/.mariadb_history"
|
|||
export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv"
|
||||
|
||||
# Other program settings
|
||||
export SUDO_ASKPASS="$HOME/.local/bin/rofipass"
|
||||
export SUDO_ASKPASS="$HOME/.local/bin/askpass-fuzzel"
|
||||
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
|
||||
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
|
||||
export ANDROID_HOME="$HOME/Android/Sdk/"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/env bash
|
||||
|
||||
mode="$(printf "Integrated\nHybrid\nNvidia" | rofi -dmenu -case-smart -matching "fuzzy" -p "Select the graphics mode:")"
|
||||
mode="$(printf "Integrated\nHybrid\nNvidia" | fuzzel --dmenu -p "Select the graphics mode:")"
|
||||
|
||||
# Exit if no selection was made
|
||||
[ -z "$mode" ] && exit 1
|
||||
|
|
|
|||
|
|
@ -128,8 +128,9 @@ keymap = [
|
|||
# Goto
|
||||
{ on = [ "g", "h" ], run = "cd ~", desc = "Go home" },
|
||||
{ on = [ "g", "c" ], run = "cd ~/.config", desc = "Go ~/.config" },
|
||||
{ on = [ "g", "d" ], run = "cd ~/dl", desc = "Go ~/dl" },
|
||||
{ on = [ "g", "d" ], run = "cd ~/pix", desc = "Go ~/pix" },
|
||||
{ on = [ "g", "d" ], run = "cd ~/dox", desc = "Go ~/dox" },
|
||||
{ on = [ "g", "D" ], run = "cd ~/dl", desc = "Go ~/dl" },
|
||||
{ on = [ "g", "p" ], run = "cd ~/pix", desc = "Go ~/pix" },
|
||||
{ on = [ "g", "C" ], run = "cd ~/.cache", desc = "Go ~/.cache" },
|
||||
{ on = [ "g", "r" ], run = "cd ~/code/repos", desc = "Go ~/code/repos" },
|
||||
{ on = [ "g", "v" ], run = "cd ~/vids", desc = "Go ~/vids" },
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
prompt="${1:-Password:}"
|
||||
|
||||
password=$(fuzzel --dmenu --password --prompt="" --placeholder="$prompt" --width=60 --lines=0 --keyboard-focus=on-demand --no-exit-on-keyboard-focus-loss)
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "$password"
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
# The famous "get a menu of emojis to copy" script.
|
||||
|
||||
# Get user selection via dmenu from emoji file.
|
||||
chosen=$(cut -d ';' -f1 ~/.local/share/chars/* | rofi -dmenu -i -l 30 | sed "s/ .*//")
|
||||
chosen=$(cut -d ';' -f1 ~/.local/share/chars/* | fuzzel -d -i -l 30 | sed "s/ .*//")
|
||||
|
||||
# Exit if none chosen.
|
||||
[ -z "$chosen" ] && exit
|
||||
|
|
@ -14,7 +14,7 @@ madd() {
|
|||
if [ -t 0 ]; then
|
||||
filename=$(mpc listall | fzf)
|
||||
else
|
||||
filename=$(mpc listall | rofi -dmenu -l 30 -case-smart)
|
||||
filename=$(mpc listall | fuzzel -d -l 30)
|
||||
fi
|
||||
|
||||
if [ -n "$filename" ]; then
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Gives a rofi -dmenu prompt to mount unmounted drives. If
|
||||
# Gives a dmenu prompt to mount unmounted drives. If
|
||||
# they're in /etc/fstab, they'll be mounted automatically. Otherwise, you'll
|
||||
# be prompted to give a mountpoint from already existsing directories. If you
|
||||
# input a novel directory, it will prompt you to create that directory.
|
||||
|
|
@ -8,16 +8,16 @@
|
|||
getmount() { \
|
||||
[ -z "$chosen" ] && exit 1
|
||||
# shellcheck disable=SC2086
|
||||
mp="$(find $1 2>/dev/null | rofi -dmenu -i -p "Type in mount point.")" || exit 1
|
||||
mp="$(find $1 2>/dev/null | fuzzel -d -i -p "Type in mount point.")" || exit 1
|
||||
test -z "$mp" && exit 1
|
||||
if [ ! -d "$mp" ]; then
|
||||
mkdiryn=$(printf "No\\nYes" | rofi -dmenu -i -p "$mp does not exist. Create it?") || exit 1
|
||||
mkdiryn=$(printf "No\\nYes" | fuzzel -d -i -p "$mp does not exist. Create it?") || exit 1
|
||||
[ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp")
|
||||
fi
|
||||
}
|
||||
|
||||
mountusb() { \
|
||||
chosen="$(echo "$usbdrives" | rofi -dmenu -i -p "Mount which drive?")" || exit 1
|
||||
chosen="$(echo "$usbdrives" | fuzzel -d -i -p "Mount which drive?")" || exit 1
|
||||
chosen="$(echo "$chosen" | awk '{print $1}')"
|
||||
sudo -A mount "$chosen" 2>/dev/null && notify-send "💻 USB mounting" "$chosen mounted." && exit 0
|
||||
alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not ( -path *%s -prune ) ",$3}')
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
if [ -t 0 ]; then
|
||||
filename="$(find ~/media/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | sort | fzf)"
|
||||
else
|
||||
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)"
|
||||
filename="$(find ~/media/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | sort | fuzzel -d -l 25)"
|
||||
fi
|
||||
|
||||
filepath="$(find ~/media/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)")"
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Take password prompt from STDIN, print password to STDOUT
|
||||
# the sed piece just removes the colon from the provided
|
||||
# prompt: rofi -p already gives us a colon
|
||||
rofi -dmenu \
|
||||
-password \
|
||||
-no-fixed-num-lines \
|
||||
-p "$(printf "$1" | sed s/://)"
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
ocr_cmd="wl-copy"
|
||||
|
||||
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
|
||||
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
|
||||
"a selected area (copy)") hyprshot -m region --clipboard-only ;;
|
||||
"current window (copy)") hyprshot -m window --clipboard-only ;;
|
||||
"full screen (copy)") hyprshot -m output --clipboard-only ;;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ wmpid(){ # Get Hyprland process PID
|
|||
pgrep -o hyprland
|
||||
}
|
||||
|
||||
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
|
||||
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
|
||||
' lock') hyprlock ;;
|
||||
" leave $WM") kill -TERM "$(wmpid)" ;;
|
||||
" renew $WM") hyprctl reload ;;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
# A rofi -dmenu prompt to unmount drives.
|
||||
# A dmenu prompt to unmount drives.
|
||||
# Provides you with mounted partitions, select one to unmount.
|
||||
# Drives mounted at /, /boot and /home will not be options to unmount.
|
||||
|
||||
unmountusb() {
|
||||
[ -z "$drives" ] && exit
|
||||
chosen="$(echo "$drives" | rofi -dmenu -i -p "Unmount which drive?")" || exit 1
|
||||
chosen="$(echo "$drives" | fuzzel -d -i -p "Unmount which drive?")" || exit 1
|
||||
chosen="$(echo "$chosen" | awk '{print $1}')"
|
||||
[ -z "$chosen" ] && exit
|
||||
sudo -A umount "$chosen" && notify-send "💻 USB unmounting" "$chosen unmounted."
|
||||
|
|
|
|||
Loading…
Reference in New Issue