.\" Generated by scdoc 1.11.5 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "waybar\-image" "5" "2026\-11\-05" .PP .SH NAME .PP waybar \- image module .PP .SH DESCRIPTION .PP The \fBimage\fR module displays container of images(or image) from a provided paths .PP .SH REMARK .PP This module has been rewritten to add multiple image rendering functionality.\& To avoid users inconvenience of breaking changes, everything related to old(only one \fBimage\fR) implementation has been left untouched including configuration part.\& For this reason this wiki page is split into two parts .PP .SH CONFIGURATION .PP For single \fBimage\fR .PP \fBpath\fR: .br typeof: string .br The path to the image.\& .PP \fBexec\fR: .br typeof: string .br The path to the script, which should return image path file.\& .br It will only execute if the path is not set .PP \fBsize\fR: .br typeof: integer .br The width/height to render the image.\& .PP \fBinterval\fR: .br typeof: integer or float .br The interval (in seconds) to re\-render the image.\& .br If set to a positive value, the minimum is 0.\&001 (1ms).\& Values smaller than 1ms will be set to 1ms.\& .br Zero or negative values are treated as "once".\& .br This is useful if the contents of \fBpath\fR changes.\& .br If no \fBinterval\fR is defined, the image will only be rendered once.\& .PP \fBsignal\fR: .br typeof: integer .br The signal number used to update the module.\& .br This can be used instead of \fBinterval\fR if the file changes irregularly.\& .br The number is valid between 1 and N, where \fBSIGRTMIN+N\fR = \fBSIGRTMAX\fR.\& .PP \fBon\-click\fR: .br typeof: string .br Command to execute when clicked on the module.\& .PP \fBon\-click\-middle\fR: .br typeof: string .br Command to execute when middle\-clicked on the module using mousewheel.\& .PP \fBon\-update\fR: .br typeof: string .br Command to execute when the module is updated.\& .PP \fBon\-scroll\-up\fR: .br typeof: string .br Command to execute when scrolling up on the module.\& .PP \fBon\-scroll\-down\fR: .br typeof: string .br Command to execute when scrolling down on the module.\& .PP \fBsmooth\-scrolling\-threshold\fR: .br typeof: double .br Threshold to be used when scrolling.\& .PP \fBtooltip\fR: .br typeof: bool .br default: true .br Option to enable tooltip on hover.\& .PP \fBexpand\fR: .br typeof: bool .br default: false .br Enables this module to consume all left over space dynamically.\& .PP .SH SCRIPT OUTPUT .PP Similar to the \fBcustom\fR module, output values of the script are \fBnewline\fR separated.\& The following is the output format: .PP .nf .RS 4 $path\\n$tooltip .fi .RE .PP .SH EXAMPLES .PP .nf .RS 4 "image#album\-art": { "path": "/tmp/mpd_art", "size": 32, "interval": 5, "on\-click": "mpc toggle" } .fi .RE .PP Using \fBexec\fR to fetch the image via a script: .PP .nf .RS 4 "image#album\-art": { "exec": "~/\&.config/waybar/custom/spotify/album_art\&.sh", "size": 32, "interval": 30 } .fi .RE .PP Where \fBalbum_art.\&sh\fR looks like this: .PP .nf .RS 4 #!/bin/bash album_art=$(playerctl \-p spotify metadata mpris:artUrl) if [[ \-z $album_art ]]; then # spotify is dead, we should die too\&. exit fi curl \-s "${album_art}" \-\-output "/tmp/cover\&.jpeg" echo "/tmp/cover\&.jpeg" .fi .RE .PP .SH STYLE .PP .PD 0 .IP \(bu 4 \fB#image\fR .IP \(bu 4 \fB#image.\&empty\fR .PD .PP .SH CONFIGURATION .PP For multiple \fBimage\fR .PP \fBsize\fR: .br typeof: integer .br default: 16 .br Minumum size of the rendered image in pixels.\& .PP \fBinterval\fR: .br typeof: integer or float .br The interval (in seconds) to re\-render the module.\& .br If set to a positive value, the minimum is 0.\&001 (1ms).\& Values smaller than 1ms will be set to 1ms.\& .br Zero or negative values (and the literal "once") are treated as "once".\& .br This is useful if image path or other property is being changed over time.\& .br If no \fBinterval\fR is provided, the module will only be rendered once.\& .PP \fBmultiple\fR: .br typeof: bool .br default: false .br this parameter is used to decide if old \fBimage\fR implementation should be .br used(therefore render only one image) or to pick a new implementation to .br rended multiple images provided from this config.\& default value of this .br parameter is false.\& .PP \fBsignal\fR: .br typeof: interger .br default: 0 .br The signal number is used to redraw the module.\& .br This is used if \fBinterval\fR is not provided and module should change .br regularly depended on external events, e.\&g when clicking on it.\& .br The provided value is valid between 1 and N, where SIGRTMIN+N <= SIGRTMAX.\& .br e.\&g if \fBsignal\fR = 7, 34 + 7 = 41, which means waybar process should .br receive signal 41 to redraw this module, since SIGRTMIN = 34 (see '\&kill \-l'\&).\& .PP \fBentries\fR: .br typeof: array .br default: empty array .br Json array of objects consisting of several fields .br this is a main part of configuration where per image properties are defined .PP .RS 4 \fBpath\fR: .br typeof: string .br default: empty string .br file path of picture to draw .PP \fBmarker\fR: .br typeof: string .br default: empty string .br user defined per image keyword(marker) to identify them, e.\&g in styles.\&css .br e.\&g if you want to draw 3 pictures and one of them dimmed, you can give .br \fBmarker\fR: "dimmed" value and in styles.\&css write something like this .br #image .\&dimmed { opacity: 0.\&3 } .PP \fBtooltip\fR: .br typeof: string .br default: empty string .br description of the image displayed on hover .PP \fBon\-click\fR: .br typeof: string .br default: empty string .br action to perform when clicking on the image.\& .br The action can be any system or custom binary/script .br e.\&g if { "on\-click": "notify\-send "hello world"" } .br "hello world" will appear as notification.\& .PP .RE \fBexec\fR: .br typeof: string .br default: empty string .br same as \fBentries\fR but provided from external script which should dynamically .br return json array of objects consisting of same keys as \fBentries\fR.\& .br This option is specifically useful in combination with \fBsignal\fR option without \fBinterval\fR provided.\& .PP .SH Examples .PP With entries .nf .RS 4 "image#wentr": { "entries": [ { "path": "/home/user/Pictures/idk1\&.png", "marker": "dimmed", "tooltip": "dimmed image", "on\-click": "notify\-send "hello world"" }, { "path": "/home/user/Pictures/idk2\&.png", "marker": "normal", "on\-click": "myCustomScript\&.py" } ], "size": 32, "interval": 1 // will redraw every 5 seconds } .fi .RE .PP With exec .nf .RS 4 "image#wexec": { "exec": "imageProvider\&.py", "size": 32, "signal": 7 // e\&.g \&'pkill \-n waybar \-\-signal 41\&' will trigger redraw } .fi .RE .PP where imageProvider.\&py looks like this .nf .RS 4 #!/usr/bin/python import json dir = "/home/user/Pictures/" out = [ {"path": dir + "idk1\&.png", "marker": "clickable", "on\-click": "echo \&'hello world\&'"}, {"path": dir + "idk2\&.png", "marker": "normal", "tooltip": "sample tooltip"}, {"path": dir + "idk3\&.png", "marker": "important"}, ] res = json\&.dumps(out) print(res) .fi .RE .PP .SS Example styles .nf .RS 4 #image \&.important { opacity: 0\&.9; } #image button\&.important { opacity: 0\&.2 } #image \&.normal { opacity: 0\&.3 } .fi .RE .PP .SH STYLE .PP .PD 0 .IP \(bu 4 \fB#image\fR .IP \(bu 4 \fB#image\fR.\&empty /*when image could not be rendered*/ .IP \(bu 4 \fB#image\fR button /*when on\-click is provided; a Gtk::Button is matched by the element selector, not a class*/ .IP \(bu 4 \fB#image\fR.\&\fBmarker\fR /*where \fBmarker\fR is parameter from config*/ .IP \(bu 4 \fB#image\fR button.\&\fBmarker\fR .PD .PP