.\" Generated by scdoc 1.11.3 .\" 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" "2024-09-15" .PP .SH NAME .PP waybar - sway window module .PP .SH DESCRIPTION .PP The \fBwindow\fR module displays the title of the currently focused window in Sway .PP .SH CONFIGURATION .PP Addressed by \fBsway/window\fR .PP \fBformat\fR: .br typeof: string .br default: {title} .br The format, how information should be displayed.\& .PP \fBrotate\fR: .br typeof: integer .br Positive value to rotate the text label.\& .PP \fBmax-length\fR: .br typeof: integer .br The maximum length in character the module should display.\& .PP \fBmin-length\fR: .br typeof: integer .br The minimum length in characters the module should accept.\& .PP \fBalign\fR: .br typeof: float .br The alignment of the label within the module, where 0 is left-aligned and 1 is right-aligned.\& If the module is rotated, it will follow the flow of the text.\& .PP \fBjustify\fR: .br typeof: string .br The alignment of the text within the module'\&s label, allowing options '\&left'\&, '\&right'\&, or '\¢er'\& to define the positioning.\& .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-click-right\fR: .br typeof: string .br Command to execute when you right-click on the module.\& .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 disable tooltip on hover.\& .PP \fBall-outputs\fR: .br typeof: bool .br default: false .br Option to show the focused window along with its workspace styles on all outputs.\& .PP \fBoffscreen-css\fR: .br typeof: bool .br default: false .br Only effective when all-outputs is true.\& Adds style according to present windows on unfocused outputs instead of showing the focused window and style.\& .PP \fBoffscreen-css-text\fR: .br typeof: string .br Only effective when both all-outputs and offscreen-style are true.\& On screens currently not focused, show the given text along with that workspace styles.\& .PP \fBshow-focused-workspace-name\fR: .br typeof: bool .br default: false .br If the workspace itself is focused and the workspace contains nodes or floating_nodes, show the workspace name.\& If not set, text remains empty but styles according to nodes in the workspace are still applied.\& .PP \fBrewrite\fR: .br typeof: object .br Rules to rewrite the module format output.\& See \fBrewrite rules\fR.\& .PP \fBicon\fR: .br typeof: bool .br default: false .br Option to hide the application icon.\& .PP \fBicon-size\fR: .br typeof: integer .br default: 24 .br Option to change the size of the application icon.\& .PP .SH FORMAT REPLACEMENTS .PP \fB{title}\fR: The title of the focused window.\& .PP \fB{app_id}\fR: The app_id of the focused window.\& .PP \fB{shell}\fR: The shell of the focused window.\& It'\&s '\&xwayland'\& when the window is running through xwayland, otherwise, it'\&s '\&xdg-shell'\&.\& .PP .SH REWRITE RULES .PP \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.\& .PP Regular expression and replacement follow ECMA-script rules.\& .PP If no expression matches, the format output is left unchanged.\& .PP Invalid expressions (e.\&g.\&, mismatched parentheses) are skipped.\& .PP .SH EXAMPLES .PP .nf .RS 4 "sway/window": { "format": "{}", "max-length": 50, "rewrite": { "(\&.*) - Mozilla Firefox": "🌎 $1", "(\&.*) - zsh": "> [$1]" } } .fi .RE .PP .SH STYLE .PP .PD 0 .IP \(bu 4 \fB#window\fR .PD .PP The following classes are applied to the entire Waybar rather than just the window widget: .PP .PD 0 .IP \(bu 4 \fBwindow#waybar.\&empty\fR When no windows are in the workspace, or screen is not focused and offscreen-css option is not set .IP \(bu 4 \fBwindow#waybar.\&solo\fR When one tiled window is in the workspace .IP \(bu 4 \fBwindow#waybar.\&floating\fR When there are only floating windows in the workspace .IP \(bu 4 \fBwindow#waybar.\&stacked\fR When there is more than one window in the workspace and the workspace layout is stacked .IP \(bu 4 \fBwindow#waybar.\&tabbed\fR When there is more than one window in the workspace and the workspace layout is tabbed .IP \(bu 4 \fBwindow#waybar.\&tiled\fR When there is more than one window in the workspace and the workspace layout is splith or splitv .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