Browse Source

Moved from feh file viewer to sxiv

tags/v0.5.0
Micah Halter 3 months ago
parent
commit
a1f1ab0e86

+ 1
- 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
+- `sxiv` application to replace `feh`
12 13
 - `G'MIC` plugin to Gimp
13 14
 - `entr` and auto compilation to vim
14 15
 - vim mapping to open html file in browser

+ 1
- 0
Makefile View File

@@ -150,6 +150,7 @@ arch: pacman
150 150
 		smartmontools \
151 151
 		speedtest-cli \
152 152
 		stow \
153
+		sxiv \
153 154
 		tcl \
154 155
 		terminus-font \
155 156
 		texlive-most \

+ 2
- 1
ranger/.config/ranger/rifle.conf View File

@@ -175,10 +175,11 @@ ext djvu, has atril,  X, flag f = atril -- "$@"
175 175
 mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
176 176
 mime ^image/svg, has display,  X, flag f = display -- "$@"
177 177
 
178
+mime ^image/gif, has mpv, X, flag f = sxiv -a -b -- "$@"
178 179
 mime ^image/gif, has mpv, X, flag f = mpv --loop -- "$@"
179 180
 
180 181
 mime ^image, has pqiv,      X, flag f = pqiv -- "$@"
181
-mime ^image, has sxiv,      X, flag f = sxiv -- "$@"
182
+mime ^image, has sxiv,      X, flag f = sxiv -a -b -- "$@"
182 183
 mime ^image, has feh,       X, flag f = feh -- "$@"
183 184
 mime ^image, has mirage,    X, flag f = mirage -- "$@"
184 185
 mime ^image, has ristretto, X, flag f = ristretto "$@"

+ 46
- 0
sxiv/.config/sxiv/exec/key-handler View File

@@ -0,0 +1,46 @@
1
+#!/bin/sh
2
+while read file
3
+do
4
+  dmenu="$HOME/.config/Scripts/dmenucolor"
5
+  fullpath="$(pwd)/$file"
6
+  case "$1" in
7
+    "w")
8
+      cp -f "$file" ~/.config/wall &&
9
+      cp -f "$file" /usr/share/wallpaper/wall &&
10
+      wal -g -i "$HOME/.config/wall" -o "$HOME/.config/Scripts/wal-set"
11
+      notify-send "Wallpaper changed."
12
+      ;;
13
+    "W")
14
+      cp -f "$file" ~/.config/wall &&
15
+      cp -f "$file" /usr/share/wallpaper/wall &&
16
+      feh --bg-scale "$HOME/.config/wall"
17
+      notify-send "Wallpaper changed."
18
+      ;;
19
+    "c")
20
+      [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/Scripts/folders | awk '{print $2}' | $dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
21
+      [ -z "$destdir" ] && exit
22
+      cp "$file" "$destdir" && notify-send -i "$fullpath" "$file copied to $destdir." &
23
+      ;;
24
+    "m")
25
+      [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/Scripts/folders | awk '{print $2}' | $dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
26
+      [ -z "$destdir" ] && exit
27
+      cp "$file" "$destdir" && notify-send -i "$fullpath" "$file moved to $destdir." &
28
+      ;;
29
+    "r")
30
+      convert -rotate 90 "$file" "$file" ;;
31
+    "R")
32
+      convert -rotate -90 "$file" "$file" ;;
33
+    "f")
34
+      convert -flop "$file" "$file" ;;
35
+    "y")
36
+      echo -n "$file" | xclip -selection clipboard &&
37
+      notify-send "$file copied to clipboard" & ;;
38
+    "Y")
39
+      echo -n "$fullpath" | xclip -selection clipboard &&
40
+      notify-send "$fullpath copied to clipboard" & ;;
41
+    "d")
42
+      [ "$(printf "No\\nYes" | $dmenu -i -p "Delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
43
+    "G")
44
+      gimp "$file" & ;;
45
+  esac
46
+done

+ 4
- 0
sxiv/.local/share/applications/sxiv.desktop View File

@@ -0,0 +1,4 @@
1
+[Desktop Entry]
2
+Type=Application
3
+Name=sxiv image viewer
4
+Exec=/usr/bin/sxiv -a -b %u

+ 4
- 0
xdgopen/.config/mimeapps.list View File

@@ -13,3 +13,7 @@ application/xhtml+xml=qutebrowser.desktop
13 13
 application/x-extension-xhtml=qutebrowser.desktop
14 14
 application/x-extension-xht=qutebrowser.desktop
15 15
 application/pdf=zathura.desktop
16
+application/pdf=zathura.desktop
17
+image/png=sxiv.desktop
18
+image/jpeg=sxiv.desktop
19
+image/gif=sxiv.desktop

Loading…
Cancel
Save