summaryrefslogtreecommitdiffstats
path: root/.scripts/i3cmds
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2018-11-18 20:31:24 -0500
committerLuke Smith <luke@lukesmith.xyz>2018-11-18 20:31:24 -0500
commit21b4f8c613c45a2694129f5bba37b2ebc934633b (patch)
tree3fc5dec870561badcf45b0dbcd27ed9a4e3d6e95 /.scripts/i3cmds
parent7fdc2fac93797877abd2639ff6bd6e67730391e7 (diff)
downloadeibhear-21b4f8c613c45a2694129f5bba37b2ebc934633b.tar.gz
eibhear-21b4f8c613c45a2694129f5bba37b2ebc934633b.tar.zst
eibhear-21b4f8c613c45a2694129f5bba37b2ebc934633b.zip
showclip and qrcode show binds
Diffstat (limited to '.scripts/i3cmds')
-rwxr-xr-x.scripts/i3cmds/showclip16
-rwxr-xr-x.scripts/i3cmds/xcqr9
2 files changed, 25 insertions, 0 deletions
diff --git a/.scripts/i3cmds/showclip b/.scripts/i3cmds/showclip
new file mode 100755
index 0000000..f34addc
--- /dev/null
+++ b/.scripts/i3cmds/showclip
@@ -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"
diff --git a/.scripts/i3cmds/xcqr b/.scripts/i3cmds/xcqr
new file mode 100755
index 0000000..5e7b5f0
--- /dev/null
+++ b/.scripts/i3cmds/xcqr
@@ -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 \
+ -