showclip and qrcode show binds

This commit is contained in:
Luke Smith 2018-11-18 20:31:24 -05:00
parent 7fdc2fac93
commit 21b4f8c613
3 changed files with 27 additions and 1 deletions

View file

@ -129,7 +129,8 @@ bindsym $mod+grave exec --no-startup-id dmenuunicode
bindsym $mod+Shift+Delete exec --no-startup-id lmc truemute ; exec $truepause ; exec --no-startup-id pauseallmpv; workspace 0; exec $term -e htop ; exec $term -e ranger bindsym $mod+Shift+Delete exec --no-startup-id lmc truemute ; exec $truepause ; exec --no-startup-id pauseallmpv; workspace 0; exec $term -e htop ; exec $term -e ranger
# Show selection: # Show selection:
bindsym $mod+Shift+Insert exec --no-startup-id showclip bindsym $mod+Insert exec --no-startup-id showclip
bindsym $mod+Pause exec --no-startup-id xcqr
# #---Letter Key Bindings---# # # #---Letter Key Bindings---# #
bindsym $mod+q [con_id="__focused__" instance="^(?!dropdowncalc|tmuxdd).*$"] kill bindsym $mod+q [con_id="__focused__" instance="^(?!dropdowncalc|tmuxdd).*$"] kill

16
.scripts/i3cmds/showclip Executable file
View file

@ -0,0 +1,16 @@
#!/bin/sh
# Display contents of selection via dunst if running.
# Separate script for i3.
! pgrep -x dunst >/dev/null && echo "dunst not running." && exit
clip=$(xclip -o -selection clipboard)
prim=$(xclip -o -selection primary)
[ "$prim" != "" ] && notify-send "<b>Clipboard:</b>
$prim"
[ "$clip" != "" ] && notify-send "<b>Primary:</b>
$clip"

9
.scripts/i3cmds/xcqr Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
# Credit to Maddison Hellstrom (@b0o on Github)
qrencode -o - -s 1 \
"$(xclip -out -selection clipboard)" |
feh --zoom max \
-F \
--force-aliasing \
--image-bg white \
-