Skip to content

Customize position of OSD on screen #106

Answered by jmickelin
ttzhou asked this question in Q&A
Discussion options

You must be logged in to vote

The vertical position can be set with the --top-margin argument to swayosd-server, which takes a value from 0 to 1 indicating the percentage of the screen height to offset it from the top of the screen. Internally, this option uses the wlr layershell protocol to anchor it in a precise location on screen, and updates the position automatically if e.g. the resolution or scaling changes.

For the horizontal position, it's a bit trickier, but possible using CSS. Since there is no corresponding argument, you won't get any of the automatic updates. But it's better than nothing. Here's how to do it in SwayOSD 0.2.0:

* {
    --screen-width: 1920px;
    --screen-scaling: 0.9;
    --window-side-padding

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ttzhou
Comment options

Answer selected by ttzhou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants