~rycwo/workspace

4a09ad65e04100582697be13796409fb228a68cf — Ryan Chan 8 months ago 33298f4
Add dmenu scripts for pass
4 files changed, 23 insertions(+), 6 deletions(-)

M bash/.bashrc
A bin/dmenu_pass_otp
M gnupg/gpg-agent.conf
M sxhkd/sxhkdrc
M bash/.bashrc => bash/.bashrc +8 -0
@@ 7,6 7,14 @@ alias ls="ls --color=auto"
alias ll="ls -l -all --classify"
alias grep="grep --color=auto"

# dmenu options
dmenu_options="\
    -fn Roboto\ Mono:style=Medium:antialias=true:autohint=true:pixelsize=13\
    -nb \#dadada -nf \#4e4e4e -sb \#4e4e4e -sf \#dadada"
alias dmenu_run="dmenu_run ""$dmenu_options"
alias passmenu="passmenu ""$dmenu_options"
alias dmenu_pass_otp="dmenu_pass_otp ""$dmenu_options"

# TODO: Add colors to the prompt.
PS1="[\u@\h:\w]\$ "


A bin/dmenu_pass_otp => bin/dmenu_pass_otp +5 -0
@@ 0,0 1,5 @@
#!/bin/sh

password=$(find ~/.password-store/ -type f -name '*.gpg' |
	sed 's/.*\.password-store\/\(.*\)\.gpg$/\1/' | dmenu -i "$@")
[ -n "$password" ] && pass otp show -c "$password"

M gnupg/gpg-agent.conf => gnupg/gpg-agent.conf +1 -2
@@ 1,3 1,2 @@
enable-ssh-support

pinentry-program /usr/bin/pinentry-tty
pinentry-program /usr/bin/pinentry-gtk-2

M sxhkd/sxhkdrc => sxhkd/sxhkdrc +9 -4
@@ 10,8 10,13 @@ super + shift + Return
    st -e tmux -2 attach-session

super + r
    dmenu_run -fn "Roboto Mono:style=Medium:antialias=true:autohint=true:pixelsize=13" \
        -nb "#dadada" -nf "#4e4e4e" -sb "#4e4e4e" -sf "#dadada"
    bash -ic dmenu_run

super + p
    bash -ic passmenu

super + o
    bash -ic dmenu_pass_otp

# Reload sxhkd configs.
super + Escape


@@ 93,7 98,7 @@ super + {_,shift + }{h,j,k,l}
    bspc node -{f,s} {west,south,north,east}

# Focus the node for the given path jump.
super + {p,b,comma,period}
super + shift + {p,b,comma,period}
    bspc node -f @{parent,brother,first,second}

# Focus the next/previous node in the current desktop.


@@ 109,7 114,7 @@ super + {grave,Tab}
    bspc {node,desktop} -f last

# Focus the older or newer node in the focus history.
super + {o,i}
super + shift + {o,i}
    bspc wm -h off; \
    bspc node {older,newer} -f; \
    bspc wm -h on