Files
DankMaterialShell/quickshell/Modules/DesktopContextMenu.qml
T
bbedward 4b0dfa67a0 desktop: add right click context menu for actions on compositors where
it doesnt interfere, with a setting to turn it off

Some compositors like kwin/labwc/sway cannot have this without breaking
some built in layering they do.

niri can have this, but for focus follow mouse it may need to be disabled.

fixes #3717
2026-10-07 15:18:39 -04:00

49 lines
1.3 KiB
QML

import QtQuick
import qs.Common
import qs.Services
import qs.Widgets
DContextMenu {
id: root
layerNamespace: "dms:desktop-context-menu"
keyboardNavigable: true
menuItems: [
{
type: "item",
icon: "add",
text: I18n.tr("Add widget"),
action: () => DesktopWidgetRegistry.startEditing(root.targetScreen, true)
},
{
type: "item",
icon: "edit",
text: I18n.tr("Edit widgets"),
action: () => DesktopWidgetRegistry.startEditing(root.targetScreen, false)
},
{
type: "separator"
},
{
type: "item",
icon: "wallpaper",
text: I18n.tr("Wallpaper & colors"),
action: () => PopoutService.openSettingsWithTab("personalization")
},
{
type: "item",
icon: "widgets",
text: I18n.tr("Desktop widgets"),
action: () => PopoutService.openSettingsWithTab("desktop_widgets")
},
{
type: "item",
icon: "monitor",
text: I18n.tr("Displays"),
action: () => PopoutService.openSettingsWithTab("displays")
}
]
onBackdropRightClicked: (x, y) => open(targetScreen, x, y, false)
}