Configuration per output
I'd like to be able to configure waybar per output, or possibly show it only on one output under sway. If this is currently possible, it is not documented.
No, it's not possible, I don't think it's complicated to do. I'll do it when I have some time available or if someone else feels capable before.
@mithodin Now implemented in 0ddcf26a45b15e7e96dc7c917556239369d63014 I can't test it right now, but it should work :) How to use
{
"layer": "top",
"output": "eDp-1", <---
"output": ["eDp-1", "VGA"], <--- Multiple output with same configuration
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"],
"modules-right": ["battery", "clock"],
"sway/window": {
"max-length": 50
},
"battery": {
"format": "{capacity}% {icon}",
"format-icons": ["", "", "", "", ""]
},
"clock": {
"format-alt": "{:%a, %d. %b %H:%M}"
}
}
And for different configuration per output with one waybar process
[{
"layer": "top",
"output": "eDp-1",
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"],
"modules-right": ["battery", "clock"],
"sway/window": {
"max-length": 50
},
"battery": {
"format": "{capacity}% {icon}",
"format-icons": ["", "", "", "", ""]
},
"clock": {
"format-alt": "{:%a, %d. %b %H:%M}"
}
}, {
"layer": "top",
"output": "VGA"
"modules-right": [ "clock"],
"clock": {
"format-alt": "{:%a, %d. %b %H:%M}"
}
}]
I'm using this atm and I am able to run this on one monitor with a 3 monitor setup. Not interested in other configurations so I have not tested them out.
One comment I have is that if I have an active window on another output and focus_follows_mouse = no in sway. If I hover over a module for a tooltip my mouse will be moved to the output my active window is in. If my mouse is focused on the output where my bar is, the tooltip shows.
Not a major bug but was disorienting the first time it happened.
Fantastic! Works for me without problem.
Can I buy you a beer or something?
@mithodin I added a donation badge on the readme, it's always nice that his work is appreciated :smile:
Let me know if you would like another issue opened for his but if I turn off the monitor that has the bar and turn it back on the bar does not come back. Below is the error messages I receive. Waybar does not terminate it just seems unable to add itself back to the monitor when it is turned back on.
Bar removed from output: DP-1
Workspaces: Unable to receive IPC payload
Mode: Unable to receive IPC header
Window: Unable to receive IPC header
Yeah add another issue, I'll look at it
Sorry for necrobumping but I dont think this warrants a separate issue.
Is it possible to use wildcards? I for example want to use the same config on every single display I plug in so instead of doing:
"output": ["eDp-1", "DP-1", "DP-2", "VGA"], <--- Multiple output with same configuration
we could just do something like this:
"output": "*",
Sorry for necrobumping but I dont think this warrants a separate issue.
Is it possible to use wildcards? I for example want to use the same config on every single display I plug in so instead of doing:
"output": ["eDp-1", "DP-1", "DP-2", "VGA"], <--- Multiple output with same configurationwe could just do something like this:
"output": "*",
just ommiting the "output" key, already does this behavior @NiciTheNici
is there a way to specify the output in the style.css too? would like to have different css for each monitor.
I am also looking to change the styles for different outputs. Specifically, I want to reduce the font size on the 1080p display to closely match the visually smaller size on the 4k display.
@keystroke3 in config file you need to make two identical bars but with different names and after in css file add
.left {
font-size: 13px;
min-height: 15px;
}
.right {
font-size: 22px;
min-height: 25px;
}