Browse Source

sxiv: удаление изображений

Maxim Likhachev 6 years ago
parent
commit
32dd432a2c
  1. 3
      etc/rc.linux-gnu
  2. 20
      etc/soft/sxiv/exec/image-info
  3. 19
      etc/soft/sxiv/exec/key-handler

3
etc/rc.linux-gnu

@ -51,7 +51,7 @@ mkdir -p ~/.config/dunst @@ -51,7 +51,7 @@ mkdir -p ~/.config/dunst
- soft/conky/conkyrc.$(uname -i) ~
- soft/ctags/ctags ~
+ soft/nvim ~/.config
+ soft/vifm ~
+ soft/vifm ~/.config
- soft/vimperator ~
- soft/vimperator/vimperatorrc ~
+ soft/git/gitconfig ~
@ -59,6 +59,7 @@ mkdir -p ~/.config/dunst @@ -59,6 +59,7 @@ mkdir -p ~/.config/dunst
- soft/stalonetray/stalonetrayrc ~
- soft/tmux/tmux.conf ~
+ media/alsa/asoundrc ~
+ soft/sxiv ~/.config
+ soft/dfc ~/.config
+ soft/polybar ~/.config
+ soft/htop ~/.config

20
etc/soft/sxiv/exec/image-info

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
#!/bin/sh
# Example for $XDG_CONFIG_HOME/sxiv/exec/image-info
# Called by sxiv(1) whenever an image gets loaded.
# The output is displayed in sxiv's status bar.
# Arguments:
# $1: path to image file
# $2: image width
# $3: image height
s=" " # field separator
exec 2>/dev/null
filename=$(basename -- "$1")
filesize=$(du -Hh -- "$1" | cut -f 1)
geometry="${2}x${3}"
echo "${filesize}${s}${geometry}${s}${filename}"

19
etc/soft/sxiv/exec/key-handler

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
#!/bin/sh
# $XDG_CONFIG_HOME/sxiv/exec/key-handler
#
# Called by sxiv(1) after the external prefix key (C-x by default) is pressed.
# The next key combo is passed as its first argument. Passed via stdin are the
# images to act upon, one path per line: all marked images, if in thumbnail
# mode and at least one image has been marked, otherwise the current image.
# sxiv(1) blocks until this script terminates. It then checks which images
# have been modified and reloads them.
#
# The key combo argument has the following form: "[C-][M-][S-]KEY",
# where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier states and KEY is the X
# keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix.
case "$1" in
"C-d") tr '\n' '\0' | xargs -IF -0 rm -v F;;
esac
Loading…
Cancel
Save