diff --git a/bin/executable_launcher-gopass b/bin/executable_launcher-gopass new file mode 100644 index 0000000..ca1c85a --- /dev/null +++ b/bin/executable_launcher-gopass @@ -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 diff --git a/bin/executable_my-rofi b/bin/executable_my-rofi index ed2f68e..618e569 100644 --- a/bin/executable_my-rofi +++ b/bin/executable_my-rofi @@ -19,8 +19,12 @@ then COMMAND=~/bin/launcher-bookmarks elif [[ "$1" == "clipboard" ]] then - FZF_DEFAULT_OPTS="--prompt='📋 ' --algo=v1 --bind 'tab:up' --cycle --read0 ${FZF_DEFAULT_OPTS}" - COMMAND=launcher-clipboard + FZF_DEFAULT_OPTS="--prompt='📋 ' --algo=v1 --bind 'tab:up' --read0 ${FZF_DEFAULT_OPTS}" + 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 exec alacritty --class launcher --config-file ~/.config/alacritty/alacritty-launcher.yml --option "window.dimensions={lines: 40, columns: 80}" -e ~/bin/launcher-run fi; diff --git a/dot_config/sway/config.tmpl b/dot_config/sway/config.tmpl index 45e1a76..0972441 100644 --- a/dot_config/sway/config.tmpl +++ b/dot_config/sway/config.tmpl @@ -373,7 +373,7 @@ mode $mode_run { bindsym $mod+shift+d exec $menu bookmarks; 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 tab exec swytch; mode "default"