Create fzf terminal launcher

master
Hektor Misplon 2022-09-25 15:33:36 +02:00
parent c167030f09
commit 3ba86b0303
2 changed files with 8 additions and 2 deletions

4
.bin/launcher Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
alacritty --class Launcher,Launcher -e sh \
-c 'compgen -c | sort -u | fzf --reverse | (x=$(cat); (set -m; exec $x &))'

View File

@ -56,7 +56,9 @@ myStartupHook = do
] ]
myManageHook = composeAll myManageHook = composeAll
[ className =? "Zathura" --> doShift "ε" ] [ className =? "Zathura" --> doShift "ε"
, className =? "Launcher" --> doRectFloat (W.RationalRect 0.05 0.4 0.9 0.5)
]
myConfig = def myConfig = def
{ {
@ -85,7 +87,7 @@ myKeysP = [
("M-S-<Space>", withFocused $ windows . W.sink) ("M-S-<Space>", withFocused $ windows . W.sink)
-- Use rofi to launch programs -- Use rofi to launch programs
, ("M-p", spawn "rofi -show run") , ("M-p", spawn "launcher")
-- Map insert key to paste from clipboard -- Map insert key to paste from clipboard
, ("<Insert>", pasteSelection) , ("<Insert>", pasteSelection)