[sway] Add new launcher to quickly pick a document
This commit is contained in:
parent
f04b69d912
commit
8338f18839
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
FIND_FOLDER=${1:-~/Documents}
|
||||
FOLDER=$(find "${FIND_FOLDER}" -maxdepth 4 -type d |fzf --preview="exa --tree --icons --level 2 {1}" --preview-window="right")
|
||||
|
||||
if [ ! -z "${FOLDER}" ]; then
|
||||
browse-folder "${FOLDER}"
|
||||
fi
|
|
@ -1,3 +1,3 @@
|
|||
#!/usr/bin/env zsh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
print -rl -- ${(ko)commands} | fzf | xargs -r swaymsg -t command exec
|
||||
dmenu_path | fzf | xargs -r swaymsg -t command exec
|
||||
|
|
|
@ -5,10 +5,10 @@ export FZF_DEFAULT_OPTS='
|
|||
--layout=reverse
|
||||
--margin=0
|
||||
--padding=0
|
||||
--color=fg:#f8f8f2,bg:#282a36,hl:#bd93f9
|
||||
--color=fg+:#f8f8f2,bg+:#44475a,hl+:#bd93f9
|
||||
--color=info:#ffb86c,prompt:#50fa7b,pointer:#ff79c6
|
||||
--color=marker:#ff79c6,spinner:#ffb86c,header:#6272a4
|
||||
--color=fg:#cbccc6,bg:#1f2430,hl:#707a8c
|
||||
--color=fg+:#707a8c,bg+:#191e2a,hl+:#ffcc66
|
||||
--color=info:#73d0ff,prompt:#707a8c,pointer:#cbccc6
|
||||
--color=marker:#73d0ff,spinner:#73d0ff,header:#d4bfff
|
||||
'
|
||||
|
||||
FOOT_OPTIONS=''
|
||||
|
@ -22,6 +22,11 @@ then
|
|||
FZF_DEFAULT_OPTS="--prompt=' '${FZF_DEFAULT_OPTS}"
|
||||
COMMAND=~/bin/launcher-bookmarks
|
||||
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
|
||||
elif [[ "$1" == "documents" ]]
|
||||
then
|
||||
FZF_DEFAULT_OPTS="--prompt='f '${FZF_DEFAULT_OPTS}"
|
||||
COMMAND=~/bin/launcher-folder
|
||||
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
|
||||
elif [[ "$1" == "clipboard" ]]
|
||||
then
|
||||
FZF_DEFAULT_OPTS="--prompt='📋 ' --algo=v1 --bind 'tab:up' ${FZF_DEFAULT_OPTS}"
|
||||
|
@ -42,5 +47,4 @@ then
|
|||
else
|
||||
exec foot --app-id launcher --config ~/.config/foot/foot-launcher.ini ~/bin/launcher-run
|
||||
fi;
|
||||
|
||||
exec foot --app-id launcher ${FOOT_OPTIONS} --config ~/.config/foot/foot-launcher.ini "$COMMAND"
|
||||
|
|
Loading…
Reference in New Issue