aboutsummaryrefslogtreecommitdiff
path: root/config.def.h
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2022-10-13 01:18:25 -0700
committerxyz <gky44px1999@gmail.com>2022-10-13 01:18:25 -0700
commit0a03fc5b1931eca4cd8f2ec3f9f80b3d21def5b8 (patch)
tree664f3787b1ec13ff950ea3c99adcd6ba09fa96e3 /config.def.h
parent755ea71c22681dfd95e81491eff6d31c45cfdfb1 (diff)
clear clipboard before alt-o copy duolibre pass otp
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/config.def.h b/config.def.h
index 76eac6e..c4d286b 100644
--- a/config.def.h
+++ b/config.def.h
@@ -116,7 +116,8 @@ static const Key keys[] = {
{ MODKEY, XF86XK_AudioMute, spawn, SHCMD("amixer set Capture toggle; kill -RTMIN $(pidof -x sbar)") },
{ MODKEY, XK_Print, spawn, SHCMD("xrectsel '%w %h %x %y' | xargs sh -c 'ffmpeg -f x11grab -s \"$1x$2\" -i \"$DISPLAY+$3,$4\" -vframes 1 \"$XDG_PICTURES_DIR/screenshots/$(time.uuid).png\"' shell && notify-send 'Screenshot Finished'") },
{ MODKEY, XK_n, spawn, SHCMD("dunstctl close") },
- { MODKEY, XK_o, spawn, SHCMD("pass otp duolibre | tail -n1 | xsel -ibt 3000") },
+ // `xsel -cb` because there's a small delay before reading password into clipboard, so clear it beforehand to prevent pasting old clipboard
+ { MODKEY, XK_o, spawn, SHCMD("xsel -cb; pass otp duolibre | tail -n1 | xsel -ibt 3000") },
{ MODKEY, XK_q, spawn, SHCMD("qbittorrent & alacritty -t monerod -e monerod") },
{ MODKEY, XK_r, spawn, SHCMD("xsel -ob | rev | xsel -ib") },
// Use "$(xsel -op)" instead of "xsel -op | sdcv" (with sh -c?) because: the latter won't quit if found items similar and require user input. Not sure why.