Przeglądaj źródła

Sync: 2026-08-01 11:57:59

Gabriel Capella 2 dni temu
rodzic
commit
220b391405

+ 34 - 0
dots/.config/fuzzel/fuzzel.ini

@@ -0,0 +1,34 @@
+# fuzzel — application launcher / dmenu replacement for bemenu
+# Palette matches the ghostty theme (background #181818, foreground #d8d8d8).
+
+font=B612:size=11
+prompt=🔍
+icon-theme=hicolor
+terminal=ghostty -e
+layer=overlay
+match-mode=fzf
+lines=10
+width=40
+tabs=4
+horizontal-pad=16
+vertical-pad=12
+inner-pad=8
+exit-on-keyboard-focus-loss=yes
+
+[colors]
+background=181818f0
+text=d8d8d8ff
+prompt=d8d8d8ff
+input=ffffffff
+match=7cafc2ff
+selection=323232ff
+selection-text=ffffffff
+selection-match=7cafc2ff
+border=323232ff
+
+[border]
+width=5
+radius=10
+
+[dmenu]
+mode=text

+ 13 - 6
dots/.config/sway/config

@@ -34,12 +34,19 @@ bindsym $mod+Return exec ghostty
 # kill focused window
 bindsym $mod+Shift+q kill
 
-# start bemenu (a program launcher)
-bindsym $mod+d exec ~/.config/sway/scripts/bemenu-run-or-search.sh
-bindsym $mod+Shift+v exec cliphist list | bemenu -l 15 -p  --counter always -c -W 0.4 -B 5 \
-    --fixed-height -H 22 --fn 'B612 11' \
-    --bdr "#323232" --tf "#FFFFFF" --hf "#FFFFFF" \
-    | cliphist decode | wl-copy
+# start fuzzel (a program launcher)
+# $mod+d       run-or-search, as before but styled like the ghostty command palette
+# $mod+Shift+d installed applications only, with icons, from their .desktop entries
+bindsym $mod+d exec ~/.config/sway/scripts/fuzzel-run-or-search.sh
+bindsym $mod+Shift+d exec fuzzel
+bindsym $mod+Shift+v exec cliphist list | fuzzel --dmenu -l 15 | cliphist decode | wl-copy
+
+# previous bemenu bindings, kept as a fallback
+# bindsym $mod+d exec ~/.config/sway/scripts/bemenu-run-or-search.sh
+# bindsym $mod+Shift+v exec cliphist list | bemenu -l 15 -p  --counter always -c -W 0.4 -B 5 \
+#     --fixed-height -H 22 --fn 'B612 11' \
+#     --bdr "#323232" --tf "#FFFFFF" --hf "#FFFFFF" \
+#     | cliphist decode | wl-copy
 
 # Copy and paste
 bindsym $mod+v exec ~/.config/sway/scripts/contextual-paste.sh

+ 16 - 0
dots/.config/sway/scripts/fuzzel-run-or-search.sh

@@ -0,0 +1,16 @@
+#!/bin/bash
+# Run a command, or fall back to a web search if it isn't one.
+# fuzzel --dmenu prints the typed string as-is when nothing matches,
+# which is what makes the search fallback work.
+result=$(compgen -c | sort -u | fuzzel --dmenu --prompt "🔍 ")
+
+[ -z "$result" ] && exit 0
+
+if command -v "${result%% *}" &>/dev/null; then
+    exec $result
+else
+    query=$(python3 -c "import urllib.parse, sys; print(urllib.parse.quote_plus(sys.argv[1]))" "$result")
+    xdg-open "https://duckduckgo.com/?q=$query" &
+    sleep 0.5
+    swaymsg '[app_id="google-chrome"] focus'
+fi

+ 1 - 0
to_sync

@@ -8,3 +8,4 @@
 .config/gtk-3.0
 .config/mako
 .config/gtk-4.0/settings.ini
+.config/fuzzel