brewery
notashelf /
c8ba7c4868c03da2f367e170d52d8de059649c71

chroma

public

Lightweight wallpaper daemon for Wayland

Star0tarball
clone
ssh://git@git.notashelf.dev:33/notashelf/chroma.git

Commit c8ba7c4868c0

tarball

NotAShelf <raf@notashelf.dev> · 2026-05-01 10:10 UTC

unverified2 files changed+127-134
meta: replace the INI config sample with a TOML one

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia7864e1038a38c3fcdb0ba95947300bd6a6a6964
diff --git a/chroma.conf.sample b/chroma.conf.sampledeleted file mode 100644index 6afd464..0000000--- a/chroma.conf.sample+++ /dev/null@@ -1,134 +0,0 @@-# This is a sample configuration file for the Chroma wallpaper daemon.-# Lines starting with # are comments and are ignored.-#-# Configuration file locations (checked in order):-#   1. ~/.config/chroma/chroma.conf-#   2. $XDG_CONFIG_HOME/chroma/chroma.conf-#   3. ./chroma.conf (current directory)-#-# To get started:-#   1. Copy this file to ~/.config/chroma/chroma.conf-#   2. Modify the paths to point to your wallpaper images-#   3. Use 'wlr-randr' or similar tools to find your output names-#   4. Restart chroma or send SIGHUP to reload configuration--# This image will be used for any output that doesn't have a specific mapping.-# Supports: JPEG, PNG, BMP, TGA, PSD, GIF, HDR, PIC, PPM, PGM-# Paths can be absolute or relative, ~ expansion is supported.-#-# Alternative examples:-# default_image = ~/Pictures/wallpapers/default.png-# default_image = /usr/share/wallpapers/default.jpg-# default_image = ./wallpapers/fallback.jpg-default_image = ~/.config/chroma/default.jpg---# Whether to run as a background daemon-# Usually set via command line option --daemon, but can be set here too-daemon_mode = false--# Global scaling mode for wallpapers (used as default for all outputs)-# Options: fill, fit, stretch, center-#   fill    - Fill entire output, crop if necessary (default)-#   fit     - Fit image within output, add borders if needed-#   stretch - Stretch to fill output, may distort aspect ratio-#   center  - Center image at original size-scale_mode = fill--# Global image filtering quality (used as default for all outputs)-# Options: nearest, linear, bilinear, trilinear-#   nearest   - Nearest neighbor filtering (pixelated, fast)-#   linear    - Linear filtering (smooth, default)-#   bilinear  - Bilinear filtering (smoother)-#   trilinear - Trilinear filtering (smoothest)-filter_quality = linear--# Default anchor position (0-100 for both x and y)-# anchor_x: 0=left, 50=center, 100=right-# anchor_y: 0=top, 50=center, 100=bottom-# Can use named anchors: center, top, bottom, left, right, top-left, etc.-anchor = center-anchor_x = 50-anchor_y = 50--# Image downsampling settings for performance optimization-# ========================================================-# Enable automatic downsampling of large images to save memory and improve performance-# Set to false to keep original resolution for all images (uses more memory!)-enable_downsampling = true--# Maximum expected output resolution-# Images larger than these dimensions may be automatically downsampled-# Adjust based on your actual monitor setup-max_output_width = 3840   # 4K width (change to 2560 for 1440p, 1920 for 1080p)-max_output_height = 2160  # 4K height (change to 1440 for 1440p, 1080 for 1080p)--# Minimum scale factor-# Prevents images from being scaled below this percentage of original size-# Useful to preserve detail on very high-resolution images-# Range: 0.1 to 1.0 (10% to 100%)-min_scale_factor = 0.25  # Don't scale below 25% of original size--# Output-specific wallpaper mappings-# ==================================-# Basic format: output.OUTPUT_NAME = /path/to/image.ext-#-# You can match outputs by name OR by description:-#   output.DP-1 = /path/to/image.jpg          # Match by port name-#   output.desc:Samsung = /path/to/image.jpg  # Match by description prefix-#-# The description is the human-readable name provided by the compositor-# via the Wayland wl_output description event. For example, if your-# monitor reports "Samsung T27A450" as its description, you can use-# "output.desc:Samsung" to match it. The match is a prefix match, so-# "output.desc:Sam" would also work.-#-# To find your output names and descriptions, run one of these commands:-#   wlr-randr (for wlroots-based compositors)-#   wayland-info | grep wl_output-#   kanshi list-outputs-#-# Extended format with per-output settings:-#   output.OUTPUT_NAME = /path/to/image.ext-#   output.OUTPUT_NAME.scale = fill|fit|stretch|center-#   output.OUTPUT_NAME.filter = nearest|linear|bilinear|trilinear-#   output.OUTPUT_NAME.anchor = center|top|bottom|left|right|top-left|top-right|bottom-left|bottom-right-#-# Anchor specifies which part of the image is anchored to the output:-#   center      - image centered (default)-#   top         - image anchored to top edge-#   bottom      - image anchored to bottom edge-#   left        - image anchored to left edge-#   right       - image anchored to right edge-#   top-left    - image anchored to top-left corner-#   top-right   - image anchored to top-right corner-#   bottom-left - image anchored to bottom-left corner-#   bottom-right - image anchored to bottom-right corner-#-#  Examples:-#  output.HDMI-A-1 = ~/Pictures/wallpaper.jpg-#  output.DP-1 = ~/Pictures/monitor1.png-#  output.DP-1.scale = fit-#  output.DP-1.filter = bilinear-#  output.DP-1.anchor = top-left-#  output.DP-2 = ~/Pictures/monitor2.jpg-#  output.DP-2.scale = stretch-#-#  # Match by monitor description (prefix match):-#  output.desc:Samsung = ~/Pictures/samsung-wallpaper.jpg-#  output.desc:Samsung.scale = fill-#  output.desc:LG Ultra = ~/Pictures/lg-wallpaper.jpg-#  output.desc:BenQ = ~/Pictures/benq-wallpaper.jpg-#-#  # Laptop internal display:-#  output.eDP-1 = ~/Pictures/laptop-wallpaper.jpg-#  output.eDP-1.scale = fill-#  output.eDP-1.anchor = bottom-right-#  output.eDP-1.filter = trilinear-#-#  Custom anchor coordinates (anchor_x, anchor_y override anchor):-#  output.ULTRAWIDE = ~/Pictures/ultrawide.jpg-#  output.ULTRAWIDE.scale = fill-#  output.ULTRAWIDE.anchor_x = 25    # 25% from left edge-#  output.ULTRAWIDE.anchor_y = 10    # 10% from top edge-diff --git a/chroma.toml.sample b/chroma.toml.samplenew file mode 100644index 0000000..9151d0e--- /dev/null+++ b/chroma.toml.sample@@ -0,0 +1,127 @@+# This is a sample TOML configuration file for the Chroma wallpaper daemon.+# For more information about TOML format, see https://toml.io+#+# Configuration file locations (checked in order):+#   1. ~/.config/chroma/chroma.toml+#   2. $XDG_CONFIG_HOME/chroma/chroma.toml+#   3. ./chroma.toml (current directory)+#+# To get started:+#   1. Copy this file to ~/.config/chroma/chroma.toml+#   2. Modify the paths to point to your wallpaper images+#   3. Use 'wlr-randr' or similar tools to find your output names+#   4. Restart chroma or send SIGHUP to reload configuration++# Default wallpaper for outputs without specific mapping+# Supports: JPEG, PNG, BMP, TGA, PSD, GIF, HDR, PIC, PPM, PGM+# Paths can be absolute or relative, ~ expansion is supported.+default_image = "~/.config/chroma/default.jpg"++# Whether to run as a background daemon+# Usually set via command line option --daemon, but can be set here too+daemon_mode = false++# Global scaling mode for wallpapers (used as default for all outputs)+# Options: fill, fit, stretch, center+#   fill    - Fill entire output, crop if necessary (default)+#   fit     - Fit image within output, add borders if needed+#   stretch - Stretch to fill output, may distort aspect ratio+#   center  - Center image at original size+scale_mode = "fill"++# Global image filtering quality (used as default for all outputs)+# Options: nearest, linear, bilinear, trilinear+#   nearest   - Nearest neighbor filtering (pixelated, fast)+#   linear    - Linear filtering (smooth, default)+#   bilinear  - Bilinear filtering (smoother)+#   trilinear - Trilinear filtering (smoothest)+filter_quality = "linear"++# Default anchor position (0-100 for both x and y)+# anchor_x: 0=left, 50=center, 100=right+# anchor_y: 0=top, 50=center, 100=bottom+# Can use named anchors: center, top, bottom, left, right, top-left, etc.+anchor = "center"+anchor_x = 50+anchor_y = 50++# Image downsampling settings for performance optimization+[downsampling]+# Enable automatic downsampling of large images to save memory and improve performance+# Set to false to keep original resolution for all images (uses more memory!)+enable = true++# Maximum expected output resolution+# Images larger than these dimensions may be automatically downsampled+# Adjust based on your actual monitor setup+max_output_width = 3840   # 4K width (change to 2560 for 1440p, 1920 for 1080p)+max_output_height = 2160  # 4K height (change to 1440 for 1440p, 1080 for 1080p)++# Minimum scale factor+# Prevents images from being scaled below this percentage of original size+# Useful to preserve detail on very high-resolution images+# Range: 0.1 to 1.0 (10% to 100%)+min_scale_factor = 0.25  # Don't scale below 25% of original size++# Output-specific wallpaper mappings+# ==================================+# Each [[output]] block defines a mapping for a specific output.+#+# You can match outputs by name OR by description:+#   name = "DP-1"          # Match by port name+#   name = "desc:Samsung"  # Match by description prefix+#+# The description is the human-readable name provided by the compositor+# via the Wayland wl_output description event. For example, if your+# monitor reports "Samsung T27A450" as its description, you can use+# "desc:Samsung" to match it. The match is a prefix match, so+# "desc:Sam" would also work.+#+# To find your output names and descriptions, run one of these commands:+#   wlr-randr (for wlroots-based compositors)+#   wayland-info | grep wl_output+#   kanshi list-outputs++[[output]]+name = "DP-1"+image = "~/Pictures/monitor1.jpg"+scale = "fill"+filter = "linear"+anchor = "center"++[[output]]+name = "DP-2"+image = "~/Pictures/monitor2.png"+scale = "fit"++[[output]]+name = "HDMI-A-1"+image = "~/Pictures/hdmi_wallpaper.jpg"+scale = "stretch"++# Match by monitor description (prefix match):+[[output]]+name = "desc:Samsung"+image = "~/Pictures/samsung-wallpaper.jpg"+scale = "fill"++[[output]]+name = "desc:LG Ultra"+image = "~/Pictures/lg-wallpaper.jpg"+scale = "fit"++# Laptop internal display:+[[output]]+name = "eDP-1"+image = "~/Pictures/laptop-wallpaper.jpg"+scale = "fill"+anchor = "bottom-right"+filter = "trilinear"++# Custom anchor coordinates (anchor_x, anchor_y override anchor):+[[output]]+name = "ULTRAWIDE"+image = "~/Pictures/ultrawide.jpg"+scale = "fill"+anchor_x = 25    # 25% from left edge+anchor_y = 10    # 10% from top edge