[launcher] Add gopass launcher
This commit is contained in:
parent
081559a915
commit
1f7fb0467f
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
QUERY=$1
|
||||||
|
SWAYSOCK=/run/user/$UID/sway-ipc.$UID.$(pidof sway).sock
|
||||||
|
export SWAYSOCK
|
||||||
|
|
||||||
|
if [ -z "$QUERY" ]; then
|
||||||
|
QUERY=''
|
||||||
|
fi
|
||||||
|
|
||||||
|
input=$(gopass list -f | fzf -q "$QUERY")
|
||||||
|
printf '%s' "$(gopass show -o "$input")" | wl-copy
|
||||||
|
|
||||||
|
swaymsg exec -- notify-send "gopass" "Copied ${input} to clipboard." -t 2000
|
||||||
|
sleep 5
|
||||||
|
wl-copy --clear
|
||||||
|
swaymsg exec -- notify-send "gopass" "Cleared clipboard" -t 1000
|
|
@ -19,8 +19,12 @@ then
|
||||||
COMMAND=~/bin/launcher-bookmarks
|
COMMAND=~/bin/launcher-bookmarks
|
||||||
elif [[ "$1" == "clipboard" ]]
|
elif [[ "$1" == "clipboard" ]]
|
||||||
then
|
then
|
||||||
FZF_DEFAULT_OPTS="--prompt='📋 ' --algo=v1 --bind 'tab:up' --cycle --read0 ${FZF_DEFAULT_OPTS}"
|
FZF_DEFAULT_OPTS="--prompt='📋 ' --algo=v1 --bind 'tab:up' --read0 ${FZF_DEFAULT_OPTS}"
|
||||||
COMMAND=launcher-clipboard
|
COMMAND=~/bin/launcher-clipboard
|
||||||
|
elif [[ "$1" == "gopass" ]]
|
||||||
|
then
|
||||||
|
FZF_DEFAULT_OPTS="--prompt='🔑 ' --algo=v1 --bind 'tab:up' --read0 ${FZF_DEFAULT_OPTS}"
|
||||||
|
COMMAND=~/bin/launcher-gopass
|
||||||
else
|
else
|
||||||
exec alacritty --class launcher --config-file ~/.config/alacritty/alacritty-launcher.yml --option "window.dimensions={lines: 40, columns: 80}" -e ~/bin/launcher-run
|
exec alacritty --class launcher --config-file ~/.config/alacritty/alacritty-launcher.yml --option "window.dimensions={lines: 40, columns: 80}" -e ~/bin/launcher-run
|
||||||
fi;
|
fi;
|
||||||
|
|
|
@ -373,7 +373,7 @@ mode $mode_run {
|
||||||
bindsym $mod+shift+d exec $menu bookmarks; mode "default"
|
bindsym $mod+shift+d exec $menu bookmarks; mode "default"
|
||||||
|
|
||||||
bindsym r exec rofi -show run; mode "default";
|
bindsym r exec rofi -show run; mode "default";
|
||||||
bindsym p exec rofi-pass; mode "default";
|
bindsym p exec $menu gopass; mode "default";
|
||||||
|
|
||||||
bindsym s exec swytch; mode "default"
|
bindsym s exec swytch; mode "default"
|
||||||
bindsym tab exec swytch; mode "default"
|
bindsym tab exec swytch; mode "default"
|
||||||
|
|
Loading…
Reference in New Issue