| 1 | # Example remage config: copy to ~/.config/remage/config.toml and trim to taste. |
| 2 | # |
| 3 | # Your file is merged over the compiled-in defaults, so only list what you change. |
| 4 | # `remage --dump-config` prints every option with its default, and |
| 5 | # `remage --check-config` validates this file. Changes apply live. |
| 6 | |
| 7 | # Theme from the wallpaper. See contrib/matugen/ (or use [theme] pywal = … below). |
| 8 | include = ["~/.cache/matugen/remage.toml"] |
| 9 | |
| 10 | [general] |
| 11 | sort = "natural" |
| 12 | start_mode = "image" |
| 13 | |
| 14 | [image] |
| 15 | fit = "down" |
| 16 | alpha_background = "dots" |
| 17 | slideshow_delay = 4.0 |
| 18 | |
| 19 | [grid] |
| 20 | size = 160 |
| 21 | names = false |
| 22 | |
| 23 | [ui] |
| 24 | statusbar_right = "{format} {width}×{height} {zoom}% {index}/{count}" |
| 25 | |
| 26 | [theme] |
| 27 | preset = "nothing-dark" |
| 28 | # pywal = "~/.cache/wal/colors.json" |
| 29 | |
| 30 | # ── User commands ───────────────────────────────────────────────────────────────────────── |
| 31 | # These replace nsxiv's key-handler (`d`, `w` and `c` used to run through C-x). They act on |
| 32 | # the marked files if there are any, otherwise on the current one. |
| 33 | |
| 34 | [commands.delete] |
| 35 | desc = "Delete files" |
| 36 | run = ["rm", "--", "{files}"] |
| 37 | confirm = "Delete {count} file(s)?" # asks inline: y deletes, any other key cancels |
| 38 | # after = "refresh" is the default, so deleted files drop out of the queue at once. |
| 39 | |
| 40 | [commands.wallpaper] |
| 41 | desc = "Set as wallpaper" |
| 42 | run = ["setwall", "-p", "{file}"] |
| 43 | targets = "current" |
| 44 | output = "ignore" |
| 45 | |
| 46 | [commands.copy] |
| 47 | desc = "Copy image" |
| 48 | run = "wl-copy --type image/png < {file}" # X11: xclip -sel c -t image/png < {file} |
| 49 | targets = "current" |
| 50 | |
| 51 | [commands.copy-path] |
| 52 | desc = "Copy file paths" |
| 53 | run = "printf '%s\\n' {files} | wl-copy" |
| 54 | |
| 55 | [commands.rotate] |
| 56 | desc = "Rotate files 90° clockwise (re-encodes them)" |
| 57 | run = ["magick", "mogrify", "-rotate", "90", "{files}"] |
| 58 | # The default `after = "refresh"` re-decodes the rotated files. |
| 59 | |
| 60 | [commands.gimp] |
| 61 | desc = "Open in GIMP" |
| 62 | run = ["gimp", "{files}"] |
| 63 | output = "ignore" |
| 64 | after = [] |
| 65 | |
| 66 | # An unmodified nsxiv key-handler still works if you'd rather keep it: |
| 67 | # [commands.legacy-delete] |
| 68 | # run = ["~/.config/nsxiv/exec/key-handler", "d"] |
| 69 | # stdin = "files" |
| 70 | |
| 71 | [keys.global] |
| 72 | "<Space>d" = "run delete" |
| 73 | "<Space>w" = "run wallpaper" |
| 74 | "<Space>c" = "run copy" |
| 75 | "<Space>y" = "run copy-path" |
| 76 | "<Space>r" = "run rotate" |
| 77 | "<Space>g" = "run gimp" |
| 78 | |
| 79 | [keys.image] |
| 80 | "<C-ScrollUp>" = "next" |
| 81 | "<C-ScrollDown>" = "prev" |
| 82 | |
| 83 | # Anything without a built-in decoder, via ImageMagick. |
| 84 | [[decoders]] |
| 85 | match = ["*.psd", "*.xcf", "*.jp2"] |
| 86 | run = ["magick", "{file}[0]", "png:-"] |