adding gopass stuff
This commit is contained in:
@@ -6,8 +6,8 @@ export XDG_CONFIG_HOME=~/.config
|
|||||||
export XDG_CACHE_HOME=~/.cache
|
export XDG_CACHE_HOME=~/.cache
|
||||||
export XDG_DATA_HOME=~/.local/share
|
export XDG_DATA_HOME=~/.local/share
|
||||||
export BROWSER=/usr/bin/firefox
|
export BROWSER=/usr/bin/firefox
|
||||||
export VISUAL=emacsclient
|
export VISUAL=nvim
|
||||||
export EDITOR=emacsclient
|
export EDITOR=nvim
|
||||||
export QT_QPA_PLATFORMTHEME=qt5ct
|
export QT_QPA_PLATFORMTHEME=qt5ct
|
||||||
|
|
||||||
# Scripts Path
|
# Scripts Path
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
|
|
||||||
:os
|
:os
|
||||||
(:if IS-MAC macos) ; improve compatibility with macOS
|
(:if IS-MAC macos) ; improve compatibility with macOS
|
||||||
;;tty ; improve the terminal Emacs experience
|
tty ; improve the terminal Emacs experience
|
||||||
|
|
||||||
:lang
|
:lang
|
||||||
;;agda ; types of types of types of types...
|
;;agda ; types of types of types of types...
|
||||||
|
|||||||
@@ -163,12 +163,17 @@ bindsym $mod+Ctrl+g exec grimshot save window
|
|||||||
#bindsym $mod+Shift+e exec wlogout -p layer-shell
|
#bindsym $mod+Shift+e exec wlogout -p layer-shell
|
||||||
|
|
||||||
# Bookmarks
|
# Bookmarks
|
||||||
bindsym $mod+Insert exec wtype $(grep -v '^#' ~/.local/share/bookmarks/bookmarks | bemenu -p Bookmark: -l 50 -c -M 500 --fn 'Terminus 16' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | cut -d ' ' -f1)
|
bindsym $mod+i exec wtype $(grep -v '^#' ~/.local/share/bookmarks/bookmarks | bemenu -p Bookmark: -l 50 -c -M 500 --fn 'Monospace 14' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | cut -d ' ' -f1)
|
||||||
|
|
||||||
bindsym $mod+Shift+Insert exec ~/.local/bin/bookmark_insert
|
bindsym $mod+Shift+i exec ~/.local/bin/bookmark_insert
|
||||||
|
|
||||||
# Emojis
|
# Emojis
|
||||||
bindsym $mod+Shift+e exec wtype $(awk '{print $1, $0}' ~/.local/share/chars/emojis* | bemenu -p Emoji: -l 25 -c -M 500 --fn 'Noto Color Emoji,Terminus 16' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | awk '{print $1}')
|
bindsym $mod+Shift+e exec wtype $(awk '{print $1, $0}' ~/.local/share/chars/emojis* | bemenu -p Emoji: -l 25 -c -M 500 --fn 'Noto Color Emoji,Monospace 14' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | awk '{print $1}')
|
||||||
|
|
||||||
|
# Gopass
|
||||||
|
bindsym $mod+y exec ~/.local/bin/pass_copy.sh
|
||||||
|
bindsym $mod+u exec ~/.local/bin/pass_user_copy.sh
|
||||||
|
bindsym $mod+p exec ~/.local/bin/pass_autofill.sh
|
||||||
|
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
|
|||||||
22
.local/bin/pass_autofill.sh
Executable file
22
.local/bin/pass_autofill.sh
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
entry=$(gopass list --flat | bemenu -p Autofill: -l 25 -c -M 500 --fn 'Monospace 14' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00')
|
||||||
|
|
||||||
|
if [ -n "$entry" ]; then
|
||||||
|
username=$(gopass show "$entry" | grep '^username:' | cut -d' ' -f2-)
|
||||||
|
password=$(gopass show -o "$entry")
|
||||||
|
|
||||||
|
if [ -z "$password" ]; then
|
||||||
|
notify-send "Gopass Error" "No password for $entry"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
notify-send "Autofill in 3s: Focus username field in form"
|
||||||
|
sleep 3
|
||||||
|
|
||||||
|
# Type username, press Tab, then password, then Enter
|
||||||
|
wtype "$username"
|
||||||
|
wtype -k Tab
|
||||||
|
wtype "$password"
|
||||||
|
wtype -k Return
|
||||||
|
fi
|
||||||
8
.local/bin/pass_copy.sh
Executable file
8
.local/bin/pass_copy.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
entry=$(gopass list --flat | bemenu -p Password: -l 25 -c -M 500 --fn 'Monospace 14' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00')
|
||||||
|
|
||||||
|
if [ -n "$entry" ]; then
|
||||||
|
gopass show -c "$entry" 2>/dev/null || notify-send "Gopass Error" "Failed to copy: $entry"
|
||||||
|
fi
|
||||||
|
|
||||||
8
.local/bin/pass_user_copy.sh
Executable file
8
.local/bin/pass_user_copy.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
entry=$(gopass list --flat | bemenu -p Username: -l 25 -c -M 500 --fn 'Monospace 14' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00')
|
||||||
|
|
||||||
|
if [ -n "$entry" ]; then
|
||||||
|
gopass show -c "$entry" username 2>/dev/null || notify-send "Gopass Error" "Failed to copy username from: $entry"
|
||||||
|
fi
|
||||||
|
|
||||||
Reference in New Issue
Block a user