.\" Generated by scdoc 1.11.2 .\" 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-sway-window" "5" "2023-02-28" .P .SH NAME .P waybar - sway window module .P .SH DESCRIPTION .P The \fBwindow\fR module displays the title of the currently focused window in Sway .P .SH CONFIGURATION .P Addressed by \fBsway/window\fR .P \fBformat\fR: .br typeof: string .br default: {title} .br The format, how information should be displayed.\& .P \fBrotate\fR: .br typeof: integer .br Positive value to rotate the text label.\& .P \fBmax-length\fR: .br typeof: integer .br The maximum length in character the module should display.\& .P \fBmin-length\fR: .br typeof: integer .br The minimum length in characters the module should take up.\& .P \fBalign\fR: .br typeof: float .br The alignment of the text, where 0 is left-aligned and 1 is right-aligned.\& If the module is rotated, it will follow the flow of the text.\& .P \fBon-click\fR: .br typeof: string .br Command to execute when clicked on the module.\& .P \fBon-click-middle\fR: .br typeof: string .br Command to execute when middle-clicked on the module using mousewheel.\& .P \fBon-click-right\fR: .br typeof: string .br Command to execute when you right clicked on the module.\& .P \fBon-update\fR: .br typeof: string .br Command to execute when the module is updated.\& .P \fBon-scroll-up\fR: .br typeof: string .br Command to execute when scrolling up on the module.\& .P \fBon-scroll-down\fR: .br typeof: string .br Command to execute when scrolling down on the module.\& .P \fBsmooth-scrolling-threshold\fR: .br typeof: double .br Threshold to be used when scrolling.\& .P \fBtooltip\fR: .br typeof: bool .br default: true .br Option to disable tooltip on hover.\& .P \fBrewrite\fR: .br typeof: object .br Rules to rewrite window title.\& See \fBrewrite rules\fR.\& .P \fBicon\fR: .br typeof: bool .br default: false .br Option to hide the application icon.\& .P \fBicon-size\fR: .br typeof: integer .br default: 24 .br Option to change the size of the application icon.\& .P .SH FORMAT REPLACEMENTS .P \fB{title}\fR: The title of the focused window.\& .P \fB{app_id}\fR: The app_id of the focused window.\& .P \fB{shell}\fR: The shell of the focused window.\& It'\&s '\&xwayland'\& when the window is running through xwayland, otherwise it'\&s '\&xdg-shell'\&.\& .P .SH REWRITE RULES .P \fBrewrite\fR is an object where keys are regular expressions and values are rewrite rules if the expression matches.\& Rules may contain references to captures of the expression.\& .P Regular expression and replacement follow ECMA-script rules.\& .P If no expression matches, the title is left unchanged.\& .P Invalid expressions (e.\&g.\&, mismatched parentheses) are skipped.\& .P .SH EXAMPLES .P .nf .RS 4 "sway/window": { "format": "{}", "max-length": 50, "rewrite": { "(\&.*) - Mozilla Firefox": "🌎 $1", "(\&.*) - zsh": "> [$1]" } } .fi .RE .P .SH STYLE .P .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fB#window\fR .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fBwindow#waybar.\&empty\fR When no windows is in the workspace .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fBwindow#waybar.\&solo\fR When one window is in the workspace .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fBwindow#waybar.\&\fR Where \fBapp_id\fR is the app_id or \fBinstance\fR name like (\fBchromium\fR) of the only window in the workspace .RE