1

I want to add toolbar buttons to KDE titlebars to avoid using the menu for certain tasks. As an example I want to be able to get a screen to stay on top until I disable it. eg. KDE titlebars have a menu item More Actions -> Keep Above Others.

How would I add a button to enable or disable it with one click?

  • Can you please be more specific what you mean by "KDE screens" ? Do you refer to the window titlebar? – doktor5000 May 14 '15 at 11:47
  • @doktor5000 Yes, I mean the windows title bar. – vfclists May 14 '15 at 12:31
  • That's what I assumed in the first place, see my answer below for details. If something is missing, just give me a hint. – doktor5000 May 14 '15 at 13:23
2

One solution would be to assign a keyboard shortcut for that kwin action. Open systemsettings => shortcuts and gestures and choose Global Keyboard Shortcuts in the left panel, and on the right pane select KWin at the KDE component dropdown menu.

And for the button, if you only want to trigger built-in functions, that is pretty easy to add, you can also configure that in systemsettings => workspace appearance. Click on Configure Buttons ... at the bottom, and enable Use custom titlebar button positions. Then simply drag&drop the actions to the place where you want it on the titlebar, and add spacers as needed.

This is how it should look like in the end

See also http://www.linuxbsdos.com/2012/07/04/how-to-custmize-kdes-window-titlebar-buttons/ for a detailed description with screenshots.

If you want to add custom actions, you might need to have a look into the KWin scripting facilities:

If you would really want to add a custom button to the titlebar, you would need to customize or create the window decoration in an existing or new theme for that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.