aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/imgurl
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2020-09-18 00:13:07 +0300
committerYaroslav <contact@yaroslavps.com>2020-09-18 00:13:07 +0300
commit840f1e3bdd34b0b4b8d1d199ef6e97b6f1a1951d (patch)
treefd091847979e0ac5d05de15c4f2d9d82c088a4d6 /dotfiles/.local/bin/imgurl
parente5a7e88b25b88f9aa55bbce105467c81472a6aba (diff)
downloadswayrice-840f1e3bdd34b0b4b8d1d199ef6e97b6f1a1951d.tar.gz
swayrice-840f1e3bdd34b0b4b8d1d199ef6e97b6f1a1951d.zip
Use solely mimeo to handle default files/links
Diffstat (limited to 'dotfiles/.local/bin/imgurl')
-rwxr-xr-xdotfiles/.local/bin/imgurl6
1 files changed, 6 insertions, 0 deletions
diff --git a/dotfiles/.local/bin/imgurl b/dotfiles/.local/bin/imgurl
new file mode 100755
index 0000000..2a2cb37
--- /dev/null
+++ b/dotfiles/.local/bin/imgurl
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+[ -z "$1" ] && exit
+
+setsid curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 &
+