From 98bf56cbcdf5f2258fb5c6c47aa5f93eaf250404 Mon Sep 17 00:00:00 2001 From: bbedward Date: Tue, 6 Oct 2026 22:57:21 -0400 Subject: [PATCH] windows: drop the qt decoration env, add a title bars toggle and go frameless for own chrome fixes #3679 fixes #3572 --- dank-qml-common | 2 +- flake.lock | 6 +-- quickshell/Common/SettingsData.qml | 1 + quickshell/Common/settings/SettingsSpec.js | 3 ++ .../Modules/Greetd/assets/greet-hyprland.sh | 1 - .../Modules/Greetd/assets/greet-niri.sh | 1 - .../Modules/Settings/ThemeSurfacesTab.qml | 10 +++++ quickshell/shell.qml | 2 +- .../translations/settings_search_index.json | 41 +++++++++++++++++-- 9 files changed, 57 insertions(+), 10 deletions(-) diff --git a/dank-qml-common b/dank-qml-common index 97efc1729..014e401bf 160000 --- a/dank-qml-common +++ b/dank-qml-common @@ -1 +1 @@ -Subproject commit 97efc1729da5697dee93cfe707c4cd9dab83785d +Subproject commit 014e401bf5f299d5535bda2a1964219559138bd8 diff --git a/flake.lock b/flake.lock index 3c6bfb66a..eafd6ff2c 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "dank-qml-common": { "flake": false, "locked": { - "lastModified": 1791337282, - "narHash": "sha256-qOVjYFerd7EJ4Uasy98EbIEC6mD7VP/CtXYT41+t6xw=", + "lastModified": 1791341415, + "narHash": "sha256-5yyGoWt0YcLvqWQacJIJfsxkSZROQZVnwui6UZz5FIs=", "owner": "AvengeMedia", "repo": "dank-qml-common", - "rev": "97efc1729da5697dee93cfe707c4cd9dab83785d", + "rev": "66e28f5d322d4c385639c9648cbbf1ec29cfd0fc", "type": "github" }, "original": { diff --git a/quickshell/Common/SettingsData.qml b/quickshell/Common/SettingsData.qml index 78839dc72..6659c3d4a 100644 --- a/quickshell/Common/SettingsData.qml +++ b/quickshell/Common/SettingsData.qml @@ -175,6 +175,7 @@ Singleton { property string matugenTargetMonitor: Spec.SPEC.matugenTargetMonitor.def property real popupTransparency: Spec.SPEC.popupTransparency.def property bool floatingWindowSyncGlobal: Spec.SPEC.floatingWindowSyncGlobal.def + property bool floatingWindowTitleBars: Spec.SPEC.floatingWindowTitleBars.def property real floatingWindowTransparency: Spec.SPEC.floatingWindowTransparency.def property bool floatingWindowForegroundLayers: Spec.SPEC.floatingWindowForegroundLayers.def property real floatingWindowForegroundTransparency: Spec.SPEC.floatingWindowForegroundTransparency.def diff --git a/quickshell/Common/settings/SettingsSpec.js b/quickshell/Common/settings/SettingsSpec.js index addfa61dd..d686fa72c 100644 --- a/quickshell/Common/settings/SettingsSpec.js +++ b/quickshell/Common/settings/SettingsSpec.js @@ -68,6 +68,9 @@ var LOCAL_SPEC = { floatingWindowSyncGlobal: { def: true }, + floatingWindowTitleBars: { + def: true + }, floatingWindowTransparency: { def: 1.0, coerce: Util.percentToUnit diff --git a/quickshell/Modules/Greetd/assets/greet-hyprland.sh b/quickshell/Modules/Greetd/assets/greet-hyprland.sh index 58fab7fb1..b96f3cedf 100755 --- a/quickshell/Modules/Greetd/assets/greet-hyprland.sh +++ b/quickshell/Modules/Greetd/assets/greet-hyprland.sh @@ -2,7 +2,6 @@ export XDG_SESSION_TYPE=wayland export QT_QPA_PLATFORM=wayland -export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 export EGL_PLATFORM=gbm if command -v start-hyprland >/dev/null 2>&1; then exec start-hyprland -- -c /etc/greetd/dms-hypr.lua diff --git a/quickshell/Modules/Greetd/assets/greet-niri.sh b/quickshell/Modules/Greetd/assets/greet-niri.sh index d31db65db..75e831a07 100755 --- a/quickshell/Modules/Greetd/assets/greet-niri.sh +++ b/quickshell/Modules/Greetd/assets/greet-niri.sh @@ -2,7 +2,6 @@ export XDG_SESSION_TYPE=wayland export QT_QPA_PLATFORM=wayland -export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 export EGL_PLATFORM=gbm exec niri -c /etc/greetd/dms-niri.kdl diff --git a/quickshell/Modules/Settings/ThemeSurfacesTab.qml b/quickshell/Modules/Settings/ThemeSurfacesTab.qml index ef2c77616..e69e7a2fd 100644 --- a/quickshell/Modules/Settings/ThemeSurfacesTab.qml +++ b/quickshell/Modules/Settings/ThemeSurfacesTab.qml @@ -389,6 +389,16 @@ Column { } } + SettingsToggleRow { + tab: "theme" + tags: ["floating", "window", "title", "bar", "header", "csd", "decoration", "compositor", "kwin", "controls"] + settingKey: "floatingWindowTitleBars" + text: I18n.tr("Title bars") + description: I18n.tr("Off lets the compositor decorate DMS windows. Open windows update when reopened.", "theme floating windows section, title bars toggle description") + checked: SettingsData.floatingWindowTitleBars + onToggled: checked => SettingsData.set("floatingWindowTitleBars", checked) + } + SettingsToggleRow { tab: "theme" tags: ["floating", "window", "tile", "tiling", "compositor", "rule", "niri", "hyprland", "mango"] diff --git a/quickshell/shell.qml b/quickshell/shell.qml index 540f4e368..2c80acdb3 100644 --- a/quickshell/shell.qml +++ b/quickshell/shell.qml @@ -2,7 +2,6 @@ //@ pragma Env QT_MEDIA_BACKEND=ffmpeg //@ pragma Env QT_FFMPEG_DECODING_HW_DEVICE_TYPES=vaapi //@ pragma Env QT_FFMPEG_ENCODING_HW_DEVICE_TYPES=vaapi -//@ pragma Env QT_WAYLAND_DISABLE_WINDOWDECORATION=1 //@ pragma Env QT_QUICK_CONTROLS_STYLE=Material //@ pragma UseQApplication //@ pragma AppId com.danklinux.dms @@ -37,6 +36,7 @@ ShellRoot { DC.Host.cache = CacheData; DC.Host.files = FilesService; DC.Host.hyprlandFocusGrab = Qt.binding(() => CompositorService.useHyprlandFocusGrab); + DC.Host.ownWindowDecorations = Qt.binding(() => SettingsData.floatingWindowTitleBars); void IconThemeService.ready; if (entrypoint.runGreeter) return; diff --git a/quickshell/translations/settings_search_index.json b/quickshell/translations/settings_search_index.json index 10fc08730..1d9b0f17e 100644 --- a/quickshell/translations/settings_search_index.json +++ b/quickshell/translations/settings_search_index.json @@ -1043,28 +1043,30 @@ "tabIndex": -1, "category": "Interface style", "keywords": [ - "adds", "authentication", "compositor", + "decorate", "floating", "foreground", "interface", + "lets", "notepad", "opacity", "open", "override", "polkit", - "rule", + "reopened", "settings", "style", "tile", "tiling", "transparency", + "update", "window", "windows" ], "page": "theme_surfaces", - "description": "Adds a compositor window rule so DMS windows such as Settings open floating" + "description": "Off lets the compositor decorate DMS windows. Open windows update when reopened." }, { "section": "focusRingEnabled", @@ -2552,6 +2554,39 @@ ], "page": "notifications" }, + { + "section": "floatingWindowTitleBars", + "label": "Title bars", + "tabIndex": -1, + "category": "Interface style", + "keywords": [ + "bar", + "bars", + "compositor", + "controls", + "csd", + "decorate", + "decoration", + "floating", + "header", + "interface", + "kwin", + "lets", + "open", + "panel", + "reopened", + "statusbar", + "style", + "taskbar", + "title", + "topbar", + "update", + "window", + "windows" + ], + "page": "theme_surfaces", + "description": "Off lets the compositor decorate DMS windows. Open windows update when reopened." + }, { "section": "wallpaperTransition", "label": "Transition",