Browse Source

Added remote image viewing to sxiv and moved rtv to sxiv

tags/v0.5.0
Micah Halter 5 months ago
parent
commit
572649b557
3 changed files with 19 additions and 2 deletions
  1. 2
    0
      CHANGELOG.md
  2. 2
    2
      rtv/.mailcap
  3. 15
    0
      scripts/.config/Scripts/sxiveh

+ 2
- 0
CHANGELOG.md View File

@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9 9
 
10 10
 ### Added
11 11
 
12
+- created `sxiveh` script to view remote images/gifs in `sxiv`
12 13
 - `sxiv` application to replace `feh`
13 14
 - `G'MIC` plugin to Gimp
14 15
 - `entr` and auto compilation to vim
@@ -17,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
17 18
 
18 19
 ### Changed
19 20
 
21
+- moved rtv from `feh` to `sxiv`
20 22
 - moved from `scrot` to `maim` for screenshots
21 23
 
22 24
 ## [0.4.0] - 2018-11-22

+ 2
- 2
rtv/.mailcap View File

@@ -1,6 +1,6 @@
1
-image/x-imgur-album; feh --scale-down --auto-zoom %s; test=test -n "$DISPLAY"
1
+image/x-imgur-album; $HOME/.config/Scripts/sxiveh '%s'; test=test -n "$DISPLAY"
2 2
 image/gif; mpv '%s' --autofit 640x480 --loop=inf; test=test -n "$DISPLAY"
3
-image/*; feh --scale-down --auto-zoom '%s'; test=test -n "$DISPLAY"
3
+image/*; $HOME/.config/Scripts/sxiveh '%s'; test=test -n "$DISPLAY"
4 4
 
5 5
 video/x-youtube; mpv --ytdl-format=best '%s' --autofit 640x480; test=test -n "$DISPLAY"
6 6
 video/*; mpv '%s' --autofit 640x480 --loop=inf; test=test -n "$DISPLAY"

+ 15
- 0
scripts/.config/Scripts/sxiveh View File

@@ -0,0 +1,15 @@
1
+#!/usr/bin/bash
2
+
3
+case $@ in
4
+  http*://*)
5
+    folder="/tmp/$(date '+%Y%m%d%H%M%S%N')-sxevimages"
6
+    mkdir $folder
7
+    for url in $@; do
8
+      name="$folder/${url##*/}"
9
+      curl -L -o $name -s $url
10
+    done
11
+    sxiv -ba $folder/*
12
+    rm -r $folder
13
+    ;;
14
+  *) sxiv $@;;
15
+esac

Loading…
Cancel
Save