Change volume OSD position

Hey there,
I’m looking into how to change the position of volume OSD.

I’m on KDE Plasma 6.3, Wayland, Fedora 41.

So far I managed to find out that I need my updates to be in
~/.local/share/plasma/look-and-feel/my-theme/contents/osd/Osd.qml. But I am unable to apply the changes. I’m trying to move the OSD volume to be in the bottom part of the monitor instead of in the center.

What I tried was

/*
    SPDX-FileCopyrightText: 2014 Martin Klapetek <mklapetek@kde.org>

    SPDX-License-Identifier: GPL-2.0-or-later
*/

import QtQuick
import org.kde.plasma.core as PlasmaCore

PlasmaCore.Dialog {
    location: PlasmaCore.Types.Floating
    type: PlasmaCore.Dialog.OnScreenDisplay
    x: Math.round((Screen.width - width) / 2)
    y: 0
    outputOnly: true

    property alias timeout: osd.timeout
    property alias osdValue: osd.osdValue
    property alias osdMaxValue: osd.osdMaxValue
    property alias osdAdditionalText: osd.osdAdditionalText
    property alias icon: osd.icon
    property alias showingProgress: osd.showingProgress

    mainItem: OsdItem {
        id: osd
    }
}

Where I added

x: Math.round((Screen.width - width) / 2)
y: 0

and then restarted the plasma

killall plasmashell
kstart plasmashell

but the OSD remained in the same position.

I’m using multiple monitors. I’m not sure if that makes any difference, but I’m mentioning it just to be sure.

I appreciate any help.

Hello there,
I had the same issue a while ago.
So I did some digging and found that you have to edit the file in

/usr/share/plasma/shells/org.kde.plasma.desktop/contents/osd/

rather then in the look-and-feel folder. Please note that it is in the root folder and the file does get over written when kde gets an update, so you do have to redo it.
Hope this helps

1 Like

Are you using Wayland or X11? I use Wayland and there was no change on my side.

I’ve installed X11 and can confirm this works. However, I’m still baffled about where these changes should be on Wayland. Thanks though.

1 Like