Krolyxon
Commit 1d9227a

Branches

Tags

Refs →

remagecontribconfig.example.toml

86 lines · 2.5 KB · TOML

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).
8include = ["~/.cache/matugen/remage.toml"]
9
10[general]
11sort = "natural"
12start_mode = "image"
13
14[image]
15fit = "down"
16alpha_background = "dots"
17slideshow_delay = 4.0
18
19[grid]
20size = 160
21names = false
22
23[ui]
24statusbar_right = "{format} {width}×{height} {zoom}% {index}/{count}"
25
26[theme]
27preset = "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]
35desc = "Delete files"
36run = ["rm", "--", "{files}"]
37confirm = "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]
41desc = "Set as wallpaper"
42run = ["setwall", "-p", "{file}"]
43targets = "current"
44output = "ignore"
45
46[commands.copy]
47desc = "Copy image"
48run = "wl-copy --type image/png < {file}" # X11: xclip -sel c -t image/png < {file}
49targets = "current"
50
51[commands.copy-path]
52desc = "Copy file paths"
53run = "printf '%s\\n' {files} | wl-copy"
54
55[commands.rotate]
56desc = "Rotate files 90° clockwise (re-encodes them)"
57run = ["magick", "mogrify", "-rotate", "90", "{files}"]
58# The default `after = "refresh"` re-decodes the rotated files.
59
60[commands.gimp]
61desc = "Open in GIMP"
62run = ["gimp", "{files}"]
63output = "ignore"
64after = []
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]]
85match = ["*.psd", "*.xcf", "*.jp2"]
86run = ["magick", "{file}[0]", "png:-"]