-
|
Hi and thanks a lot for Conky! I'm running Sway on Arch Linux and I'd like to have Conky on top of the wallpaper of each monitor/display. Currently, I'm using two external monitors and one built into a laptop. Preferably, I'd use only one Conky config file. I'm using this Bash script as a stopgap solution to launch Conky on each monitor: This works but seems not ideal. For example, Conky wouldn't start on a newly attached monitor. My current Is there a more elegant way to make Conky show up on all monitors? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I don't think so. In wayland, we can't 1) tell the compositor where to place the window, and 2) (I think) we can't even create multiple windows using the same framebuffer (to show same content), without internally copying the content into multiple framebuffers. This all boils down to current design of Wayland. Lastly, conky is not designed to output to multiple windows - adding something like that would require reworking a lot of code in addition to (2). So an external script like yours is the best possible approach atm. As for opening new window when a monitor is connected - you can use Something like (untested): #!/bin/bash
outputs=$(swaymsg -t get_outputs | jq -r '.[] | select(.active) | .name')
start_on_monitor() {
echo "Starting Conky on $1..."
swaymsg focus output "$1"
conky &
sleep 0.5
}
for out in $outputs; do
start_on_monitor "$out"
done
swaymsg -t subscribe '["output"]' | jq -c 'select(.change == "added") | .current.name' | while read -r output_name; do
# remove quotes around the monitor name
start_on_monitor "$output_name"
done |
Beta Was this translation helpful? Give feedback.
I don't think so. In wayland, we can't 1) tell the compositor where to place the window, and 2) (I think) we can't even create multiple windows using the same framebuffer (to show same content), without internally copying the content into multiple framebuffers. This all boils down to current design of Wayland. Lastly, conky is not designed to output to multiple windows - adding something like that would require reworking a lot of code in addition to (2). So an external script like yours is the best possible approach atm.
As for opening new window when a monitor is connected - you can use
swaymsg -t subscribe '["output"]'which will listen for new outputs. You can then pipe that into a fun…