Is there a way to change the position of the volume change popup/osd?

Is there a way to change the position/style of the volume change popup in kde?
I have wondering as how to do this, I know that I can disable it entirely, but that’s not what I am looking for. It doesn’t matter that much to me, its just a bit annoying.

Thank you for your time

If it’s in the system tray, then no ─ or at least, not without moving the whole system tray.

If it is a separate widget on the panel, then yes ─ you can put that anywhere you like.

If this is not what you are inquiring about, then please be more specific.

Sorry, I mean the volume change Popup that shows up in the middle of your screen when you press the volume change buttons on your keyboard.

2 Likes

I don’t have any such buttons on my keyboard. :stuck_out_tongue:

Alright, after a lot of restarts I got a fix for this that is up to date, I don’t know if it will persist after an update or if it will even work on other aspect ratios but here.
I now know that the position part of this fix will not likely work on a multi monitor setup but the size change part will, so if you are using multiple monitors, only use the edits to OsdItem.qml. Otherwise,
Go to
/home/usr/.local/share/plasma/look-and-feel/yourthemehere/contents/osd/Osd.qml
And copy this to line 30:
//Set vertical position of OSD
property int yPos: Math.round(Screen.height/8 * 7)
y: yPos
onYChanged: {if (y != yPos) y = yPos}
//Set horizontal position of OSD
property int xPos: Math.round(Screen.width/8 * 7)
x: xPos
onXChanged: {if (x != xPos) x = xPos}

Then, go to
/home/usr/.local/share/plasma/look-and-feel/yourthemehere/contents/osd/OsdItem.qml
And replace lines 26-27 with:
height: Math.min(units.gridUnit * 7, Screen.desktopAvailableHeight / 5)
width: Math.min(units.gridUnit * 15, Screen.desktopAvailableHeight / 5)

And restart your system.
I have noticed that other global themes don’t have a osd folder, I tried just copy and pasting the osd folder from my theme into those themes and it seemed to work, but I don’t know if there is a correlation, so if that doesn’t work for you, try using a theme that does and following these instructions but for that theme and then use your preferred theme, the changes should carry over. A theme that should have an osd folder is Brise-dark-lightly.

I did this while definitely not knowing what I was doing so hopefully someone who does notices this post and improves it.
For reference, the edits in Osditem.qml control size and the ones in Osd.qml control position. I don’t know how to change the exact position of the osd, I just copied someone else’s code for changing the y pos and changed some vars to x and that worked, however whenever I change the 8*7 values it makes the osd just not show up.

To make the changes persist after an update you can copy the look and feel theme folder and use that instead and that might work, I can’t test it right now. But you will if this fix stops working suddenly.

Thanks to @ishaan2479 for providing me with the link that helped me:

Edit: if you used this to change the osd before 9:32 1/21/22 NYC time and it did not work, I made a mistake when posting this and the asterisks could not be copied, but I fixed it now, so hopefully no one has problems with this.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.