From 9ec48c4f1382e76ffa7dfd71b810a8539a707a3e Mon Sep 17 00:00:00 2001 From: bbedward Date: Mon, 5 Oct 2026 18:05:07 -0400 Subject: [PATCH] ui: rename internal widgets with D prefix to match qml-common change --- dank-qml-common | 2 +- flake.lock | 6 +- quickshell/DMSShell.qml | 14 +- quickshell/DMSShellIPC.qml | 2 +- quickshell/Modals/AppPickerModal.qml | 4 +- quickshell/Modals/BluetoothPairingModal.qml | 2 +- .../Modals/Changelog/ChangelogModal.qml | 2 +- .../Modals/Clipboard/ClipboardContent.qml | 2 +- .../Modals/Clipboard/ClipboardContextMenu.qml | 2 +- .../Clipboard/ClipboardHistoryModal.qml | 2 +- .../Clipboard/ClipboardHistoryPopout.qml | 2 +- .../Clipboard/ClipboardKeyboardHints.qml | 2 +- quickshell/Modals/ColorPickerModal.qml | 2 +- quickshell/Modals/Common/ConfirmModal.qml | 2 +- quickshell/Modals/Common/DModal.qml | 173 +++++++ .../{DankModalHost.qml => DModalHost.qml} | 2 +- quickshell/Modals/Common/DankModal.qml | 172 +------ quickshell/Modals/Common/InputModal.qml | 2 +- .../ActionPanel.qml | 0 .../AppEditView.qml | 0 .../ClipboardLauncherPreview.qml | 0 .../Components/LauncherHighlight.qml | 0 .../Components/LauncherMetrics.qml | 0 .../Components/LauncherRow.qml | 2 +- .../Components/LauncherSearchField.qml | 0 .../Components/LauncherTile.qml | 2 +- .../Controller.qml | 74 +-- .../ControllerUtils.js | 0 .../DLauncherV2Modal.qml} | 6 +- .../DLauncherV2ModalHost.qml} | 4 +- .../DLauncherV2ModalIsland.qml} | 6 +- .../ItemTransformers.js | 3 +- .../LauncherContent.qml | 8 +- .../LauncherContextMenu.qml | 2 +- .../NavigationHelpers.js | 12 +- .../ResultsList.qml | 2 +- .../{DankLauncherV2 => DLauncherV2}/Scorer.js | 0 .../Section.qml | 2 +- .../SectionHeader.qml | 4 +- .../SourceBadge.qml | 0 .../SpotlightLauncherContent.qml | 2 +- .../TileItem.qml | 2 +- .../Modals/DisplayConfirmationModal.qml | 2 +- .../FileBrowser/FileBrowserSurfaceModal.qml | 2 +- quickshell/Modals/Greeter/GreeterModal.qml | 2 +- quickshell/Modals/KeybindsModalOverlay.qml | 2 +- quickshell/Modals/KeybindsModalWindow.qml | 2 +- quickshell/Modals/MuxModal.qml | 4 +- quickshell/Modals/NetworkInfoModal.qml | 2 +- quickshell/Modals/NotificationModal.qml | 4 +- quickshell/Modals/PolkitAuthModal.qml | 2 +- quickshell/Modals/PolkitAuthSurfaceModal.qml | 2 +- quickshell/Modals/PowerMenuModal.qml | 2 +- quickshell/Modals/PowerProfileModal.qml | 2 +- quickshell/Modals/ProcessListModal.qml | 2 +- quickshell/Modals/QRGeneratorModal.qml | 2 +- .../Modals/Settings/SettingsContent.qml | 8 +- quickshell/Modals/Settings/SettingsModal.qml | 2 +- quickshell/Modals/SwitchUserModal.qml | 2 +- quickshell/Modals/SystemUpdateModal.qml | 2 +- quickshell/Modals/WifiPasswordModal.qml | 6 +- quickshell/Modals/WifiQRCodeModal.qml | 2 +- quickshell/Modals/WindowRuleModal.qml | 2 +- quickshell/Modals/WorkspaceRenameModal.qml | 2 +- .../Modules/AppDrawer/AppDrawerPopout.qml | 4 +- .../Modules/BlurredWallpaperBackground.qml | 4 +- .../BuiltinPlugins/CupsWidget.qml | 2 +- .../BuiltinPlugins/TailscaleWidget.qml | 2 +- .../ControlCenter/Components/CcEditChrome.qml | 2 +- .../ControlCenter/Components/CcTileGrid.qml | 2 +- .../ControlCenter/Components/CcTileSlot.qml | 2 +- .../Components/WidgetConfigOverlay.qml | 9 +- .../ControlCenter/ControlCenterContent.qml | 4 +- .../ControlCenter/ControlCenterPopout.qml | 2 +- .../ControlCenter/Details/BatteryDetail.qml | 2 +- .../ControlCenter/Details/BluetoothDetail.qml | 2 +- .../ControlCenter/Details/NetworkDetail.qml | 2 +- .../Modules/ControlCenter/Widgets/CcMenu.qml | 27 +- .../ControlCenter/Widgets/UserTile.qml | 2 +- .../Modules/{DankBar => DBar}/AxisContext.qml | 40 +- .../Modules/{DankBar => DBar}/BarMetrics.qml | 0 .../Modules/{DankBar => DBar}/BarOutline.js | 0 .../{DankBar => DBar}/BarPillSurface.qml | 0 .../{DankBar => DBar}/BarScrollArea.qml | 0 .../Modules/{DankBar => DBar}/BarSection.qml | 17 +- .../Modules/{DankBar => DBar}/BarSegment.qml | 0 .../Modules/{DankBar => DBar}/BarSurface.qml | 0 .../Modules/{DankBar => DBar}/CenterLayout.js | 0 .../{DankBar => DBar}/CenterSection.qml | 0 .../{DankBar/DankBar.qml => DBar/DBar.qml} | 2 +- .../DankBarBody.qml => DBar/DBarBody.qml} | 6 +- .../DBarContent.qml} | 18 +- .../DBarHoverController.qml} | 0 .../DankBarWindow.qml => DBar/DBarWindow.qml} | 6 +- .../Modules/{DankBar => DBar}/LeftSection.qml | 0 .../{DankBar => DBar}/OverflowLayout.js | 66 ++- .../Popouts/BatteryHistory.js | 0 .../Popouts/BatteryHistory.qml | 0 .../Popouts/BatteryHistoryChart.qml | 0 .../Popouts/BatteryPopout.qml | 2 +- .../Popouts/BatteryPopoutContent.qml | 0 .../Popouts/ColorPickerPopout.qml | 2 +- .../Popouts/DWLLayoutPopout.qml | 4 +- .../Popouts/DurationPopout.qml | 4 +- .../Popouts/PowerMenuPopout.qml | 2 +- .../Popouts/SystemUpdatePopout.qml | 2 +- .../{DankBar => DBar}/Popouts/VpnPopout.qml | 2 +- .../{DankBar => DBar}/RightSection.qml | 0 .../{DankBar => DBar}/SectionEntry.qml | 0 .../{DankBar => DBar}/SectionOverflow.qml | 2 +- .../{DankBar => DBar}/SectionSurface.qml | 0 .../{DankBar => DBar}/SectionWidget.qml | 0 .../Modules/{DankBar => DBar}/SegmentRoles.js | 0 .../Modules/{DankBar => DBar}/SideSection.qml | 0 .../Modules/{DankBar => DBar}/WidgetModel.js | 6 +- .../{DankBar => DBar}/Widgets/AppsDock.qml | 0 .../Widgets/AudioVisualization.qml | 0 .../{DankBar => DBar}/Widgets/Battery.qml | 0 .../Widgets/CapsLockIndicator.qml | 0 .../Widgets/ClipboardButton.qml | 2 +- .../{DankBar => DBar}/Widgets/Clock.qml | 2 +- .../{DankBar => DBar}/Widgets/ColorPicker.qml | 0 .../Widgets/ControlCenterButton.qml | 0 .../{DankBar => DBar}/Widgets/CpuMonitor.qml | 0 .../Widgets/CpuTemperature.qml | 0 .../{DankBar => DBar}/Widgets/DWLLayout.qml | 0 .../{DankBar => DBar}/Widgets/DiskUsage.qml | 2 +- .../{DankBar => DBar}/Widgets/FocusedApp.qml | 2 +- .../Widgets/FocusedWindowContextMenu.qml | 4 +- .../Widgets/GpuTemperature.qml | 0 .../Widgets/IdleInhibitPresets.qml | 0 .../Widgets/IdleInhibitor.qml | 0 .../Widgets/KeyboardLayoutLabels.js | 0 .../Widgets/KeyboardLayoutName.qml | 0 .../Widgets/LauncherButton.qml | 0 .../{DankBar => DBar}/Widgets/Media.qml | 4 +- .../Widgets/MediaLyricLine.qml | 0 .../{DankBar => DBar}/Widgets/MonitorPill.qml | 0 .../Widgets/NetworkMonitor.qml | 0 .../Widgets/NotepadButton.qml | 2 +- .../Widgets/NotificationCenterButton.qml | 0 .../Widgets/PowerMenuButton.qml | 0 .../Widgets/PrivacyIndicator.qml | 2 +- .../{DankBar => DBar}/Widgets/RamMonitor.qml | 0 .../{DankBar => DBar}/Widgets/RunningApps.qml | 6 +- .../Widgets/SystemTrayBar.qml | 8 +- .../Widgets/SystemUpdate.qml | 2 +- .../Widgets/TrayItemIcon.qml | 0 .../Modules/{DankBar => DBar}/Widgets/Vpn.qml | 2 +- .../{DankBar => DBar}/Widgets/Weather.qml | 0 .../Widgets/WorkspaceSwitcher.qml | 2 +- .../DDashPopout.qml} | 8 +- .../{DankDash => DDash}/DashMetrics.qml | 0 .../{DankDash => DDash}/DashPageActions.qml | 2 +- .../{DankDash => DDash}/DashPageTitle.qml | 0 .../{DankDash => DDash}/DashRegistry.qml | 2 +- .../{DankDash => DDash}/DashSheetHandle.qml | 0 .../{DankDash => DDash}/DashTabHost.qml | 0 .../{DankDash => DDash}/DashWidgetGrid.qml | 6 +- .../{DankDash => DDash}/Media/BentoChrome.qml | 2 +- .../Media/LyricsOverlay.qml | 2 +- .../{DankDash => DDash}/Media/LyricsVocal.qml | 2 +- .../Media/MaterialChrome.qml | 2 +- .../Media/MaterialSourceGroup.qml | 0 .../Media/MaterialTransport.qml | 0 .../Media/MediaArtSurface.qml | 2 +- .../Media/MediaArtView.qml | 2 +- .../Media/MediaChromeBase.qml | 2 +- .../Media/MediaDeviceRow.qml | 0 .../Media/MediaEmptyState.qml | 0 .../{DankDash => DDash}/Media/MediaPanel.qml | 2 +- .../Media/MediaPanelRow.qml | 2 +- .../Media/MediaPresentation.qml | 2 +- .../Media/MediaSeekbar.qml | 4 +- .../Media/MediaSinkWheel.qml | 0 .../Media/MediaSourceGroup.qml | 2 +- .../Media/MediaTransport.qml | 2 +- .../Media/MediaTransportButton.qml | 0 .../Media/MediaVolumeSlider.qml | 0 .../Media/MediaVolumeWheel.qml | 0 .../{DankDash => DDash}/MediaPlayerTab.qml | 2 +- .../{DankDash => DDash}/NotificationsTab.qml | 2 +- .../Overview/BatteryCard.qml | 2 +- .../Overview/CalendarEventDetail.qml | 0 .../Overview/CalendarEventEditor.qml | 0 .../Overview/CalendarOverviewCard.qml | 2 +- .../{DankDash => DDash}/Overview/Card.qml | 2 +- .../Overview/ClockCard.qml | 2 +- .../{DankDash => DDash}/Overview/CpuCard.qml | 2 +- .../Overview/DashCardGrid.qml | 4 +- .../Overview/DashCardSlot.qml | 4 +- .../Overview/DashEditChrome.qml | 4 +- .../Overview/DashEditControls.qml | 0 .../Overview/DashOptionRow.qml | 4 +- .../Overview/DashOptionsSheet.qml | 2 +- .../{DankDash => DDash}/Overview/DiskCard.qml | 2 +- .../Overview/MediaOverviewCard.qml | 6 +- .../Overview/MemoryCard.qml | 2 +- .../Overview/MetricCard.qml | 2 +- .../Overview/MetricGauge.qml | 2 +- .../Overview/NetworkCard.qml | 2 +- .../Overview/NotificationsOverviewCard.qml | 2 +- .../Overview/SystemMonitorCard.qml | 2 +- .../Overview/UserInfoCard.qml | 2 +- .../Overview/WeatherOverviewCard.qml | 4 +- .../Overview/WellbeingOverviewCard.qml | 4 +- .../{DankDash => DDash}/OverviewTab.qml | 2 +- .../{DankDash => DDash}/WallpaperCarousel.qml | 2 +- .../{DankDash => DDash}/WallpaperTab.qml | 4 +- .../Weather/WeatherForecastCard.qml | 2 +- .../Weather/WeatherForecastChart.qml | 2 +- .../Weather/WeatherForecastWidget.qml | 2 +- .../Weather/WeatherHero.qml | 0 .../Weather/WeatherMetricCard.qml | 2 +- .../Weather/WeatherSky.qml | 2 +- .../Weather/WeatherVisuals.js | 0 .../{DankDash => DDash}/WeatherTab.qml | 4 +- .../Wellbeing/AppLimitSheet.qml | 2 +- .../Wellbeing/AppUsageList.qml | 2 +- .../Wellbeing/DurationSteppers.qml | 0 .../Wellbeing/WeeklyChart.qml | 2 +- .../Wellbeing/Wellbeing.js | 0 .../Wellbeing/WellbeingMetrics.qml | 2 +- .../{DankDash => DDash}/WellbeingTab.qml | 4 +- .../{DankDash => DDash}/utils/cards.js | 0 .../{DankDash => DDash}/utils/options.js | 0 .../{DankDash => DDash}/utils/widgets.js | 0 .../Activities/ClipboardExpanded.qml | 0 .../Activities/ControlCenterExpanded.qml | 0 .../Activities/DashTabFace.qml | 8 +- .../Activities/DestinationCompact.qml | 0 .../Activities/DotCompact.qml | 0 .../Activities/HomeCompact.qml | 2 +- .../Activities/HomeExpanded.qml | 2 +- .../Activities/IslandSlotHoverArea.qml | 0 .../Activities/LauncherExpanded.qml | 2 +- .../Activities/MediaCompact.qml | 0 .../Activities/MediaExpanded.qml | 2 +- .../Activities/NotificationCenterExpanded.qml | 2 +- .../Activities/NotificationCompact.qml | 0 .../Activities/NotificationExpanded.qml | 0 .../Activities/SystemLevelCompact.qml | 0 .../Activities/SystemLevelExpanded.qml | 0 .../Activities/SystemStateCompact.qml | 0 .../Activities/WallpaperExpanded.qml | 2 +- .../Activities/WeatherExpanded.qml | 2 +- .../DankIsland.qml => DIsland/DIsland.qml} | 2 +- .../DIslandHostWindow.qml} | 0 .../DIslandSurface.qml} | 4 +- .../{DankIsland => DIsland}/IslandBarHost.qml | 10 +- .../IslandContentHost.qml | 0 .../IslandController.qml | 6 +- .../IslandFreeDragArea.qml | 0 .../IslandFreeHostWindow.qml | 0 .../IslandHostChrome.qml | 2 +- .../IslandHostRegistry.qml | 0 .../IslandMediaSource.qml | 0 .../IslandNotificationSource.qml | 0 .../IslandSystemSource.qml | 0 quickshell/Modules/Dock/DockBody.qml | 6 +- quickshell/Modules/Frame/FrameBarHost.qml | 4 +- quickshell/Modules/Frame/FrameWindow.qml | 2 +- quickshell/Modules/Greetd/GreeterContent.qml | 4 +- .../Modules/Lock/LockScreenBackground.qml | 2 +- .../Lock/Widgets/GreeterSessionWidget.qml | 2 +- quickshell/Modules/Notepad/Notepad.qml | 2 +- .../Modules/Notepad/NotepadPopoutWindow.qml | 2 +- .../Modules/Notepad/NotepadSettings.qml | 4 +- .../Notifications/Center/NotificationCard.qml | 2 +- .../Center/NotificationCenterPopout.qml | 2 +- .../Center/NotificationHeader.qml | 2 +- .../Center/NotificationKeyboardHints.qml | 2 +- .../Notifications/NotificationContextMenu.qml | 2 +- quickshell/Modules/OSD/AudioOutputOSD.qml | 2 +- quickshell/Modules/OSD/CapsLockOSD.qml | 2 +- quickshell/Modules/OSD/IdleInhibitorOSD.qml | 2 +- quickshell/Modules/OSD/LevelOSD.qml | 4 +- quickshell/Modules/OSD/MediaPlaybackOSD.qml | 2 +- quickshell/Modules/OSD/PowerProfileOSD.qml | 2 +- quickshell/Modules/OSD/WorkspaceOSD.qml | 2 +- .../Modules/Plugins/DashCardComponent.qml | 2 +- .../Modules/Plugins/DashTabComponent.qml | 2 +- quickshell/Modules/Plugins/PluginPopout.qml | 2 +- .../Modules/Plugins/SelectionSetting.qml | 3 +- quickshell/Modules/Plugins/WidgetEditItem.qml | 2 +- .../Modules/Plugins/WidgetEditorOverlay.qml | 2 +- .../Modules/ProcessList/ProcessListPopout.qml | 2 +- quickshell/Modules/Settings/BarWidgetTab.qml | 2 +- quickshell/Modules/Settings/BatteryTab.qml | 2 +- ...ppearanceTab.qml => DBarAppearanceTab.qml} | 0 .../Settings/{DankBarTab.qml => DBarTab.qml} | 0 .../{DankDashTab.qml => DDashTab.qml} | 4 +- .../Settings/{DankDotTab.qml => DDotTab.qml} | 0 .../Modules/Settings/DigitalWellbeingTab.qml | 4 +- .../DisplayConfig/ICCProfileInfoModal.qml | 2 +- .../Settings/DisplayConfig/OutputCard.qml | 2 +- .../Modules/Settings/DisplayConfigTab.qml | 2 +- .../Modules/Settings/KeybindEditorDialog.qml | 8 +- .../Modules/Settings/MediaPlayerTab.qml | 2 +- .../Settings/NotificationRuleEditorDialog.qml | 4 +- quickshell/Modules/Settings/PluginBrowser.qml | 2 +- .../Modules/Settings/PluginsHubHeader.qml | 4 +- quickshell/Modules/Settings/PowerSleepTab.qml | 2 +- .../Settings/RegistryBrowserWindow.qml | 2 +- .../Modules/Settings/WidgetPickerWindow.qml | 2 +- .../Settings/Widgets/AppBrowserPopup.qml | 2 +- .../Settings/Widgets/SettingsDropdownRow.qml | 3 +- .../Settings/Widgets/SettingsLayoutPicker.qml | 2 +- .../Modules/Settings/WidgetsTabSection.qml | 2 +- .../Modules/Settings/WindowRulesTab.qml | 2 +- .../SurfaceWidgets/ApplicationStrip.qml | 2 +- quickshell/Modules/SurfaceWidgets/BarPill.qml | 2 +- .../SurfaceWidgets/MediaActivityFace.qml | 2 +- .../SurfaceWidgets/SurfaceWidgetFactory.qml | 4 +- quickshell/Modules/WallpaperBackground.qml | 4 +- .../WorkspaceOverlays/NiriOverviewOverlay.qml | 4 +- .../WorkspaceOverlays/OverviewWidget.qml | 2 +- .../PLUGINS/DashCardExample/ProgressCard.qml | 2 +- .../PLUGINS/DashCounterExample/CounterTab.qml | 4 +- .../PLUGINS/DashTabExample/StopwatchTab.qml | 4 +- quickshell/PLUGINS/README.md | 10 +- quickshell/README.md | 6 +- quickshell/Services/LyricsController.qml | 2 +- quickshell/Services/LyricsService.qml | 4 +- quickshell/Services/SettingsSearchService.qml | 2 +- quickshell/Services/WellbeingService.qml | 2 +- quickshell/ShellCore.qml | 8 +- quickshell/Widgets/DAnimatedAlbumArt.qml | 42 ++ quickshell/Widgets/DBackdrop.qml | 114 +++++ .../{DankContextMenu.qml => DContextMenu.qml} | 0 ...DankEditableGrid.qml => DEditableGrid.qml} | 0 ...ableGridSlot.qml => DEditableGridSlot.qml} | 0 quickshell/Widgets/DFloatingWindow.qml | 44 ++ quickshell/Widgets/DFocusGrab.qml | 46 ++ ...GridEditChrome.qml => DGridEditChrome.qml} | 2 +- .../{DankKeyHints.qml => DKeyHints.qml} | 0 quickshell/Widgets/DOSD.qml | 397 ++++++++++++++++ .../{DankOSDSheet.qml => DOSDSheet.qml} | 2 +- ...DankPanelResizer.qml => DPanelResizer.qml} | 0 quickshell/Widgets/DPopout.qml | 435 ++++++++++++++++++ .../{DankPopoutHost.qml => DPopoutHost.qml} | 2 +- .../{DankResizeGrip.qml => DResizeGrip.qml} | 0 quickshell/Widgets/DSeekbar.qml | 322 +++++++++++++ quickshell/Widgets/DSlideout.qml | 324 +++++++++++++ quickshell/Widgets/DTooltip.qml | 87 ++++ quickshell/Widgets/DankAnimatedAlbumArt.qml | 43 +- quickshell/Widgets/DankBackdrop.qml | 113 +---- quickshell/Widgets/DankDropdown.qml | 7 +- quickshell/Widgets/DankFloatingWindow.qml | 43 +- quickshell/Widgets/DankFocusGrab.qml | 45 +- quickshell/Widgets/DankOSD.qml | 396 +--------------- quickshell/Widgets/DankPopout.qml | 434 +---------------- quickshell/Widgets/DankSeekbar.qml | 321 +------------ quickshell/Widgets/DankSlideout.qml | 323 +------------ quickshell/Widgets/DankTooltip.qml | 86 +--- quickshell/shell.qml | 1 + quickshell/tests/bar-content.test.mjs | 6 +- quickshell/tests/bar-overflow.test.mjs | 2 +- quickshell/tests/battery-history.test.mjs | 2 +- quickshell/tests/segment-roles.test.mjs | 2 +- .../tests/unit/tst_KeyboardLayoutLabels.qml | 2 +- quickshell/tests/wellbeing-model.test.mjs | 2 +- .../translations/extract_settings_index.py | 12 +- 363 files changed, 2524 insertions(+), 2382 deletions(-) create mode 100644 quickshell/Modals/Common/DModal.qml rename quickshell/Modals/Common/{DankModalHost.qml => DModalHost.qml} (99%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/ActionPanel.qml (100%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/AppEditView.qml (100%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/ClipboardLauncherPreview.qml (100%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/Components/LauncherHighlight.qml (100%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/Components/LauncherMetrics.qml (100%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/Components/LauncherRow.qml (99%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/Components/LauncherSearchField.qml (100%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/Components/LauncherTile.qml (99%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/Controller.qml (98%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/ControllerUtils.js (100%) rename quickshell/Modals/{DankLauncherV2/DankLauncherV2Modal.qml => DLauncherV2/DLauncherV2Modal.qml} (97%) rename quickshell/Modals/{DankLauncherV2/DankLauncherV2ModalHost.qml => DLauncherV2/DLauncherV2ModalHost.qml} (99%) rename quickshell/Modals/{DankLauncherV2/DankLauncherV2ModalIsland.qml => DLauncherV2/DLauncherV2ModalIsland.qml} (96%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/ItemTransformers.js (99%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/LauncherContent.qml (99%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/LauncherContextMenu.qml (99%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/NavigationHelpers.js (98%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/ResultsList.qml (99%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/Scorer.js (100%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/Section.qml (98%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/SectionHeader.qml (98%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/SourceBadge.qml (100%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/SpotlightLauncherContent.qml (99%) rename quickshell/Modals/{DankLauncherV2 => DLauncherV2}/TileItem.qml (99%) rename quickshell/Modules/{DankBar => DBar}/AxisContext.qml (53%) rename quickshell/Modules/{DankBar => DBar}/BarMetrics.qml (100%) rename quickshell/Modules/{DankBar => DBar}/BarOutline.js (100%) rename quickshell/Modules/{DankBar => DBar}/BarPillSurface.qml (100%) rename quickshell/Modules/{DankBar => DBar}/BarScrollArea.qml (100%) rename quickshell/Modules/{DankBar => DBar}/BarSection.qml (93%) rename quickshell/Modules/{DankBar => DBar}/BarSegment.qml (100%) rename quickshell/Modules/{DankBar => DBar}/BarSurface.qml (100%) rename quickshell/Modules/{DankBar => DBar}/CenterLayout.js (100%) rename quickshell/Modules/{DankBar => DBar}/CenterSection.qml (100%) rename quickshell/Modules/{DankBar/DankBar.qml => DBar/DBar.qml} (98%) rename quickshell/Modules/{DankBar/DankBarBody.qml => DBar/DBarBody.qml} (99%) rename quickshell/Modules/{DankBar/DankBarContent.qml => DBar/DBarContent.qml} (98%) rename quickshell/Modules/{DankBar/DankBarHoverController.qml => DBar/DBarHoverController.qml} (100%) rename quickshell/Modules/{DankBar/DankBarWindow.qml => DBar/DBarWindow.qml} (98%) rename quickshell/Modules/{DankBar => DBar}/LeftSection.qml (100%) rename quickshell/Modules/{DankBar => DBar}/OverflowLayout.js (81%) rename quickshell/Modules/{DankBar => DBar}/Popouts/BatteryHistory.js (100%) rename quickshell/Modules/{DankBar => DBar}/Popouts/BatteryHistory.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Popouts/BatteryHistoryChart.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Popouts/BatteryPopout.qml (98%) rename quickshell/Modules/{DankBar => DBar}/Popouts/BatteryPopoutContent.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Popouts/ColorPickerPopout.qml (98%) rename quickshell/Modules/{DankBar => DBar}/Popouts/DWLLayoutPopout.qml (99%) rename quickshell/Modules/{DankBar => DBar}/Popouts/DurationPopout.qml (99%) rename quickshell/Modules/{DankBar => DBar}/Popouts/PowerMenuPopout.qml (98%) rename quickshell/Modules/{DankBar => DBar}/Popouts/SystemUpdatePopout.qml (99%) rename quickshell/Modules/{DankBar => DBar}/Popouts/VpnPopout.qml (99%) rename quickshell/Modules/{DankBar => DBar}/RightSection.qml (100%) rename quickshell/Modules/{DankBar => DBar}/SectionEntry.qml (100%) rename quickshell/Modules/{DankBar => DBar}/SectionOverflow.qml (99%) rename quickshell/Modules/{DankBar => DBar}/SectionSurface.qml (100%) rename quickshell/Modules/{DankBar => DBar}/SectionWidget.qml (100%) rename quickshell/Modules/{DankBar => DBar}/SegmentRoles.js (100%) rename quickshell/Modules/{DankBar => DBar}/SideSection.qml (100%) rename quickshell/Modules/{DankBar => DBar}/WidgetModel.js (93%) rename quickshell/Modules/{DankBar => DBar}/Widgets/AppsDock.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/AudioVisualization.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/Battery.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/CapsLockIndicator.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/ClipboardButton.qml (99%) rename quickshell/Modules/{DankBar => DBar}/Widgets/Clock.qml (99%) rename quickshell/Modules/{DankBar => DBar}/Widgets/ColorPicker.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/ControlCenterButton.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/CpuMonitor.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/CpuTemperature.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/DWLLayout.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/DiskUsage.qml (98%) rename quickshell/Modules/{DankBar => DBar}/Widgets/FocusedApp.qml (99%) rename quickshell/Modules/{DankBar => DBar}/Widgets/FocusedWindowContextMenu.qml (99%) rename quickshell/Modules/{DankBar => DBar}/Widgets/GpuTemperature.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/IdleInhibitPresets.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/IdleInhibitor.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/KeyboardLayoutLabels.js (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/KeyboardLayoutName.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/LauncherButton.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/Media.qml (99%) rename quickshell/Modules/{DankBar => DBar}/Widgets/MediaLyricLine.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/MonitorPill.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/NetworkMonitor.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/NotepadButton.qml (99%) rename quickshell/Modules/{DankBar => DBar}/Widgets/NotificationCenterButton.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/PowerMenuButton.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/PrivacyIndicator.qml (99%) rename quickshell/Modules/{DankBar => DBar}/Widgets/RamMonitor.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/RunningApps.qml (99%) rename quickshell/Modules/{DankBar => DBar}/Widgets/SystemTrayBar.qml (99%) rename quickshell/Modules/{DankBar => DBar}/Widgets/SystemUpdate.qml (99%) rename quickshell/Modules/{DankBar => DBar}/Widgets/TrayItemIcon.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/Vpn.qml (99%) rename quickshell/Modules/{DankBar => DBar}/Widgets/Weather.qml (100%) rename quickshell/Modules/{DankBar => DBar}/Widgets/WorkspaceSwitcher.qml (99%) rename quickshell/Modules/{DankDash/DankDashPopout.qml => DDash/DDashPopout.qml} (99%) rename quickshell/Modules/{DankDash => DDash}/DashMetrics.qml (100%) rename quickshell/Modules/{DankDash => DDash}/DashPageActions.qml (98%) rename quickshell/Modules/{DankDash => DDash}/DashPageTitle.qml (100%) rename quickshell/Modules/{DankDash => DDash}/DashRegistry.qml (99%) rename quickshell/Modules/{DankDash => DDash}/DashSheetHandle.qml (100%) rename quickshell/Modules/{DankDash => DDash}/DashTabHost.qml (100%) rename quickshell/Modules/{DankDash => DDash}/DashWidgetGrid.qml (98%) rename quickshell/Modules/{DankDash => DDash}/Media/BentoChrome.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Media/LyricsOverlay.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Media/LyricsVocal.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Media/MaterialChrome.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Media/MaterialSourceGroup.qml (100%) rename quickshell/Modules/{DankDash => DDash}/Media/MaterialTransport.qml (100%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaArtSurface.qml (98%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaArtView.qml (97%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaChromeBase.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaDeviceRow.qml (100%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaEmptyState.qml (100%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaPanel.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaPanelRow.qml (96%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaPresentation.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaSeekbar.qml (92%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaSinkWheel.qml (100%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaSourceGroup.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaTransport.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaTransportButton.qml (100%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaVolumeSlider.qml (100%) rename quickshell/Modules/{DankDash => DDash}/Media/MediaVolumeWheel.qml (100%) rename quickshell/Modules/{DankDash => DDash}/MediaPlayerTab.qml (99%) rename quickshell/Modules/{DankDash => DDash}/NotificationsTab.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Overview/BatteryCard.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Overview/CalendarEventDetail.qml (100%) rename quickshell/Modules/{DankDash => DDash}/Overview/CalendarEventEditor.qml (100%) rename quickshell/Modules/{DankDash => DDash}/Overview/CalendarOverviewCard.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Overview/Card.qml (97%) rename quickshell/Modules/{DankDash => DDash}/Overview/ClockCard.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Overview/CpuCard.qml (94%) rename quickshell/Modules/{DankDash => DDash}/Overview/DashCardGrid.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Overview/DashCardSlot.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Overview/DashEditChrome.qml (81%) rename quickshell/Modules/{DankDash => DDash}/Overview/DashEditControls.qml (100%) rename quickshell/Modules/{DankDash => DDash}/Overview/DashOptionRow.qml (97%) rename quickshell/Modules/{DankDash => DDash}/Overview/DashOptionsSheet.qml (98%) rename quickshell/Modules/{DankDash => DDash}/Overview/DiskCard.qml (97%) rename quickshell/Modules/{DankDash => DDash}/Overview/MediaOverviewCard.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Overview/MemoryCard.qml (96%) rename quickshell/Modules/{DankDash => DDash}/Overview/MetricCard.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Overview/MetricGauge.qml (97%) rename quickshell/Modules/{DankDash => DDash}/Overview/NetworkCard.qml (95%) rename quickshell/Modules/{DankDash => DDash}/Overview/NotificationsOverviewCard.qml (96%) rename quickshell/Modules/{DankDash => DDash}/Overview/SystemMonitorCard.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Overview/UserInfoCard.qml (96%) rename quickshell/Modules/{DankDash => DDash}/Overview/WeatherOverviewCard.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Overview/WellbeingOverviewCard.qml (98%) rename quickshell/Modules/{DankDash => DDash}/OverviewTab.qml (99%) rename quickshell/Modules/{DankDash => DDash}/WallpaperCarousel.qml (99%) rename quickshell/Modules/{DankDash => DDash}/WallpaperTab.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Weather/WeatherForecastCard.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Weather/WeatherForecastChart.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Weather/WeatherForecastWidget.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Weather/WeatherHero.qml (100%) rename quickshell/Modules/{DankDash => DDash}/Weather/WeatherMetricCard.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Weather/WeatherSky.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Weather/WeatherVisuals.js (100%) rename quickshell/Modules/{DankDash => DDash}/WeatherTab.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Wellbeing/AppLimitSheet.qml (97%) rename quickshell/Modules/{DankDash => DDash}/Wellbeing/AppUsageList.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Wellbeing/DurationSteppers.qml (100%) rename quickshell/Modules/{DankDash => DDash}/Wellbeing/WeeklyChart.qml (99%) rename quickshell/Modules/{DankDash => DDash}/Wellbeing/Wellbeing.js (100%) rename quickshell/Modules/{DankDash => DDash}/Wellbeing/WellbeingMetrics.qml (96%) rename quickshell/Modules/{DankDash => DDash}/WellbeingTab.qml (97%) rename quickshell/Modules/{DankDash => DDash}/utils/cards.js (100%) rename quickshell/Modules/{DankDash => DDash}/utils/options.js (100%) rename quickshell/Modules/{DankDash => DDash}/utils/widgets.js (100%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/ClipboardExpanded.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/ControlCenterExpanded.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/DashTabFace.qml (98%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/DestinationCompact.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/DotCompact.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/HomeCompact.qml (99%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/HomeExpanded.qml (97%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/IslandSlotHoverArea.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/LauncherExpanded.qml (99%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/MediaCompact.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/MediaExpanded.qml (88%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/NotificationCenterExpanded.qml (94%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/NotificationCompact.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/NotificationExpanded.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/SystemLevelCompact.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/SystemLevelExpanded.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/SystemStateCompact.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/WallpaperExpanded.qml (97%) rename quickshell/Modules/{DankIsland => DIsland}/Activities/WeatherExpanded.qml (94%) rename quickshell/Modules/{DankIsland/DankIsland.qml => DIsland/DIsland.qml} (99%) rename quickshell/Modules/{DankIsland/DankIslandHostWindow.qml => DIsland/DIslandHostWindow.qml} (100%) rename quickshell/Modules/{DankIsland/DankIslandSurface.qml => DIsland/DIslandSurface.qml} (99%) rename quickshell/Modules/{DankIsland => DIsland}/IslandBarHost.qml (99%) rename quickshell/Modules/{DankIsland => DIsland}/IslandContentHost.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/IslandController.qml (99%) rename quickshell/Modules/{DankIsland => DIsland}/IslandFreeDragArea.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/IslandFreeHostWindow.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/IslandHostChrome.qml (97%) rename quickshell/Modules/{DankIsland => DIsland}/IslandHostRegistry.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/IslandMediaSource.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/IslandNotificationSource.qml (100%) rename quickshell/Modules/{DankIsland => DIsland}/IslandSystemSource.qml (100%) rename quickshell/Modules/Settings/{DankBarAppearanceTab.qml => DBarAppearanceTab.qml} (100%) rename quickshell/Modules/Settings/{DankBarTab.qml => DBarTab.qml} (100%) rename quickshell/Modules/Settings/{DankDashTab.qml => DDashTab.qml} (99%) rename quickshell/Modules/Settings/{DankDotTab.qml => DDotTab.qml} (100%) create mode 100644 quickshell/Widgets/DAnimatedAlbumArt.qml create mode 100644 quickshell/Widgets/DBackdrop.qml rename quickshell/Widgets/{DankContextMenu.qml => DContextMenu.qml} (100%) rename quickshell/Widgets/{DankEditableGrid.qml => DEditableGrid.qml} (100%) rename quickshell/Widgets/{DankEditableGridSlot.qml => DEditableGridSlot.qml} (100%) create mode 100644 quickshell/Widgets/DFloatingWindow.qml create mode 100644 quickshell/Widgets/DFocusGrab.qml rename quickshell/Widgets/{DankGridEditChrome.qml => DGridEditChrome.qml} (99%) rename quickshell/Widgets/{DankKeyHints.qml => DKeyHints.qml} (100%) create mode 100644 quickshell/Widgets/DOSD.qml rename quickshell/Widgets/{DankOSDSheet.qml => DOSDSheet.qml} (99%) rename quickshell/Widgets/{DankPanelResizer.qml => DPanelResizer.qml} (100%) create mode 100644 quickshell/Widgets/DPopout.qml rename quickshell/Widgets/{DankPopoutHost.qml => DPopoutHost.qml} (99%) rename quickshell/Widgets/{DankResizeGrip.qml => DResizeGrip.qml} (100%) create mode 100644 quickshell/Widgets/DSeekbar.qml create mode 100644 quickshell/Widgets/DSlideout.qml create mode 100644 quickshell/Widgets/DTooltip.qml diff --git a/dank-qml-common b/dank-qml-common index e9ec23320..b5b763969 160000 --- a/dank-qml-common +++ b/dank-qml-common @@ -1 +1 @@ -Subproject commit e9ec2332004ca2e8b248bbe8fc96971f5df6b824 +Subproject commit b5b7639693b2c83f0f97ddd2af3d60d559174846 diff --git a/flake.lock b/flake.lock index e85a7fbf6..191a394d2 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "dank-qml-common": { "flake": false, "locked": { - "lastModified": 1791232364, - "narHash": "sha256-pecYGeFoTFbCxS2ip9vBvrPaVhN7J5+e16GJUKwg2r8=", + "lastModified": 1791237894, + "narHash": "sha256-O2Gsf++QDSD7GHXGitFHvHKW+5jaYkTwKZb40U7EB2U=", "owner": "AvengeMedia", "repo": "dank-qml-common", - "rev": "e9ec2332004ca2e8b248bbe8fc96971f5df6b824", + "rev": "b5b7639693b2c83f0f97ddd2af3d60d559174846", "type": "github" }, "original": { diff --git a/quickshell/DMSShell.qml b/quickshell/DMSShell.qml index 310de902c..32800f29e 100644 --- a/quickshell/DMSShell.qml +++ b/quickshell/DMSShell.qml @@ -9,10 +9,10 @@ import qs.Modals.Clipboard import qs.Modals.Common import qs.Modals.Greeter import qs.Modals.Settings -import qs.Modals.DankLauncherV2 +import qs.Modals.DLauncherV2 import qs.Modules import qs.Modules.AppDrawer -import qs.Modules.DankDash +import qs.Modules.DDash import qs.Modules.ControlCenter import qs.Modules.Dock import qs.Modules.Lock @@ -22,7 +22,7 @@ import qs.Widgets import qs.Modules.Notifications.Popup import qs.Modules.OSD import qs.Modules.ProcessList -import qs.Modules.DankBar.Popouts +import qs.Modules.DBar.Popouts import qs.Modules.WorkspaceOverlays import qs.Modules.Settings.DisplayConfig import qs.Services @@ -300,7 +300,7 @@ Item { } sourceComponent: Component { - DankDashPopout { + DDashPopout { id: dankDashPopout onPopoutClosed: PopoutService._scheduleUnload("dankDash") @@ -746,7 +746,7 @@ Item { PopoutService.dankLauncherV2ModalLoader = dankLauncherV2ModalLoader; } - DankLauncherV2Modal { + DLauncherV2Modal { id: dankLauncherV2Modal Component.onCompleted: { @@ -765,7 +765,7 @@ Item { PopoutService.spotlightBarModalLoader = spotlightBarModalLoader; } - DankLauncherV2ModalHost { + DLauncherV2ModalHost { id: spotlightBarModal connected: false spotlight: true @@ -1053,7 +1053,7 @@ Item { id: notepadSlideoutVariants model: SettingsData.getFilteredScreens("notepad") - delegate: DankSlideout { + delegate: DSlideout { id: notepadSlideout title: I18n.tr("Notepad") slideoutWidth: 480 diff --git a/quickshell/DMSShellIPC.qml b/quickshell/DMSShellIPC.qml index 67291c447..e24fc0c40 100644 --- a/quickshell/DMSShellIPC.qml +++ b/quickshell/DMSShellIPC.qml @@ -4,7 +4,7 @@ import Quickshell.Wayland import Quickshell.Services.SystemTray import Quickshell.Services.UPower import qs.Common -import qs.Modules.DankDash +import qs.Modules.DDash import qs.Services import qs.Modules.Settings.DisplayConfig diff --git a/quickshell/Modals/AppPickerModal.qml b/quickshell/Modals/AppPickerModal.qml index e1b9e298f..2e11dc986 100644 --- a/quickshell/Modals/AppPickerModal.qml +++ b/quickshell/Modals/AppPickerModal.qml @@ -2,11 +2,11 @@ import QtQuick import Quickshell import qs.Common import qs.Modals.Common -import qs.Modals.DankLauncherV2.Components +import qs.Modals.DLauncherV2.Components import qs.DCommon.Widgets import qs.Services -DankModal { +DModal { id: root readonly property var log: Log.scoped("AppPickerModal") diff --git a/quickshell/Modals/BluetoothPairingModal.qml b/quickshell/Modals/BluetoothPairingModal.qml index 1a2df9975..72ba5c6fe 100644 --- a/quickshell/Modals/BluetoothPairingModal.qml +++ b/quickshell/Modals/BluetoothPairingModal.qml @@ -4,7 +4,7 @@ import qs.Modals.Common import qs.Services import qs.DCommon.Widgets -DankModal { +DModal { id: root readonly property var log: Log.scoped("BluetoothPairingModal") diff --git a/quickshell/Modals/Changelog/ChangelogModal.qml b/quickshell/Modals/Changelog/ChangelogModal.qml index 87251fc33..b4a392662 100644 --- a/quickshell/Modals/Changelog/ChangelogModal.qml +++ b/quickshell/Modals/Changelog/ChangelogModal.qml @@ -4,7 +4,7 @@ import qs.Services import qs.DCommon.Widgets import qs.Widgets -DankFloatingWindow { +DFloatingWindow { id: root readonly property int modalWidth: 680 diff --git a/quickshell/Modals/Clipboard/ClipboardContent.qml b/quickshell/Modals/Clipboard/ClipboardContent.qml index c764c6e26..2edfb47eb 100644 --- a/quickshell/Modals/Clipboard/ClipboardContent.qml +++ b/quickshell/Modals/Clipboard/ClipboardContent.qml @@ -184,7 +184,7 @@ Item { Component { id: filterMenuComponent - DankDropdown { + DDropdown { showTrigger: false popupAnchorItem: filterButton popupWidth: 180 diff --git a/quickshell/Modals/Clipboard/ClipboardContextMenu.qml b/quickshell/Modals/Clipboard/ClipboardContextMenu.qml index 37e17d84d..5426bc6d5 100644 --- a/quickshell/Modals/Clipboard/ClipboardContextMenu.qml +++ b/quickshell/Modals/Clipboard/ClipboardContextMenu.qml @@ -3,7 +3,7 @@ import qs.Common import qs.Services import qs.Widgets -DankContextMenu { +DContextMenu { id: root property var entry: null diff --git a/quickshell/Modals/Clipboard/ClipboardHistoryModal.qml b/quickshell/Modals/Clipboard/ClipboardHistoryModal.qml index da81bd5ba..e55df9cf6 100644 --- a/quickshell/Modals/Clipboard/ClipboardHistoryModal.qml +++ b/quickshell/Modals/Clipboard/ClipboardHistoryModal.qml @@ -6,7 +6,7 @@ import qs.Modals.Clipboard import qs.Modals.Common import qs.Services -DankModal { +DModal { id: clipboardHistoryModal layerNamespace: "dms:clipboard" diff --git a/quickshell/Modals/Clipboard/ClipboardHistoryPopout.qml b/quickshell/Modals/Clipboard/ClipboardHistoryPopout.qml index 4e67f500f..c9e330f35 100644 --- a/quickshell/Modals/Clipboard/ClipboardHistoryPopout.qml +++ b/quickshell/Modals/Clipboard/ClipboardHistoryPopout.qml @@ -8,7 +8,7 @@ import qs.Modals.Common import qs.Services import qs.Widgets -DankPopout { +DPopout { id: root layerNamespace: "dms:clipboard-popout" diff --git a/quickshell/Modals/Clipboard/ClipboardKeyboardHints.qml b/quickshell/Modals/Clipboard/ClipboardKeyboardHints.qml index c813db0cd..e52dfb6cb 100644 --- a/quickshell/Modals/Clipboard/ClipboardKeyboardHints.qml +++ b/quickshell/Modals/Clipboard/ClipboardKeyboardHints.qml @@ -17,7 +17,7 @@ Rectangle { opacity: visible ? 1 : 0 z: 100 - DankKeyHints { + DKeyHints { id: hints anchors.verticalCenter: parent.verticalCenter diff --git a/quickshell/Modals/ColorPickerModal.qml b/quickshell/Modals/ColorPickerModal.qml index 9fc127675..8860b76d9 100644 --- a/quickshell/Modals/ColorPickerModal.qml +++ b/quickshell/Modals/ColorPickerModal.qml @@ -4,7 +4,7 @@ import qs.Common import qs.Modals.Common import qs.Modules.ColorPicker -DankModal { +DModal { id: root layerNamespace: "dms:color-picker" diff --git a/quickshell/Modals/Common/ConfirmModal.qml b/quickshell/Modals/Common/ConfirmModal.qml index 231033b91..169a111fc 100644 --- a/quickshell/Modals/Common/ConfirmModal.qml +++ b/quickshell/Modals/Common/ConfirmModal.qml @@ -2,7 +2,7 @@ import QtQuick import qs.Common import qs.Modals.Common -DankModal { +DModal { id: root layerNamespace: "dms:confirm-modal" diff --git a/quickshell/Modals/Common/DModal.qml b/quickshell/Modals/Common/DModal.qml new file mode 100644 index 000000000..77797c513 --- /dev/null +++ b/quickshell/Modals/Common/DModal.qml @@ -0,0 +1,173 @@ +import QtQuick +import qs.Common +import qs.Services +import qs.Widgets + +Item { + id: root + readonly property bool isFloatingWindowSurface: impl.item?.isFloatingWindowSurface ?? true + readonly property var log: Log.scoped("DModal") + + readonly property bool useHyprlandFocusGrab: CompositorService.useHyprlandFocusGrab + property string layerNamespace: "dms:modal" + property Component content: null + property Item directContent: null + property real modalWidth: 400 + property real modalHeight: 300 + property var targetScreen + property bool showBackground: true + property real backgroundOpacity: Theme.scrimAlpha + property string positioning: "center" + property point customPosition: Qt.point(0, 0) + property bool closeOnEscapeKey: true + property bool closeOnBackgroundClick: true + property string animationType: "scale" + property int animationDuration: Theme.modalAnimationDuration + property real animationScaleCollapsed: Theme.popupEnterScale + property real animationOffset: Theme.spacingL + property list animationEnterCurve: Theme.expressiveCurves.expressiveDefaultSpatial + property list animationExitCurve: Theme.expressiveCurves.emphasized + property color backgroundColor: Theme.floatingWindowSurface + property color borderColor: Theme.outlineVariant + property real borderWidth: 0 + property real cornerRadius: Theme.windowRadius + property bool enableShadow: true + property bool shouldBeVisible: false + property bool shouldHaveFocus: shouldBeVisible + property bool allowFocusOverride: false + property bool allowStacking: false + property bool keepContentLoaded: false + property bool keepPopoutsOpen: false + property var customKeyboardFocus: null + readonly property alias transientSurfaceTracker: _transientSurfaceTracker + property bool useOverlayLayer: false + + signal opened + signal dialogClosed + signal backgroundClicked + + readonly property var contentLoader: impl.item ? impl.item.contentLoader : null + readonly property alias modalFocusScope: _modalFocusScope + + TransientSurfaceTracker { + id: _transientSurfaceTracker + } + + FocusScope { + id: _modalFocusScope + objectName: "modalFocusScope" + focus: true + anchors.fill: parent + } + + // Hyprland OnDemand grab delivers keyboard focus to the modal content surface. + DFocusGrab { + windows: (root.contentWindow ? [root.contentWindow] : []).concat(root.transientSurfaceTracker?.focusWindows ?? []) + wanted: KeyboardFocus.wantsGrab(root.shouldHaveFocus, root.customKeyboardFocus) + } + readonly property var contentWindow: impl.item ? impl.item.contentWindow : null + readonly property var effectiveScreen: impl.item ? impl.item.effectiveScreen : null + readonly property real screenWidth: impl.item ? impl.item.screenWidth : 1920 + readonly property real screenHeight: impl.item ? impl.item.screenHeight : 1080 + readonly property real dpr: impl.item ? impl.item.dpr : 1 + readonly property bool isClosing: impl.item ? (impl.item.isClosing ?? false) : false + readonly property real alignedX: impl.item ? impl.item.alignedX : 0 + readonly property real alignedY: impl.item ? impl.item.alignedY : 0 + readonly property real alignedWidth: impl.item ? impl.item.alignedWidth : 0 + readonly property real alignedHeight: impl.item ? impl.item.alignedHeight : 0 + + function open() { + _maybeResolveBackend(); + if (impl.item) + impl.item.open(); + } + + function close() { + transientSurfaceTracker?.closeAll?.(); + if (impl.item) + impl.item.close(); + } + + function instantClose() { + transientSurfaceTracker?.closeAll?.(); + if (impl.item && typeof impl.item.instantClose === "function") + impl.item.instantClose(); + } + + function toggle() { + if (impl.item) + impl.item.toggle(); + } + + readonly property bool _desiredConnected: FrameTransitionState.effectiveConnectedFrameModeActive + property bool _resolvedConnected: false + + Component.onCompleted: _loadHost(_desiredConnected) + + readonly property bool settingsConnectedFrameModeActive: SettingsData.connectedFrameModeActive + + onSettingsConnectedFrameModeActiveChanged: _maybeResolveBackend() + + function _maybeResolveBackend() { + if (_resolvedConnected === _desiredConnected) + return; + if (impl.item && (impl.item.shouldBeVisible || impl.item.isClosing)) + return; + _loadHost(_desiredConnected); + } + + function _loadHost(connected) { + impl.sourceComponent = null; + _resolvedConnected = connected; + impl.sourceComponent = hostComponent; + } + + Loader { + id: impl + onItemChanged: if (item) + root._wireBackend(item) + } + + Component { + id: hostComponent + DModalHost { + id: host + + modalHandle: root + connected: root._resolvedConnected + + onShouldBeVisibleChanged: { + if (root.shouldBeVisible !== host.shouldBeVisible) + root.shouldBeVisible = host.shouldBeVisible; + } + onShouldHaveFocusChanged: { + if (root.shouldHaveFocus !== host.shouldHaveFocus) + root.shouldHaveFocus = host.shouldHaveFocus; + } + onOpened: root.opened() + onDialogClosed: { + root.dialogClosed(); + root._maybeResolveBackend(); + } + onBackgroundClicked: root.backgroundClicked() + } + } + + function _wireBackend(it) { + it.shouldBeVisible = root.shouldBeVisible; + it.shouldHaveFocus = root.shouldHaveFocus; + _modalFocusScope.parent = it.modalFocusScope; + } + + onShouldBeVisibleChanged: { + if (!shouldBeVisible) + transientSurfaceTracker?.closeAll?.(); + if (impl.item && impl.item.shouldBeVisible !== shouldBeVisible) + impl.item.shouldBeVisible = shouldBeVisible; + } + + onShouldHaveFocusChanged: { + if (impl.item && impl.item.shouldHaveFocus !== shouldHaveFocus) + impl.item.shouldHaveFocus = shouldHaveFocus; + } +} diff --git a/quickshell/Modals/Common/DankModalHost.qml b/quickshell/Modals/Common/DModalHost.qml similarity index 99% rename from quickshell/Modals/Common/DankModalHost.qml rename to quickshell/Modals/Common/DModalHost.qml index f6c4d07d8..b0a4f64b9 100644 --- a/quickshell/Modals/Common/DankModalHost.qml +++ b/quickshell/Modals/Common/DModalHost.qml @@ -11,7 +11,7 @@ import "../../Common/FluidGeometry.js" as FluidGeometry Item { id: root readonly property bool isFloatingWindowSurface: !frameOwnsConnectedChrome - readonly property var log: Log.scoped("DankModalHost") + readonly property var log: Log.scoped("DModalHost") required property var modalHandle property bool connected: true diff --git a/quickshell/Modals/Common/DankModal.qml b/quickshell/Modals/Common/DankModal.qml index 405161566..8f7ac717d 100644 --- a/quickshell/Modals/Common/DankModal.qml +++ b/quickshell/Modals/Common/DankModal.qml @@ -1,173 +1,7 @@ import QtQuick import qs.Common -import qs.Services -import qs.Widgets -Item { - id: root - readonly property bool isFloatingWindowSurface: impl.item?.isFloatingWindowSurface ?? true - readonly property var log: Log.scoped("DankModal") - - readonly property bool useHyprlandFocusGrab: CompositorService.useHyprlandFocusGrab - property string layerNamespace: "dms:modal" - property Component content: null - property Item directContent: null - property real modalWidth: 400 - property real modalHeight: 300 - property var targetScreen - property bool showBackground: true - property real backgroundOpacity: Theme.scrimAlpha - property string positioning: "center" - property point customPosition: Qt.point(0, 0) - property bool closeOnEscapeKey: true - property bool closeOnBackgroundClick: true - property string animationType: "scale" - property int animationDuration: Theme.modalAnimationDuration - property real animationScaleCollapsed: Theme.popupEnterScale - property real animationOffset: Theme.spacingL - property list animationEnterCurve: Theme.expressiveCurves.expressiveDefaultSpatial - property list animationExitCurve: Theme.expressiveCurves.emphasized - property color backgroundColor: Theme.floatingWindowSurface - property color borderColor: Theme.outlineVariant - property real borderWidth: 0 - property real cornerRadius: Theme.windowRadius - property bool enableShadow: true - property bool shouldBeVisible: false - property bool shouldHaveFocus: shouldBeVisible - property bool allowFocusOverride: false - property bool allowStacking: false - property bool keepContentLoaded: false - property bool keepPopoutsOpen: false - property var customKeyboardFocus: null - readonly property alias transientSurfaceTracker: _transientSurfaceTracker - property bool useOverlayLayer: false - - signal opened - signal dialogClosed - signal backgroundClicked - - readonly property var contentLoader: impl.item ? impl.item.contentLoader : null - readonly property alias modalFocusScope: _modalFocusScope - - TransientSurfaceTracker { - id: _transientSurfaceTracker - } - - FocusScope { - id: _modalFocusScope - objectName: "modalFocusScope" - focus: true - anchors.fill: parent - } - - // Hyprland OnDemand grab delivers keyboard focus to the modal content surface. - DankFocusGrab { - windows: (root.contentWindow ? [root.contentWindow] : []).concat(root.transientSurfaceTracker?.focusWindows ?? []) - wanted: KeyboardFocus.wantsGrab(root.shouldHaveFocus, root.customKeyboardFocus) - } - readonly property var contentWindow: impl.item ? impl.item.contentWindow : null - readonly property var effectiveScreen: impl.item ? impl.item.effectiveScreen : null - readonly property real screenWidth: impl.item ? impl.item.screenWidth : 1920 - readonly property real screenHeight: impl.item ? impl.item.screenHeight : 1080 - readonly property real dpr: impl.item ? impl.item.dpr : 1 - readonly property bool isClosing: impl.item ? (impl.item.isClosing ?? false) : false - readonly property real alignedX: impl.item ? impl.item.alignedX : 0 - readonly property real alignedY: impl.item ? impl.item.alignedY : 0 - readonly property real alignedWidth: impl.item ? impl.item.alignedWidth : 0 - readonly property real alignedHeight: impl.item ? impl.item.alignedHeight : 0 - - function open() { - _maybeResolveBackend(); - if (impl.item) - impl.item.open(); - } - - function close() { - transientSurfaceTracker?.closeAll?.(); - if (impl.item) - impl.item.close(); - } - - function instantClose() { - transientSurfaceTracker?.closeAll?.(); - if (impl.item && typeof impl.item.instantClose === "function") - impl.item.instantClose(); - } - - function toggle() { - if (impl.item) - impl.item.toggle(); - } - - readonly property bool _desiredConnected: FrameTransitionState.effectiveConnectedFrameModeActive - property bool _resolvedConnected: false - - Component.onCompleted: _loadHost(_desiredConnected) - - readonly property bool settingsConnectedFrameModeActive: SettingsData.connectedFrameModeActive - - onSettingsConnectedFrameModeActiveChanged: _maybeResolveBackend() - - function _maybeResolveBackend() { - if (_resolvedConnected === _desiredConnected) - return; - if (impl.item && (impl.item.shouldBeVisible || impl.item.isClosing)) - return; - _loadHost(_desiredConnected); - } - - function _loadHost(connected) { - impl.sourceComponent = null; - _resolvedConnected = connected; - impl.sourceComponent = hostComponent; - } - - Loader { - id: impl - onItemChanged: if (item) - root._wireBackend(item) - } - - Component { - id: hostComponent - DankModalHost { - id: host - - modalHandle: root - connected: root._resolvedConnected - - onShouldBeVisibleChanged: { - if (root.shouldBeVisible !== host.shouldBeVisible) - root.shouldBeVisible = host.shouldBeVisible; - } - onShouldHaveFocusChanged: { - if (root.shouldHaveFocus !== host.shouldHaveFocus) - root.shouldHaveFocus = host.shouldHaveFocus; - } - onOpened: root.opened() - onDialogClosed: { - root.dialogClosed(); - root._maybeResolveBackend(); - } - onBackgroundClicked: root.backgroundClicked() - } - } - - function _wireBackend(it) { - it.shouldBeVisible = root.shouldBeVisible; - it.shouldHaveFocus = root.shouldHaveFocus; - _modalFocusScope.parent = it.modalFocusScope; - } - - onShouldBeVisibleChanged: { - if (!shouldBeVisible) - transientSurfaceTracker?.closeAll?.(); - if (impl.item && impl.item.shouldBeVisible !== shouldBeVisible) - impl.item.shouldBeVisible = shouldBeVisible; - } - - onShouldHaveFocusChanged: { - if (impl.item && impl.item.shouldHaveFocus !== shouldHaveFocus) - impl.item.shouldHaveFocus = shouldHaveFocus; - } +DModal { + id: shim + Component.onCompleted: Deprecation.type(shim, "DankModal", "DModal", "qs.Modals.Common") } diff --git a/quickshell/Modals/Common/InputModal.qml b/quickshell/Modals/Common/InputModal.qml index ab7c4d29b..d07ae55ce 100644 --- a/quickshell/Modals/Common/InputModal.qml +++ b/quickshell/Modals/Common/InputModal.qml @@ -3,7 +3,7 @@ import qs.Common import qs.Modals.Common import qs.DCommon.Widgets -DankModal { +DModal { id: root layerNamespace: "dms:input-modal" diff --git a/quickshell/Modals/DankLauncherV2/ActionPanel.qml b/quickshell/Modals/DLauncherV2/ActionPanel.qml similarity index 100% rename from quickshell/Modals/DankLauncherV2/ActionPanel.qml rename to quickshell/Modals/DLauncherV2/ActionPanel.qml diff --git a/quickshell/Modals/DankLauncherV2/AppEditView.qml b/quickshell/Modals/DLauncherV2/AppEditView.qml similarity index 100% rename from quickshell/Modals/DankLauncherV2/AppEditView.qml rename to quickshell/Modals/DLauncherV2/AppEditView.qml diff --git a/quickshell/Modals/DankLauncherV2/ClipboardLauncherPreview.qml b/quickshell/Modals/DLauncherV2/ClipboardLauncherPreview.qml similarity index 100% rename from quickshell/Modals/DankLauncherV2/ClipboardLauncherPreview.qml rename to quickshell/Modals/DLauncherV2/ClipboardLauncherPreview.qml diff --git a/quickshell/Modals/DankLauncherV2/Components/LauncherHighlight.qml b/quickshell/Modals/DLauncherV2/Components/LauncherHighlight.qml similarity index 100% rename from quickshell/Modals/DankLauncherV2/Components/LauncherHighlight.qml rename to quickshell/Modals/DLauncherV2/Components/LauncherHighlight.qml diff --git a/quickshell/Modals/DankLauncherV2/Components/LauncherMetrics.qml b/quickshell/Modals/DLauncherV2/Components/LauncherMetrics.qml similarity index 100% rename from quickshell/Modals/DankLauncherV2/Components/LauncherMetrics.qml rename to quickshell/Modals/DLauncherV2/Components/LauncherMetrics.qml diff --git a/quickshell/Modals/DankLauncherV2/Components/LauncherRow.qml b/quickshell/Modals/DLauncherV2/Components/LauncherRow.qml similarity index 99% rename from quickshell/Modals/DankLauncherV2/Components/LauncherRow.qml rename to quickshell/Modals/DLauncherV2/Components/LauncherRow.qml index 3bfdb5e97..3fee269a7 100644 --- a/quickshell/Modals/DankLauncherV2/Components/LauncherRow.qml +++ b/quickshell/Modals/DLauncherV2/Components/LauncherRow.qml @@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common import qs.DCommon.Widgets -import qs.Modals.DankLauncherV2 +import qs.Modals.DLauncherV2 import "../../../Common/htmlElide.js" as HtmlElide DListItem { diff --git a/quickshell/Modals/DankLauncherV2/Components/LauncherSearchField.qml b/quickshell/Modals/DLauncherV2/Components/LauncherSearchField.qml similarity index 100% rename from quickshell/Modals/DankLauncherV2/Components/LauncherSearchField.qml rename to quickshell/Modals/DLauncherV2/Components/LauncherSearchField.qml diff --git a/quickshell/Modals/DankLauncherV2/Components/LauncherTile.qml b/quickshell/Modals/DLauncherV2/Components/LauncherTile.qml similarity index 99% rename from quickshell/Modals/DankLauncherV2/Components/LauncherTile.qml rename to quickshell/Modals/DLauncherV2/Components/LauncherTile.qml index b1065626f..4e3789dcc 100644 --- a/quickshell/Modals/DankLauncherV2/Components/LauncherTile.qml +++ b/quickshell/Modals/DLauncherV2/Components/LauncherTile.qml @@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common import qs.DCommon.Widgets -import qs.Modals.DankLauncherV2 +import qs.Modals.DLauncherV2 Rectangle { id: root diff --git a/quickshell/Modals/DankLauncherV2/Controller.qml b/quickshell/Modals/DLauncherV2/Controller.qml similarity index 98% rename from quickshell/Modals/DankLauncherV2/Controller.qml rename to quickshell/Modals/DLauncherV2/Controller.qml index b2076a7ff..d5fd4dde7 100644 --- a/quickshell/Modals/DankLauncherV2/Controller.qml +++ b/quickshell/Modals/DLauncherV2/Controller.qml @@ -64,37 +64,37 @@ Item { property bool _dmenuSelectApplied: false readonly property var _dmenuKeyNameMap: (function () { - var m = ({}); - for (var c = 0; c < 26; c++) - m[String.fromCharCode(97 + c)] = Qt.Key_A + c; - for (var d = 0; d <= 9; d++) - m[String(d)] = Qt.Key_0 + d; - for (var f = 1; f <= 12; f++) - m["f" + f] = Qt.Key_F1 + (f - 1); - m["return"] = Qt.Key_Return; - m["enter"] = Qt.Key_Enter; - m["tab"] = Qt.Key_Tab; - m["space"] = Qt.Key_Space; - m["escape"] = Qt.Key_Escape; - m["esc"] = Qt.Key_Escape; - m["delete"] = Qt.Key_Delete; - m["backspace"] = Qt.Key_Backspace; - m["insert"] = Qt.Key_Insert; - m["home"] = Qt.Key_Home; - m["end"] = Qt.Key_End; - m["pageup"] = Qt.Key_PageUp; - m["pagedown"] = Qt.Key_PageDown; - m["up"] = Qt.Key_Up; - m["down"] = Qt.Key_Down; - m["left"] = Qt.Key_Left; - m["right"] = Qt.Key_Right; - m["minus"] = Qt.Key_Minus; - m["equal"] = Qt.Key_Equal; - m["comma"] = Qt.Key_Comma; - m["period"] = Qt.Key_Period; - m["slash"] = Qt.Key_Slash; - return m; - })() + var m = ({}); + for (var c = 0; c < 26; c++) + m[String.fromCharCode(97 + c)] = Qt.Key_A + c; + for (var d = 0; d <= 9; d++) + m[String(d)] = Qt.Key_0 + d; + for (var f = 1; f <= 12; f++) + m["f" + f] = Qt.Key_F1 + (f - 1); + m["return"] = Qt.Key_Return; + m["enter"] = Qt.Key_Enter; + m["tab"] = Qt.Key_Tab; + m["space"] = Qt.Key_Space; + m["escape"] = Qt.Key_Escape; + m["esc"] = Qt.Key_Escape; + m["delete"] = Qt.Key_Delete; + m["backspace"] = Qt.Key_Backspace; + m["insert"] = Qt.Key_Insert; + m["home"] = Qt.Key_Home; + m["end"] = Qt.Key_End; + m["pageup"] = Qt.Key_PageUp; + m["pagedown"] = Qt.Key_PageDown; + m["up"] = Qt.Key_Up; + m["down"] = Qt.Key_Down; + m["left"] = Qt.Key_Left; + m["right"] = Qt.Key_Right; + m["minus"] = Qt.Key_Minus; + m["equal"] = Qt.Key_Equal; + m["comma"] = Qt.Key_Comma; + m["period"] = Qt.Key_Period; + m["slash"] = Qt.Key_Slash; + return m; + })() function _parseDmenuKeySpec(spec) { var parts = spec.toLowerCase().split("+").map(function (s) { @@ -1216,11 +1216,13 @@ Item { clearActivePluginViewPreference(); if (searchMode === "dmenu") { - var dmenuGroups = [{ - title: "", - icon: "", - items: [] - }]; + var dmenuGroups = [ + { + title: "", + icon: "", + items: [] + } + ]; for (var gi = 0; gi < dmenuItems.length; gi++) { var gitem = dmenuItems[gi]; if (gitem.data.header) { diff --git a/quickshell/Modals/DankLauncherV2/ControllerUtils.js b/quickshell/Modals/DLauncherV2/ControllerUtils.js similarity index 100% rename from quickshell/Modals/DankLauncherV2/ControllerUtils.js rename to quickshell/Modals/DLauncherV2/ControllerUtils.js diff --git a/quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml b/quickshell/Modals/DLauncherV2/DLauncherV2Modal.qml similarity index 97% rename from quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml rename to quickshell/Modals/DLauncherV2/DLauncherV2Modal.qml index 04a427cf3..f2a1e41cf 100644 --- a/quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml +++ b/quickshell/Modals/DLauncherV2/DLauncherV2Modal.qml @@ -4,7 +4,7 @@ import qs.Services Item { id: root - readonly property var log: Log.scoped("DankLauncherV2Modal") + readonly property var log: Log.scoped("DLauncherV2Modal") readonly property bool spotlightOpen: impl.item ? impl.item.spotlightOpen : false readonly property bool isClosing: impl.item ? impl.item.isClosing : false @@ -106,7 +106,7 @@ Item { Component { id: hostComp - DankLauncherV2ModalHost { + DLauncherV2ModalHost { modalHandle: root triggerUsesOverlayLayer: root.triggerUsesOverlayLayer connected: root._resolvedConnected @@ -117,7 +117,7 @@ Item { Component { id: islandComp - DankLauncherV2ModalIsland { + DLauncherV2ModalIsland { modalHandle: root triggerUsesOverlayLayer: root.triggerUsesOverlayLayer onDialogClosed: root._hostDialogClosed() diff --git a/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalHost.qml b/quickshell/Modals/DLauncherV2/DLauncherV2ModalHost.qml similarity index 99% rename from quickshell/Modals/DankLauncherV2/DankLauncherV2ModalHost.qml rename to quickshell/Modals/DLauncherV2/DLauncherV2ModalHost.qml index 07fcf516e..ce2c9545f 100644 --- a/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalHost.qml +++ b/quickshell/Modals/DLauncherV2/DLauncherV2ModalHost.qml @@ -5,7 +5,7 @@ import Quickshell import Quickshell.Wayland import Quickshell.Hyprland import qs.Common -import qs.Modals.DankLauncherV2.Components +import qs.Modals.DLauncherV2.Components import qs.Services import qs.Widgets import "../../Common/FluidGeometry.js" as FluidGeometry @@ -15,7 +15,7 @@ Item { property bool connected: true property bool spotlight: false readonly property bool isFloatingWindowSurface: connected ? !connectedSurfaceOverride : !frameConnected - readonly property var log: Log.scoped("DankLauncherV2ModalHost") + readonly property var log: Log.scoped("DLauncherV2ModalHost") property bool _fluidMotionActive: false readonly property bool connectedFluidMotion: _fluidMotionActive && frameOwnsConnectedChrome diff --git a/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalIsland.qml b/quickshell/Modals/DLauncherV2/DLauncherV2ModalIsland.qml similarity index 96% rename from quickshell/Modals/DankLauncherV2/DankLauncherV2ModalIsland.qml rename to quickshell/Modals/DLauncherV2/DLauncherV2ModalIsland.qml index 677dbb2c7..f0e0e7587 100644 --- a/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalIsland.qml +++ b/quickshell/Modals/DLauncherV2/DLauncherV2ModalIsland.qml @@ -2,7 +2,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common -import qs.Modals.DankLauncherV2.Components +import qs.Modals.DLauncherV2.Components import qs.Services Item { @@ -13,7 +13,7 @@ Item { property bool usingFallback: false property bool _islandWasOpen: false - readonly property var log: Log.scoped("DankLauncherV2ModalIsland") + readonly property var log: Log.scoped("DLauncherV2ModalIsland") readonly property var router: PopoutService.dankIslandRouter readonly property bool spotlightOpen: usingFallback ? fallback.spotlightOpen : (router?.launcherOpen ?? false) readonly property bool isClosing: usingFallback ? fallback.isClosing : false @@ -123,7 +123,7 @@ Item { dialogClosed(); } - DankLauncherV2ModalHost { + DLauncherV2ModalHost { id: fallback connected: root.modalHandle?._resolvedConnected ?? false diff --git a/quickshell/Modals/DankLauncherV2/ItemTransformers.js b/quickshell/Modals/DLauncherV2/ItemTransformers.js similarity index 99% rename from quickshell/Modals/DankLauncherV2/ItemTransformers.js rename to quickshell/Modals/DLauncherV2/ItemTransformers.js index d17344be3..e8412e4d3 100644 --- a/quickshell/Modals/DankLauncherV2/ItemTransformers.js +++ b/quickshell/Modals/DLauncherV2/ItemTransformers.js @@ -1,6 +1,5 @@ .pragma library - - .import "ControllerUtils.js" as Utils +.import "ControllerUtils.js" as Utils function transformDmenuItem(text, index, opts) { opts = opts || {}; diff --git a/quickshell/Modals/DankLauncherV2/LauncherContent.qml b/quickshell/Modals/DLauncherV2/LauncherContent.qml similarity index 99% rename from quickshell/Modals/DankLauncherV2/LauncherContent.qml rename to quickshell/Modals/DLauncherV2/LauncherContent.qml index 15306e43e..ff23d2424 100644 --- a/quickshell/Modals/DankLauncherV2/LauncherContent.qml +++ b/quickshell/Modals/DLauncherV2/LauncherContent.qml @@ -6,7 +6,7 @@ import qs.Common import qs.Services import qs.DCommon.Widgets import qs.Widgets -import qs.Modals.DankLauncherV2.Components +import qs.Modals.DLauncherV2.Components FocusScope { id: root @@ -514,7 +514,7 @@ FocusScope { } } - DankDropdown { + DDropdown { id: categoryDropdown transientSurfaceTracker: root.transientSurfaceTracker focusPolicy: Qt.NoFocus @@ -581,7 +581,7 @@ FocusScope { height: Theme.buttonHeightS spacing: Theme.spacingS - DankDropdown { + DDropdown { id: typeDropdown focusPolicy: Qt.NoFocus focusReturnTarget: searchField @@ -621,7 +621,7 @@ FocusScope { } } - DankDropdown { + DDropdown { id: sortDropdown focusPolicy: Qt.NoFocus focusReturnTarget: searchField diff --git a/quickshell/Modals/DankLauncherV2/LauncherContextMenu.qml b/quickshell/Modals/DLauncherV2/LauncherContextMenu.qml similarity index 99% rename from quickshell/Modals/DankLauncherV2/LauncherContextMenu.qml rename to quickshell/Modals/DLauncherV2/LauncherContextMenu.qml index 32213fee3..cc6b6f2b7 100644 --- a/quickshell/Modals/DankLauncherV2/LauncherContextMenu.qml +++ b/quickshell/Modals/DLauncherV2/LauncherContextMenu.qml @@ -4,7 +4,7 @@ import qs.Services import qs.Widgets import "ControllerUtils.js" as Utils -DankContextMenu { +DContextMenu { id: root property var item: null diff --git a/quickshell/Modals/DankLauncherV2/NavigationHelpers.js b/quickshell/Modals/DLauncherV2/NavigationHelpers.js similarity index 98% rename from quickshell/Modals/DankLauncherV2/NavigationHelpers.js rename to quickshell/Modals/DLauncherV2/NavigationHelpers.js index 1e78b11a6..ed782bbd7 100644 --- a/quickshell/Modals/DankLauncherV2/NavigationHelpers.js +++ b/quickshell/Modals/DLauncherV2/NavigationHelpers.js @@ -47,12 +47,12 @@ function getSectionBounds(flatModel, sectionId) { function getGridColumns(viewMode, gridColumns) { switch (viewMode) { - case "tile": - return 3; - case "grid": - return gridColumns; - default: - return 1; + case "tile": + return 3; + case "grid": + return gridColumns; + default: + return 1; } } diff --git a/quickshell/Modals/DankLauncherV2/ResultsList.qml b/quickshell/Modals/DLauncherV2/ResultsList.qml similarity index 99% rename from quickshell/Modals/DankLauncherV2/ResultsList.qml rename to quickshell/Modals/DLauncherV2/ResultsList.qml index 002be3051..ca1ec909b 100644 --- a/quickshell/Modals/DankLauncherV2/ResultsList.qml +++ b/quickshell/Modals/DLauncherV2/ResultsList.qml @@ -5,7 +5,7 @@ import Quickshell import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modals.DankLauncherV2.Components +import qs.Modals.DLauncherV2.Components Item { id: root diff --git a/quickshell/Modals/DankLauncherV2/Scorer.js b/quickshell/Modals/DLauncherV2/Scorer.js similarity index 100% rename from quickshell/Modals/DankLauncherV2/Scorer.js rename to quickshell/Modals/DLauncherV2/Scorer.js diff --git a/quickshell/Modals/DankLauncherV2/Section.qml b/quickshell/Modals/DLauncherV2/Section.qml similarity index 98% rename from quickshell/Modals/DankLauncherV2/Section.qml rename to quickshell/Modals/DLauncherV2/Section.qml index ad92a3094..62c8dc6b9 100644 --- a/quickshell/Modals/DankLauncherV2/Section.qml +++ b/quickshell/Modals/DLauncherV2/Section.qml @@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import Quickshell import qs.Common -import qs.Modals.DankLauncherV2.Components +import qs.Modals.DLauncherV2.Components Item { id: root diff --git a/quickshell/Modals/DankLauncherV2/SectionHeader.qml b/quickshell/Modals/DLauncherV2/SectionHeader.qml similarity index 98% rename from quickshell/Modals/DankLauncherV2/SectionHeader.qml rename to quickshell/Modals/DLauncherV2/SectionHeader.qml index fe43a7dfe..af98cb3ee 100644 --- a/quickshell/Modals/DankLauncherV2/SectionHeader.qml +++ b/quickshell/Modals/DLauncherV2/SectionHeader.qml @@ -5,7 +5,7 @@ import qs.Common import qs.Services import qs.DCommon.Widgets import qs.Widgets -import qs.Modals.DankLauncherV2.Components +import qs.Modals.DLauncherV2.Components Item { id: root @@ -124,7 +124,7 @@ Item { Loader { id: categoryDropdown active: root.hasAppCategories - sourceComponent: DankDropdown { + sourceComponent: DDropdown { showTrigger: false focusPolicy: Qt.NoFocus popupWidth: Math.min(Theme.fieldDefaultWidth, root.width) diff --git a/quickshell/Modals/DankLauncherV2/SourceBadge.qml b/quickshell/Modals/DLauncherV2/SourceBadge.qml similarity index 100% rename from quickshell/Modals/DankLauncherV2/SourceBadge.qml rename to quickshell/Modals/DLauncherV2/SourceBadge.qml diff --git a/quickshell/Modals/DankLauncherV2/SpotlightLauncherContent.qml b/quickshell/Modals/DLauncherV2/SpotlightLauncherContent.qml similarity index 99% rename from quickshell/Modals/DankLauncherV2/SpotlightLauncherContent.qml rename to quickshell/Modals/DLauncherV2/SpotlightLauncherContent.qml index 1fa83d66f..986a96e28 100644 --- a/quickshell/Modals/DankLauncherV2/SpotlightLauncherContent.qml +++ b/quickshell/Modals/DLauncherV2/SpotlightLauncherContent.qml @@ -5,7 +5,7 @@ import Quickshell.Widgets import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modals.DankLauncherV2.Components +import qs.Modals.DLauncherV2.Components FocusScope { id: root diff --git a/quickshell/Modals/DankLauncherV2/TileItem.qml b/quickshell/Modals/DLauncherV2/TileItem.qml similarity index 99% rename from quickshell/Modals/DankLauncherV2/TileItem.qml rename to quickshell/Modals/DLauncherV2/TileItem.qml index df8660d67..853fd094f 100644 --- a/quickshell/Modals/DankLauncherV2/TileItem.qml +++ b/quickshell/Modals/DLauncherV2/TileItem.qml @@ -6,7 +6,7 @@ import Quickshell.Wayland import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modals.DankLauncherV2.Components +import qs.Modals.DLauncherV2.Components LauncherTile { id: root diff --git a/quickshell/Modals/DisplayConfirmationModal.qml b/quickshell/Modals/DisplayConfirmationModal.qml index c48efec06..835dd78da 100644 --- a/quickshell/Modals/DisplayConfirmationModal.qml +++ b/quickshell/Modals/DisplayConfirmationModal.qml @@ -3,7 +3,7 @@ import qs.Common import qs.Modals.Common import qs.DCommon.Widgets -DankModal { +DModal { id: root property string outputName: "" diff --git a/quickshell/Modals/FileBrowser/FileBrowserSurfaceModal.qml b/quickshell/Modals/FileBrowser/FileBrowserSurfaceModal.qml index 012b60636..0c1c9af64 100644 --- a/quickshell/Modals/FileBrowser/FileBrowserSurfaceModal.qml +++ b/quickshell/Modals/FileBrowser/FileBrowserSurfaceModal.qml @@ -4,7 +4,7 @@ import qs.Common import qs.DCommon.FileBrowser import qs.Modals.Common -DankModal { +DModal { id: fileBrowserSurfaceModal property string mode: folderMode ? "openFolder" : saveMode ? "save" : "open" diff --git a/quickshell/Modals/Greeter/GreeterModal.qml b/quickshell/Modals/Greeter/GreeterModal.qml index a4e1218d5..9fc5fe868 100644 --- a/quickshell/Modals/Greeter/GreeterModal.qml +++ b/quickshell/Modals/Greeter/GreeterModal.qml @@ -5,7 +5,7 @@ import qs.Services import qs.DCommon.Widgets import qs.Widgets -DankFloatingWindow { +DFloatingWindow { id: root readonly property var log: Log.scoped("GreeterModal") diff --git a/quickshell/Modals/KeybindsModalOverlay.qml b/quickshell/Modals/KeybindsModalOverlay.qml index 224704840..d11a42f01 100644 --- a/quickshell/Modals/KeybindsModalOverlay.qml +++ b/quickshell/Modals/KeybindsModalOverlay.qml @@ -5,7 +5,7 @@ import qs.Modals import qs.Modals.Common import qs.Services -DankModal { +DModal { id: overlay signal floatingToggleRequested diff --git a/quickshell/Modals/KeybindsModalWindow.qml b/quickshell/Modals/KeybindsModalWindow.qml index a854c883d..45112bc7a 100644 --- a/quickshell/Modals/KeybindsModalWindow.qml +++ b/quickshell/Modals/KeybindsModalWindow.qml @@ -5,7 +5,7 @@ import qs.Services import qs.DCommon.Widgets import qs.Widgets -DankFloatingWindow { +DFloatingWindow { id: win property alias shouldBeVisible: win.visible diff --git a/quickshell/Modals/MuxModal.qml b/quickshell/Modals/MuxModal.qml index a12f550a8..87a5bea4d 100644 --- a/quickshell/Modals/MuxModal.qml +++ b/quickshell/Modals/MuxModal.qml @@ -10,7 +10,7 @@ import qs.Services import qs.DCommon.Widgets import qs.Widgets -DankModal { +DModal { id: muxModal layerNamespace: "dms:mux" @@ -559,7 +559,7 @@ DankModal { } } - DankKeyHints { + DKeyHints { id: shortcutsBar width: parent.width diff --git a/quickshell/Modals/NetworkInfoModal.qml b/quickshell/Modals/NetworkInfoModal.qml index 497ec7fad..80b8ee866 100644 --- a/quickshell/Modals/NetworkInfoModal.qml +++ b/quickshell/Modals/NetworkInfoModal.qml @@ -4,7 +4,7 @@ import qs.Modals.Common import qs.Services import qs.DCommon.Widgets -DankModal { +DModal { id: root property bool wired: false diff --git a/quickshell/Modals/NotificationModal.qml b/quickshell/Modals/NotificationModal.qml index c9fdc64d2..b77adf63c 100644 --- a/quickshell/Modals/NotificationModal.qml +++ b/quickshell/Modals/NotificationModal.qml @@ -6,7 +6,7 @@ import qs.Modals.Common import qs.Modules.Notifications.Center import qs.Services -DankModal { +DModal { id: notificationModal layerNamespace: "dms:notification-center-modal" @@ -106,7 +106,7 @@ DankModal { } IpcHandler { - // DankIsland owns this trigger whenever it is the sole bar for the screen. + // DIsland owns this trigger whenever it is the sole bar for the screen. function open(): string { if (PopoutService.routeToIsland("notificationcenter", null, false)) return "NOTIFICATION_ISLAND_OPEN_SUCCESS"; diff --git a/quickshell/Modals/PolkitAuthModal.qml b/quickshell/Modals/PolkitAuthModal.qml index 3feb05820..86979eb6b 100644 --- a/quickshell/Modals/PolkitAuthModal.qml +++ b/quickshell/Modals/PolkitAuthModal.qml @@ -4,7 +4,7 @@ import qs.Services import qs.DCommon.Widgets import qs.Widgets -DankFloatingWindow { +DFloatingWindow { id: root property var currentFlow: null diff --git a/quickshell/Modals/PolkitAuthSurfaceModal.qml b/quickshell/Modals/PolkitAuthSurfaceModal.qml index 65b9205dc..fedbc647c 100644 --- a/quickshell/Modals/PolkitAuthSurfaceModal.qml +++ b/quickshell/Modals/PolkitAuthSurfaceModal.qml @@ -4,7 +4,7 @@ import qs.Common import qs.Modals.Common import qs.Services -DankModal { +DModal { id: root property var parentPopout: null diff --git a/quickshell/Modals/PowerMenuModal.qml b/quickshell/Modals/PowerMenuModal.qml index 2f77acc84..2e6fa7c7d 100644 --- a/quickshell/Modals/PowerMenuModal.qml +++ b/quickshell/Modals/PowerMenuModal.qml @@ -5,7 +5,7 @@ import qs.Services import qs.Modules.PowerMenu import qs.DCommon.Session -DankModal { +DModal { id: root layerNamespace: "dms:power-menu" diff --git a/quickshell/Modals/PowerProfileModal.qml b/quickshell/Modals/PowerProfileModal.qml index 19f9599f3..a005eef79 100644 --- a/quickshell/Modals/PowerProfileModal.qml +++ b/quickshell/Modals/PowerProfileModal.qml @@ -5,7 +5,7 @@ import qs.Services import qs.DCommon.Widgets import Quickshell.Services.UPower -DankModal { +DModal { id: root layerNamespace: "dms:power-profiles" diff --git a/quickshell/Modals/ProcessListModal.qml b/quickshell/Modals/ProcessListModal.qml index 3a39a67b9..0f99f83f3 100644 --- a/quickshell/Modals/ProcessListModal.qml +++ b/quickshell/Modals/ProcessListModal.qml @@ -8,7 +8,7 @@ import qs.DCommon.Widgets import qs.Widgets import "../Common/Format.js" as Format -DankFloatingWindow { +DFloatingWindow { id: processListModal readonly property var log: Log.scoped("ProcessListModal") diff --git a/quickshell/Modals/QRGeneratorModal.qml b/quickshell/Modals/QRGeneratorModal.qml index 6087227b3..e1c142097 100644 --- a/quickshell/Modals/QRGeneratorModal.qml +++ b/quickshell/Modals/QRGeneratorModal.qml @@ -8,7 +8,7 @@ import qs.Common import qs.Services import qs.DCommon.Widgets -DankModal { +DModal { id: root visible: false layerNamespace: "dms:qr-generator" diff --git a/quickshell/Modals/Settings/SettingsContent.qml b/quickshell/Modals/Settings/SettingsContent.qml index 902cd2e55..b0a53270f 100644 --- a/quickshell/Modals/Settings/SettingsContent.qml +++ b/quickshell/Modals/Settings/SettingsContent.qml @@ -373,9 +373,9 @@ FocusScope { "keybinds": "KeybindsTab.qml", "dankbar_widgets": "WidgetsTab.qml", "window_rules": "WindowRulesTab.qml", - "dankbar_settings": "DankBarTab.qml", - "dankbar_appearance": "DankBarAppearanceTab.qml", - "dankbar_dot": "DankDotTab.qml", + "dankbar_settings": "DBarTab.qml", + "dankbar_appearance": "DBarAppearanceTab.qml", + "dankbar_dot": "DDotTab.qml", "bar_widget": "BarWidgetTab.qml", "compositor_layout": "CompositorLayoutTab.qml", "dock_general": "DockGeneralTab.qml", @@ -419,7 +419,7 @@ FocusScope { "greeter_auth": "GreeterAuthTab.qml", "autostart": "AutoStartTab.qml", "battery": "BatteryTab.qml", - "dank_dash": "DankDashTab.qml", + "dank_dash": "DDashTab.qml", "wellbeing": "DigitalWellbeingTab.qml", "mouse_touchpad": "MouseTouchpadTab.qml", "keyboard": "KeyboardTab.qml", diff --git a/quickshell/Modals/Settings/SettingsModal.qml b/quickshell/Modals/Settings/SettingsModal.qml index 0454f0d68..a41c9dc8c 100644 --- a/quickshell/Modals/Settings/SettingsModal.qml +++ b/quickshell/Modals/Settings/SettingsModal.qml @@ -7,7 +7,7 @@ import qs.DCommon.Widgets import qs.Widgets import qs.Modules.Settings.Widgets -DankFloatingWindow { +DFloatingWindow { id: settingsModal property var profileBrowser: profileBrowserLoader.item diff --git a/quickshell/Modals/SwitchUserModal.qml b/quickshell/Modals/SwitchUserModal.qml index 67ee95d54..08e0f5d65 100644 --- a/quickshell/Modals/SwitchUserModal.qml +++ b/quickshell/Modals/SwitchUserModal.qml @@ -4,7 +4,7 @@ import qs.Modals.Common import qs.Services import qs.DCommon.Widgets -DankModal { +DModal { id: root property bool lockOnSwitch: false diff --git a/quickshell/Modals/SystemUpdateModal.qml b/quickshell/Modals/SystemUpdateModal.qml index 534b1896a..a0a736a17 100644 --- a/quickshell/Modals/SystemUpdateModal.qml +++ b/quickshell/Modals/SystemUpdateModal.qml @@ -6,7 +6,7 @@ import qs.Services import qs.DCommon.Widgets import qs.Widgets -DankFloatingWindow { +DFloatingWindow { id: root function show() { diff --git a/quickshell/Modals/WifiPasswordModal.qml b/quickshell/Modals/WifiPasswordModal.qml index 9160014ba..a02b2fbbb 100644 --- a/quickshell/Modals/WifiPasswordModal.qml +++ b/quickshell/Modals/WifiPasswordModal.qml @@ -5,7 +5,7 @@ import qs.Services import qs.DCommon.Widgets import qs.Widgets -DankModal { +DModal { id: root layerNamespace: "dms:wifi-password" @@ -438,7 +438,7 @@ DankModal { color: Theme.surfaceVariantText } - DankDropdown { + DDropdown { width: parent.width dropdownWidth: parent.width compactMode: true @@ -462,7 +462,7 @@ DankModal { color: Theme.surfaceVariantText } - DankDropdown { + DDropdown { width: parent.width dropdownWidth: parent.width compactMode: true diff --git a/quickshell/Modals/WifiQRCodeModal.qml b/quickshell/Modals/WifiQRCodeModal.qml index 23adbe660..62cf866cf 100644 --- a/quickshell/Modals/WifiQRCodeModal.qml +++ b/quickshell/Modals/WifiQRCodeModal.qml @@ -8,7 +8,7 @@ import qs.Common import qs.Services import qs.DCommon.Widgets -DankModal { +DModal { id: root visible: false layerNamespace: "dms:wifi-qrcode" diff --git a/quickshell/Modals/WindowRuleModal.qml b/quickshell/Modals/WindowRuleModal.qml index ba31244d0..f7f36f06e 100644 --- a/quickshell/Modals/WindowRuleModal.qml +++ b/quickshell/Modals/WindowRuleModal.qml @@ -6,7 +6,7 @@ import qs.Modules.Settings.Widgets import qs.DCommon.Widgets import qs.Widgets -DankFloatingWindow { +DFloatingWindow { id: root signal ruleSubmitted diff --git a/quickshell/Modals/WorkspaceRenameModal.qml b/quickshell/Modals/WorkspaceRenameModal.qml index 87ae1f7ae..d5781ed28 100644 --- a/quickshell/Modals/WorkspaceRenameModal.qml +++ b/quickshell/Modals/WorkspaceRenameModal.qml @@ -4,7 +4,7 @@ import qs.Services import qs.DCommon.Widgets import qs.Widgets -DankFloatingWindow { +DFloatingWindow { id: root readonly property var log: Log.scoped("WorkspaceRenameModal") diff --git a/quickshell/Modules/AppDrawer/AppDrawerPopout.qml b/quickshell/Modules/AppDrawer/AppDrawerPopout.qml index 3190c6dd4..fea1df773 100644 --- a/quickshell/Modules/AppDrawer/AppDrawerPopout.qml +++ b/quickshell/Modules/AppDrawer/AppDrawerPopout.qml @@ -1,9 +1,9 @@ import QtQuick import qs.Common -import qs.Modals.DankLauncherV2 +import qs.Modals.DLauncherV2 import qs.Widgets -DankPopout { +DPopout { id: appDrawerPopout layerNamespace: "dms:app-launcher" diff --git a/quickshell/Modules/BlurredWallpaperBackground.qml b/quickshell/Modules/BlurredWallpaperBackground.qml index 4bafb132f..d4eafa3eb 100644 --- a/quickshell/Modules/BlurredWallpaperBackground.qml +++ b/quickshell/Modules/BlurredWallpaperBackground.qml @@ -237,7 +237,7 @@ Variants { } } - // Theme changes repaint DankBackdrop but nothing else wakes the render loop + // Theme changes repaint DBackdrop but nothing else wakes the render loop readonly property color themePrimary: Theme.primary readonly property color themeBackground: Theme.background readonly property bool idleShellLocked: IdleService.isShellLocked @@ -280,7 +280,7 @@ Variants { active: root.showsBackdrop asynchronous: true - sourceComponent: DankBackdrop { + sourceComponent: DBackdrop { screenName: modelData.name blur: Theme.wallpaperBlur onInvalidated: root.invalidate() diff --git a/quickshell/Modules/ControlCenter/BuiltinPlugins/CupsWidget.qml b/quickshell/Modules/ControlCenter/BuiltinPlugins/CupsWidget.qml index 9319cb211..9f4bd11aa 100644 --- a/quickshell/Modules/ControlCenter/BuiltinPlugins/CupsWidget.qml +++ b/quickshell/Modules/ControlCenter/BuiltinPlugins/CupsWidget.qml @@ -65,7 +65,7 @@ PluginComponent { title: I18n.tr("Printers") subtitle: CupsService.getCurrentPrinterStatePrettyShort() - DankDropdown { + DDropdown { anchors.verticalCenter: parent.verticalCenter compactMode: true dropdownWidth: CcMetrics.rowDropdownWidth diff --git a/quickshell/Modules/ControlCenter/BuiltinPlugins/TailscaleWidget.qml b/quickshell/Modules/ControlCenter/BuiltinPlugins/TailscaleWidget.qml index ac9ac36c7..3ba59a14e 100644 --- a/quickshell/Modules/ControlCenter/BuiltinPlugins/TailscaleWidget.qml +++ b/quickshell/Modules/ControlCenter/BuiltinPlugins/TailscaleWidget.qml @@ -117,7 +117,7 @@ PluginComponent { iconName: "alt_route" title: I18n.tr("Exit node", "Tailscale exit node selector label") - DankDropdown { + DDropdown { anchors.verticalCenter: parent.verticalCenter compactMode: true dropdownWidth: CcMetrics.rowDropdownWidth diff --git a/quickshell/Modules/ControlCenter/Components/CcEditChrome.qml b/quickshell/Modules/ControlCenter/Components/CcEditChrome.qml index a6ef5da71..384ef1f21 100644 --- a/quickshell/Modules/ControlCenter/Components/CcEditChrome.qml +++ b/quickshell/Modules/ControlCenter/Components/CcEditChrome.qml @@ -4,7 +4,7 @@ import qs.Widgets import "../utils/widgets.js" as WidgetUtils import qs.Modules.ControlCenter -DankGridEditChrome { +DGridEditChrome { id: root property var widgetData: ({}) diff --git a/quickshell/Modules/ControlCenter/Components/CcTileGrid.qml b/quickshell/Modules/ControlCenter/Components/CcTileGrid.qml index a40d0311a..49783dc3a 100644 --- a/quickshell/Modules/ControlCenter/Components/CcTileGrid.qml +++ b/quickshell/Modules/ControlCenter/Components/CcTileGrid.qml @@ -7,7 +7,7 @@ import qs.Modules.ControlCenter import "../utils/widgets.js" as WidgetUtils import "../../../Common/GridLayout.js" as GridUtils -DankEditableGrid { +DEditableGrid { id: root property var model: null diff --git a/quickshell/Modules/ControlCenter/Components/CcTileSlot.qml b/quickshell/Modules/ControlCenter/Components/CcTileSlot.qml index 20df5bd2e..a0ccf6e77 100644 --- a/quickshell/Modules/ControlCenter/Components/CcTileSlot.qml +++ b/quickshell/Modules/ControlCenter/Components/CcTileSlot.qml @@ -5,7 +5,7 @@ import qs.Modules.ControlCenter import "../utils/widgets.js" as WidgetUtils import "../../../Common/GridLayout.js" as GridUtils -DankEditableGridSlot { +DEditableGridSlot { id: root readonly property var widgetData: JSON.parse(json) diff --git a/quickshell/Modules/ControlCenter/Components/WidgetConfigOverlay.qml b/quickshell/Modules/ControlCenter/Components/WidgetConfigOverlay.qml index 16c5663cb..fe89f64c9 100644 --- a/quickshell/Modules/ControlCenter/Components/WidgetConfigOverlay.qml +++ b/quickshell/Modules/ControlCenter/Components/WidgetConfigOverlay.qml @@ -5,11 +5,12 @@ import Quickshell import qs.Common import qs.Modules.ControlCenter import qs.Modules.ControlCenter.Widgets -import qs.Modules.DankBar.Widgets -import qs.Modules.DankDash +import qs.Modules.DBar.Widgets +import qs.Modules.DDash import "../utils/widgets.js" as WidgetUtils import "../../../Common/QmlUtils.js" as QmlUtils import qs.Services +import qs.DCommon.Widgets import qs.Widgets Item { @@ -69,7 +70,7 @@ Item { WidgetUtils.setOption(widgetIndex, key, value); } - DankContextMenu { + DContextMenu { id: contextMenu layerNamespace: "dms:control-center-widget-options" minMenuWidth: CcMetrics.configMenuWidth @@ -129,7 +130,7 @@ Item { visible: root.isIdleInhibitor iconName: "timer" title: I18n.tr("Duration") - body: DankDropdown { + body: DDropdown { readonly property var presets: IdleInhibitPresets.presetOptions compactMode: true diff --git a/quickshell/Modules/ControlCenter/ControlCenterContent.qml b/quickshell/Modules/ControlCenter/ControlCenterContent.qml index cdff16e5e..730520056 100644 --- a/quickshell/Modules/ControlCenter/ControlCenterContent.qml +++ b/quickshell/Modules/ControlCenter/ControlCenterContent.qml @@ -57,7 +57,7 @@ FocusScope { readonly property int gridColumns: host.gridColumns ?? Math.min(CcMetrics.gridColumns, gridColumnCap) readonly property real availableGridHeight: (host.availableHeight ?? (host.triggerScreen?.height ?? CcMetrics.fallbackScreenHeight) - CcMetrics.maxHeightInset) - CcMetrics.sheetPadding * 2 - chromeHeight readonly property vector4d chromeRoom: host.chromeRoom ?? Qt.vector4d(Infinity, Infinity, Infinity, Infinity) - readonly property DankPanelResizer panelResizer: DankPanelResizer { + readonly property DPanelResizer panelResizer: DPanelResizer { popout: root.host stepWidth: CcMetrics.columnWidth + CcMetrics.gridGap widthFor: columns => CcMetrics.sheetWidthFor(columns) + root.sheetContentWidth - CcMetrics.sheetWidthFor(root.gridColumns) @@ -316,7 +316,7 @@ FocusScope { forceActiveFocus(); } - DankGridEditChrome { + DGridEditChrome { id: panelChrome readonly property real screenWidth: root.host.triggerScreen?.width ?? Infinity diff --git a/quickshell/Modules/ControlCenter/ControlCenterPopout.qml b/quickshell/Modules/ControlCenter/ControlCenterPopout.qml index 39f7322de..92c4ad7b4 100644 --- a/quickshell/Modules/ControlCenter/ControlCenterPopout.qml +++ b/quickshell/Modules/ControlCenter/ControlCenterPopout.qml @@ -4,7 +4,7 @@ import qs.Common import qs.Services import qs.Widgets -DankPopout { +DPopout { id: root layerNamespace: "dms:control-center" diff --git a/quickshell/Modules/ControlCenter/Details/BatteryDetail.qml b/quickshell/Modules/ControlCenter/Details/BatteryDetail.qml index 35902e91b..9611e56cd 100644 --- a/quickshell/Modules/ControlCenter/Details/BatteryDetail.qml +++ b/quickshell/Modules/ControlCenter/Details/BatteryDetail.qml @@ -1,6 +1,6 @@ import QtQuick import qs.Common -import qs.Modules.DankBar.Popouts +import qs.Modules.DBar.Popouts import qs.Services BatteryPopoutContent { diff --git a/quickshell/Modules/ControlCenter/Details/BluetoothDetail.qml b/quickshell/Modules/ControlCenter/Details/BluetoothDetail.qml index b618c2b5c..fd992e769 100644 --- a/quickshell/Modules/ControlCenter/Details/BluetoothDetail.qml +++ b/quickshell/Modules/ControlCenter/Details/BluetoothDetail.qml @@ -31,7 +31,7 @@ Item { readonly property Item headerActions: Row { spacing: Theme.spacingS - DankDropdown { + DDropdown { id: adapterDropdown function adapterLabel(adapter) { diff --git a/quickshell/Modules/ControlCenter/Details/NetworkDetail.qml b/quickshell/Modules/ControlCenter/Details/NetworkDetail.qml index 226102475..e1dad712f 100644 --- a/quickshell/Modules/ControlCenter/Details/NetworkDetail.qml +++ b/quickshell/Modules/ControlCenter/Details/NetworkDetail.qml @@ -83,7 +83,7 @@ Item { readonly property Item headerActions: Row { spacing: Theme.spacingS - DankDropdown { + DDropdown { anchors.verticalCenter: parent.verticalCenter visible: root.wifiMode && (NetworkService.wifiDevices?.length ?? 0) > 1 compactMode: true diff --git a/quickshell/Modules/ControlCenter/Widgets/CcMenu.qml b/quickshell/Modules/ControlCenter/Widgets/CcMenu.qml index f6e535a0b..b4d65bbe3 100644 --- a/quickshell/Modules/ControlCenter/Widgets/CcMenu.qml +++ b/quickshell/Modules/ControlCenter/Widgets/CcMenu.qml @@ -30,8 +30,7 @@ Item { const y = pos.y; const menuX = I18n.isRtl ? x : x + anchor.width - menu.effectiveMenuWidth; const below = y + anchor.height + Theme.spacingXS; - const menuY = below + menu.effectiveMenuHeight > screen.height - Theme.spacingS - ? y - menu.effectiveMenuHeight - Theme.spacingXS : below; + const menuY = below + menu.effectiveMenuHeight > screen.height - Theme.spacingS ? y - menu.effectiveMenuHeight - Theme.spacingXS : below; menu.open(screen, menuX, menuY, false); } @@ -39,24 +38,24 @@ Item { menu.hide(); } - DankContextMenu { + DContextMenu { id: menu layerNamespace: "dms:control-center-menu" minMenuWidth: CcMetrics.menuMinWidth keyboardNavigable: true transientSurfaceTracker: root.transientSurfaceTracker menuItems: root.visibleItems.map(item => ({ - type: "item", - icon: item.iconName || "", - text: item.label || "", - enabled: item.enabled !== false, - isDestructive: item.destructive === true, - action: () => { - menu.hide(); - if (typeof item.action === "function") - item.action(); - } - })) + type: "item", + icon: item.iconName || "", + text: item.label || "", + enabled: item.enabled !== false, + isDestructive: item.destructive === true, + action: () => { + menu.hide(); + if (typeof item.action === "function") + item.action(); + } + })) onOpenStateChanged: { if (openState) diff --git a/quickshell/Modules/ControlCenter/Widgets/UserTile.qml b/quickshell/Modules/ControlCenter/Widgets/UserTile.qml index 38ba07b61..50b92ddd9 100644 --- a/quickshell/Modules/ControlCenter/Widgets/UserTile.qml +++ b/quickshell/Modules/ControlCenter/Widgets/UserTile.qml @@ -2,7 +2,7 @@ import QtQuick import QtQuick.Effects import qs.Common import qs.Modules.ControlCenter -import qs.Modules.DankDash +import qs.Modules.DDash import qs.Services import qs.DCommon.Widgets import qs.Widgets diff --git a/quickshell/Modules/DankBar/AxisContext.qml b/quickshell/Modules/DBar/AxisContext.qml similarity index 53% rename from quickshell/Modules/DankBar/AxisContext.qml rename to quickshell/Modules/DBar/AxisContext.qml index 8a8fe97c0..933921558 100644 --- a/quickshell/Modules/DankBar/AxisContext.qml +++ b/quickshell/Modules/DBar/AxisContext.qml @@ -10,48 +10,52 @@ QtObject { readonly property bool isHorizontal: !isVertical function primarySize(item) { - return isVertical ? item.height : item.width + return isVertical ? item.height : item.width; } function crossSize(item) { - return isVertical ? item.width : item.height + return isVertical ? item.width : item.height; } function setPrimaryPos(item, value) { if (isVertical) { - item.y = value + item.y = value; } else { - item.x = value + item.x = value; } } function getPrimaryPos(item) { - return isVertical ? item.y : item.x + return isVertical ? item.y : item.x; } function primaryAnchor(anchors) { - return isVertical ? anchors.verticalCenter : anchors.horizontalCenter + return isVertical ? anchors.verticalCenter : anchors.horizontalCenter; } function crossAnchor(anchors) { - return isVertical ? anchors.horizontalCenter : anchors.verticalCenter + return isVertical ? anchors.horizontalCenter : anchors.verticalCenter; } function outerVisualEdge() { - if (edge === "bottom") return "bottom" - if (edge === "left") return "right" - if (edge === "right") return "left" - if (edge === "top") return "top" - return "bottom" + if (edge === "bottom") + return "bottom"; + if (edge === "left") + return "right"; + if (edge === "right") + return "left"; + if (edge === "top") + return "top"; + return "bottom"; } - signal axisEdgeChanged() - signal axisOrientationChanged() - signal changed() // Single coalesced signal + signal axisEdgeChanged + signal axisOrientationChanged + signal changed // Single coalesced signal onEdgeChanged: { - axisEdgeChanged() - axisOrientationChanged() - changed() + axisEdgeChanged(); + axisOrientationChanged(); + changed(); } } diff --git a/quickshell/Modules/DankBar/BarMetrics.qml b/quickshell/Modules/DBar/BarMetrics.qml similarity index 100% rename from quickshell/Modules/DankBar/BarMetrics.qml rename to quickshell/Modules/DBar/BarMetrics.qml diff --git a/quickshell/Modules/DankBar/BarOutline.js b/quickshell/Modules/DBar/BarOutline.js similarity index 100% rename from quickshell/Modules/DankBar/BarOutline.js rename to quickshell/Modules/DBar/BarOutline.js diff --git a/quickshell/Modules/DankBar/BarPillSurface.qml b/quickshell/Modules/DBar/BarPillSurface.qml similarity index 100% rename from quickshell/Modules/DankBar/BarPillSurface.qml rename to quickshell/Modules/DBar/BarPillSurface.qml diff --git a/quickshell/Modules/DankBar/BarScrollArea.qml b/quickshell/Modules/DBar/BarScrollArea.qml similarity index 100% rename from quickshell/Modules/DankBar/BarScrollArea.qml rename to quickshell/Modules/DBar/BarScrollArea.qml diff --git a/quickshell/Modules/DankBar/BarSection.qml b/quickshell/Modules/DBar/BarSection.qml similarity index 93% rename from quickshell/Modules/DankBar/BarSection.qml rename to quickshell/Modules/DBar/BarSection.qml index c78e6153f..66998c972 100644 --- a/quickshell/Modules/DankBar/BarSection.qml +++ b/quickshell/Modules/DBar/BarSection.qml @@ -42,7 +42,10 @@ Item { const entries = []; for (let index = 0; index < (entryRepeater?.count ?? 0); index++) { const wrapper = entryRepeater.itemAt(index); - entries.push({ size: wrapper?.primarySize ?? 0, mode: wrapper?.overflowMode ?? "bar" }); + entries.push({ + size: wrapper?.primarySize ?? 0, + mode: wrapper?.overflowMode ?? "bar" + }); } return entries; } @@ -74,8 +77,12 @@ Item { Connections { target: root.entryRepeater - function onItemAdded(index, item) { root.entryRevision++; } - function onItemRemoved(index, item) { root.entryRevision++; } + function onItemAdded(index, item) { + root.entryRevision++; + } + function onItemRemoved(index, item) { + root.entryRevision++; + } } onLayoutEntriesChanged: requestOverflowLayout() @@ -137,7 +144,9 @@ Item { const allEntries = entries.slice(); const allStates = participating.slice(); if (overflowCount > 0) { - allEntries.splice(overflowPosition, 0, { widgetId: "overflow" }); + allEntries.splice(overflowPosition, 0, { + widgetId: "overflow" + }); allStates.splice(overflowPosition, 0, true); } const next = SegmentRoles.resolve(allEntries, allStates); diff --git a/quickshell/Modules/DankBar/BarSegment.qml b/quickshell/Modules/DBar/BarSegment.qml similarity index 100% rename from quickshell/Modules/DankBar/BarSegment.qml rename to quickshell/Modules/DBar/BarSegment.qml diff --git a/quickshell/Modules/DankBar/BarSurface.qml b/quickshell/Modules/DBar/BarSurface.qml similarity index 100% rename from quickshell/Modules/DankBar/BarSurface.qml rename to quickshell/Modules/DBar/BarSurface.qml diff --git a/quickshell/Modules/DankBar/CenterLayout.js b/quickshell/Modules/DBar/CenterLayout.js similarity index 100% rename from quickshell/Modules/DankBar/CenterLayout.js rename to quickshell/Modules/DBar/CenterLayout.js diff --git a/quickshell/Modules/DankBar/CenterSection.qml b/quickshell/Modules/DBar/CenterSection.qml similarity index 100% rename from quickshell/Modules/DankBar/CenterSection.qml rename to quickshell/Modules/DBar/CenterSection.qml diff --git a/quickshell/Modules/DankBar/DankBar.qml b/quickshell/Modules/DBar/DBar.qml similarity index 98% rename from quickshell/Modules/DankBar/DankBar.qml rename to quickshell/Modules/DBar/DBar.qml index 09dc39a14..a0d5ca40e 100644 --- a/quickshell/Modules/DankBar/DankBar.qml +++ b/quickshell/Modules/DBar/DBar.qml @@ -81,7 +81,7 @@ Item { id: barVariants model: ShellLayout.hostedScreens(root.barConfig?.id) - delegate: DankBarWindow { + delegate: DBarWindow { rootWindow: root barConfig: root.barConfig leftWidgetsModel: root.leftWidgetsModel diff --git a/quickshell/Modules/DankBar/DankBarBody.qml b/quickshell/Modules/DBar/DBarBody.qml similarity index 99% rename from quickshell/Modules/DankBar/DankBarBody.qml rename to quickshell/Modules/DBar/DBarBody.qml index f6c0a429d..6fab4c875 100644 --- a/quickshell/Modules/DankBar/DankBarBody.qml +++ b/quickshell/Modules/DBar/DBarBody.qml @@ -1,13 +1,13 @@ import QtQuick import Quickshell import qs.Common -import qs.Modules.DankIsland +import qs.Modules.DIsland import qs.Services import qs.Widgets Item { id: barWindow - readonly property var log: Log.scoped("DankBarBody") + readonly property var log: Log.scoped("DBarBody") required property var hostWindow required property var rootWindow @@ -1083,7 +1083,7 @@ Item { onWorkspaceSwitchRequested: direction => topBarContent.switchWorkspace(direction) } - DankBarContent { + DBarContent { id: topBarContent barWindow: barWindow rootWindow: barWindow.rootWindow diff --git a/quickshell/Modules/DankBar/DankBarContent.qml b/quickshell/Modules/DBar/DBarContent.qml similarity index 98% rename from quickshell/Modules/DankBar/DankBarContent.qml rename to quickshell/Modules/DBar/DBarContent.qml index 2ac5c3516..4f4fb714e 100644 --- a/quickshell/Modules/DankBar/DankBarContent.qml +++ b/quickshell/Modules/DBar/DBarContent.qml @@ -1,6 +1,6 @@ import QtQuick import qs.Common -import qs.Modules.DankBar.Widgets +import qs.Modules.DBar.Widgets import qs.Modules.SurfaceWidgets import qs.Services import "OverflowLayout.js" as OverflowLayout @@ -32,7 +32,14 @@ Item { readonly property real fittedLeadingReach: leadingImplicitSize > 0 ? leadingImplicitSize + sectionGap : 0 readonly property real fittedTrailingReach: trailingImplicitSize > 0 ? trailingImplicitSize + sectionGap : 0 readonly property var fittedCenterSection: _barIsVertical ? vCenterSection : hCenterSection - property var overflowPlan: ({ hidden: { left: [], center: [], right: [] }, fits: true }) + property var overflowPlan: ({ + hidden: { + left: [], + center: [], + right: [] + }, + fits: true + }) readonly property var overflowSections: _barIsVertical ? [vLeftSection, vCenterSection, vRightSection] : [hLeftSection, hCenterSection, hRightSection] readonly property real overflowLength: fitToWidgets ? barWindow.fittedAvailableLength : (_barIsVertical ? height : width) readonly property string overflowCenteringMode: SettingsData.centeringMode @@ -70,7 +77,10 @@ Item { confineCenter: fitToWidgets, restoreMargin: Theme.spacingS }, overflowPlan.hidden); - const next = { hidden: result.hidden, fits: result.fits }; + const next = { + hidden: result.hidden, + fits: result.fits + }; if (JSON.stringify(next) !== JSON.stringify(overflowPlan)) overflowPlan = next; } @@ -351,7 +361,7 @@ Item { return "left"; } - DankBarHoverController { + DBarHoverController { id: hoverController barContent: topBarContent barWindow: topBarContent.barWindow diff --git a/quickshell/Modules/DankBar/DankBarHoverController.qml b/quickshell/Modules/DBar/DBarHoverController.qml similarity index 100% rename from quickshell/Modules/DankBar/DankBarHoverController.qml rename to quickshell/Modules/DBar/DBarHoverController.qml diff --git a/quickshell/Modules/DankBar/DankBarWindow.qml b/quickshell/Modules/DBar/DBarWindow.qml similarity index 98% rename from quickshell/Modules/DankBar/DankBarWindow.qml rename to quickshell/Modules/DBar/DBarWindow.qml index 98ac40eb3..a62f17726 100644 --- a/quickshell/Modules/DankBar/DankBarWindow.qml +++ b/quickshell/Modules/DBar/DBarWindow.qml @@ -2,13 +2,13 @@ import QtQuick import Quickshell import Quickshell.Wayland import qs.Common -import qs.Modules.DankIsland +import qs.Modules.DIsland import qs.Services import qs.Widgets PanelWindow { id: barWindow - readonly property var log: Log.scoped("DankBarWindow") + readonly property var log: Log.scoped("DBarWindow") required property var rootWindow required property var barConfig @@ -157,7 +157,7 @@ PanelWindow { } } - DankBarBody { + DBarBody { id: body anchors.fill: parent hostWindow: barWindow diff --git a/quickshell/Modules/DankBar/LeftSection.qml b/quickshell/Modules/DBar/LeftSection.qml similarity index 100% rename from quickshell/Modules/DankBar/LeftSection.qml rename to quickshell/Modules/DBar/LeftSection.qml diff --git a/quickshell/Modules/DankBar/OverflowLayout.js b/quickshell/Modules/DBar/OverflowLayout.js similarity index 81% rename from quickshell/Modules/DankBar/OverflowLayout.js rename to quickshell/Modules/DBar/OverflowLayout.js index 3f3bde3e4..7149cbb14 100644 --- a/quickshell/Modules/DankBar/OverflowLayout.js +++ b/quickshell/Modules/DBar/OverflowLayout.js @@ -56,16 +56,26 @@ function section(entries, hidden, spacing, triggerSize, triggerIndex) { positions[indices[index]] = position; } const middle = Math.floor(entries.length / 2); - const anchor = { count: entries.length, middle: indices.indexOf(middle), previous: indices.indexOf(middle - 1) }; - return { sizes, indices, positions, buttonPosition, totalSize: layout.totalSize, anchor }; + const anchor = { + count: entries.length, + middle: indices.indexOf(middle), + previous: indices.indexOf(middle - 1) + }; + return { + sizes, + indices, + positions, + buttonPosition, + totalSize: layout.totalSize, + anchor + }; } function measure(sections, hidden, options) { const names = ["left", "center", "right"]; const layouts = {}; for (const name of names) { - layouts[name] = section(sections[name], hidden[name], options.spacing, options.triggerSize, - options.positions?.[name] ?? defaultPosition(name, sections[name].length)); + layouts[name] = section(sections[name], hidden[name], options.spacing, options.triggerSize, options.positions?.[name] ?? defaultPosition(name, sections[name].length)); } const min = options.start ?? 0; const max = options.length - (options.end ?? 0); @@ -81,9 +91,21 @@ function measure(sections, hidden, options) { const livePositions = centered.positions.filter(position => position !== null); const centerStart = livePositions.length ? Math.min(...livePositions) : 0; const intervals = { - left: { start: min, end: min + leading, size: leading }, - center: { start: centerStart, end: centerStart + centered.totalSize, size: centered.totalSize }, - right: { start: max - trailing, end: max, size: trailing } + left: { + start: min, + end: min + leading, + size: leading + }, + center: { + start: centerStart, + end: centerStart + centered.totalSize, + size: centered.totalSize + }, + right: { + start: max - trailing, + end: max, + size: trailing + } }; const collisions = new Set(); for (const name of names) { @@ -102,7 +124,12 @@ function measure(sections, hidden, options) { } } } - return { fits: collisions.size === 0, collisions: [...collisions], layouts, intervals }; + return { + fits: collisions.size === 0, + collisions: [...collisions], + layouts, + intervals + }; } function resolve(sections, options, previous = {}) { @@ -132,7 +159,10 @@ function resolve(sections, options, previous = {}) { } eligible.sort((a, b) => Math.abs(a + 0.5 - position) - Math.abs(b + 0.5 - position)); if (eligible.length) { - candidate = { name, index: eligible[0] }; + candidate = { + name, + index: eligible[0] + }; break; } } @@ -153,16 +183,24 @@ function resolve(sections, options, previous = {}) { for (const index of previous[name] ?? []) { if (sections[name][index]?.size > 0 && sections[name][index].mode === "auto" && !hidden[name].includes(index)) { hidden[name].push(index); - restoring.push({ name, index }); + restoring.push({ + name, + index + }); } } } - for (const { name, index } of restoring) { + for (const { + name, + index + } of restoring) { const trial = {}; for (const key of names) trial[key] = hidden[key].filter(value => key !== name || value !== index); const padded = Object.assign({}, sections, { - [name]: sections[name].map((entry, entryIndex) => entryIndex === index ? Object.assign({}, entry, { size: entry.size + (options.restoreMargin ?? 0) }) : entry) + [name]: sections[name].map((entry, entryIndex) => entryIndex === index ? Object.assign({}, entry, { + size: entry.size + (options.restoreMargin ?? 0) + }) : entry) }); if (measure(padded, trial, options).fits) hidden[name] = trial[name]; @@ -170,5 +208,7 @@ function resolve(sections, options, previous = {}) { const result = freshFits && !measure(sections, hidden, options).fits ? fresh : hidden; for (const name of names) result[name].sort((a, b) => a - b); - return Object.assign({ hidden: result }, measure(sections, result, options)); + return Object.assign({ + hidden: result + }, measure(sections, result, options)); } diff --git a/quickshell/Modules/DankBar/Popouts/BatteryHistory.js b/quickshell/Modules/DBar/Popouts/BatteryHistory.js similarity index 100% rename from quickshell/Modules/DankBar/Popouts/BatteryHistory.js rename to quickshell/Modules/DBar/Popouts/BatteryHistory.js diff --git a/quickshell/Modules/DankBar/Popouts/BatteryHistory.qml b/quickshell/Modules/DBar/Popouts/BatteryHistory.qml similarity index 100% rename from quickshell/Modules/DankBar/Popouts/BatteryHistory.qml rename to quickshell/Modules/DBar/Popouts/BatteryHistory.qml diff --git a/quickshell/Modules/DankBar/Popouts/BatteryHistoryChart.qml b/quickshell/Modules/DBar/Popouts/BatteryHistoryChart.qml similarity index 100% rename from quickshell/Modules/DankBar/Popouts/BatteryHistoryChart.qml rename to quickshell/Modules/DBar/Popouts/BatteryHistoryChart.qml diff --git a/quickshell/Modules/DankBar/Popouts/BatteryPopout.qml b/quickshell/Modules/DBar/Popouts/BatteryPopout.qml similarity index 98% rename from quickshell/Modules/DankBar/Popouts/BatteryPopout.qml rename to quickshell/Modules/DBar/Popouts/BatteryPopout.qml index 8226093f1..a177853c4 100644 --- a/quickshell/Modules/DankBar/Popouts/BatteryPopout.qml +++ b/quickshell/Modules/DBar/Popouts/BatteryPopout.qml @@ -3,7 +3,7 @@ import QtQuick.Window import qs.Common import qs.Widgets -DankPopout { +DPopout { id: root layerNamespace: "dms:battery" diff --git a/quickshell/Modules/DankBar/Popouts/BatteryPopoutContent.qml b/quickshell/Modules/DBar/Popouts/BatteryPopoutContent.qml similarity index 100% rename from quickshell/Modules/DankBar/Popouts/BatteryPopoutContent.qml rename to quickshell/Modules/DBar/Popouts/BatteryPopoutContent.qml diff --git a/quickshell/Modules/DankBar/Popouts/ColorPickerPopout.qml b/quickshell/Modules/DBar/Popouts/ColorPickerPopout.qml similarity index 98% rename from quickshell/Modules/DankBar/Popouts/ColorPickerPopout.qml rename to quickshell/Modules/DBar/Popouts/ColorPickerPopout.qml index 3bc0c4c2d..fdea18a55 100644 --- a/quickshell/Modules/DankBar/Popouts/ColorPickerPopout.qml +++ b/quickshell/Modules/DBar/Popouts/ColorPickerPopout.qml @@ -3,7 +3,7 @@ import qs.Common import qs.Modules.ColorPicker import qs.Widgets -DankPopout { +DPopout { id: root layerNamespace: "dms:color-picker" diff --git a/quickshell/Modules/DankBar/Popouts/DWLLayoutPopout.qml b/quickshell/Modules/DBar/Popouts/DWLLayoutPopout.qml similarity index 99% rename from quickshell/Modules/DankBar/Popouts/DWLLayoutPopout.qml rename to quickshell/Modules/DBar/Popouts/DWLLayoutPopout.qml index c0e8a086a..32ad53675 100644 --- a/quickshell/Modules/DankBar/Popouts/DWLLayoutPopout.qml +++ b/quickshell/Modules/DBar/Popouts/DWLLayoutPopout.qml @@ -1,11 +1,11 @@ import QtQuick import qs.Common -import qs.Modules.DankBar +import qs.Modules.DBar import qs.Services import qs.DCommon.Widgets import qs.Widgets -DankPopout { +DPopout { id: root layerNamespace: "dms:layout" diff --git a/quickshell/Modules/DankBar/Popouts/DurationPopout.qml b/quickshell/Modules/DBar/Popouts/DurationPopout.qml similarity index 99% rename from quickshell/Modules/DankBar/Popouts/DurationPopout.qml rename to quickshell/Modules/DBar/Popouts/DurationPopout.qml index 1fbb25c24..ae5383b60 100644 --- a/quickshell/Modules/DankBar/Popouts/DurationPopout.qml +++ b/quickshell/Modules/DBar/Popouts/DurationPopout.qml @@ -1,11 +1,11 @@ import QtQuick import qs.Common -import qs.Modules.DankBar.Widgets +import qs.Modules.DBar.Widgets import qs.Modules.Notifications import qs.DCommon.Widgets import qs.Widgets -DankPopout { +DPopout { id: root property var triggerScreen: null diff --git a/quickshell/Modules/DankBar/Popouts/PowerMenuPopout.qml b/quickshell/Modules/DBar/Popouts/PowerMenuPopout.qml similarity index 98% rename from quickshell/Modules/DankBar/Popouts/PowerMenuPopout.qml rename to quickshell/Modules/DBar/Popouts/PowerMenuPopout.qml index cf50837b1..ae2c9f31d 100644 --- a/quickshell/Modules/DankBar/Popouts/PowerMenuPopout.qml +++ b/quickshell/Modules/DBar/Popouts/PowerMenuPopout.qml @@ -3,7 +3,7 @@ import qs.Common import qs.Modules.PowerMenu import qs.Widgets -DankPopout { +DPopout { id: root signal powerActionRequested(string action) diff --git a/quickshell/Modules/DankBar/Popouts/SystemUpdatePopout.qml b/quickshell/Modules/DBar/Popouts/SystemUpdatePopout.qml similarity index 99% rename from quickshell/Modules/DankBar/Popouts/SystemUpdatePopout.qml rename to quickshell/Modules/DBar/Popouts/SystemUpdatePopout.qml index 99a3ca138..defed76b6 100644 --- a/quickshell/Modules/DankBar/Popouts/SystemUpdatePopout.qml +++ b/quickshell/Modules/DBar/Popouts/SystemUpdatePopout.qml @@ -6,7 +6,7 @@ import qs.Modules.SystemUpdate import qs.Services import qs.Widgets -DankPopout { +DPopout { id: systemUpdatePopout layerNamespace: "dms:system-update" diff --git a/quickshell/Modules/DankBar/Popouts/VpnPopout.qml b/quickshell/Modules/DBar/Popouts/VpnPopout.qml similarity index 99% rename from quickshell/Modules/DankBar/Popouts/VpnPopout.qml rename to quickshell/Modules/DBar/Popouts/VpnPopout.qml index d58cd6308..8701b02f3 100644 --- a/quickshell/Modules/DankBar/Popouts/VpnPopout.qml +++ b/quickshell/Modules/DBar/Popouts/VpnPopout.qml @@ -5,7 +5,7 @@ import qs.Widgets import qs.Modules.ControlCenter import qs.Modules.ControlCenter.Details -DankPopout { +DPopout { id: root layerNamespace: "dms:vpn" diff --git a/quickshell/Modules/DankBar/RightSection.qml b/quickshell/Modules/DBar/RightSection.qml similarity index 100% rename from quickshell/Modules/DankBar/RightSection.qml rename to quickshell/Modules/DBar/RightSection.qml diff --git a/quickshell/Modules/DankBar/SectionEntry.qml b/quickshell/Modules/DBar/SectionEntry.qml similarity index 100% rename from quickshell/Modules/DankBar/SectionEntry.qml rename to quickshell/Modules/DBar/SectionEntry.qml diff --git a/quickshell/Modules/DankBar/SectionOverflow.qml b/quickshell/Modules/DBar/SectionOverflow.qml similarity index 99% rename from quickshell/Modules/DankBar/SectionOverflow.qml rename to quickshell/Modules/DBar/SectionOverflow.qml index 777589994..c61d7d3e2 100644 --- a/quickshell/Modules/DankBar/SectionOverflow.qml +++ b/quickshell/Modules/DBar/SectionOverflow.qml @@ -112,7 +112,7 @@ Item { active: root.wantOpen onLoaded: root.showPopout() sourceComponent: Component { - DankPopout { + DPopout { layerNamespace: "dms:bar-overflow" screen: root.sectionContext.parentScreen popupWidth: root.popupWidth diff --git a/quickshell/Modules/DankBar/SectionSurface.qml b/quickshell/Modules/DBar/SectionSurface.qml similarity index 100% rename from quickshell/Modules/DankBar/SectionSurface.qml rename to quickshell/Modules/DBar/SectionSurface.qml diff --git a/quickshell/Modules/DankBar/SectionWidget.qml b/quickshell/Modules/DBar/SectionWidget.qml similarity index 100% rename from quickshell/Modules/DankBar/SectionWidget.qml rename to quickshell/Modules/DBar/SectionWidget.qml diff --git a/quickshell/Modules/DankBar/SegmentRoles.js b/quickshell/Modules/DBar/SegmentRoles.js similarity index 100% rename from quickshell/Modules/DankBar/SegmentRoles.js rename to quickshell/Modules/DBar/SegmentRoles.js diff --git a/quickshell/Modules/DankBar/SideSection.qml b/quickshell/Modules/DBar/SideSection.qml similarity index 100% rename from quickshell/Modules/DankBar/SideSection.qml rename to quickshell/Modules/DBar/SideSection.qml diff --git a/quickshell/Modules/DankBar/WidgetModel.js b/quickshell/Modules/DBar/WidgetModel.js similarity index 93% rename from quickshell/Modules/DankBar/WidgetModel.js rename to quickshell/Modules/DBar/WidgetModel.js index c6d1b6e62..0638d1acd 100644 --- a/quickshell/Modules/DankBar/WidgetModel.js +++ b/quickshell/Modules/DBar/WidgetModel.js @@ -3,7 +3,11 @@ function normalize(widgets) { return (widgets || []).map((widget, index) => { if (typeof widget === "string") - return { widgetId: widget, id: widget + "_" + index, enabled: true }; + return { + widgetId: widget, + id: widget + "_" + index, + enabled: true + }; const entry = Object.assign({}, widget); entry.widgetId = widget.id || widget.widgetId; diff --git a/quickshell/Modules/DankBar/Widgets/AppsDock.qml b/quickshell/Modules/DBar/Widgets/AppsDock.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/AppsDock.qml rename to quickshell/Modules/DBar/Widgets/AppsDock.qml diff --git a/quickshell/Modules/DankBar/Widgets/AudioVisualization.qml b/quickshell/Modules/DBar/Widgets/AudioVisualization.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/AudioVisualization.qml rename to quickshell/Modules/DBar/Widgets/AudioVisualization.qml diff --git a/quickshell/Modules/DankBar/Widgets/Battery.qml b/quickshell/Modules/DBar/Widgets/Battery.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/Battery.qml rename to quickshell/Modules/DBar/Widgets/Battery.qml diff --git a/quickshell/Modules/DankBar/Widgets/CapsLockIndicator.qml b/quickshell/Modules/DBar/Widgets/CapsLockIndicator.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/CapsLockIndicator.qml rename to quickshell/Modules/DBar/Widgets/CapsLockIndicator.qml diff --git a/quickshell/Modules/DankBar/Widgets/ClipboardButton.qml b/quickshell/Modules/DBar/Widgets/ClipboardButton.qml similarity index 99% rename from quickshell/Modules/DankBar/Widgets/ClipboardButton.qml rename to quickshell/Modules/DBar/Widgets/ClipboardButton.qml index fc46470f3..4b4e6a17f 100644 --- a/quickshell/Modules/DankBar/Widgets/ClipboardButton.qml +++ b/quickshell/Modules/DBar/Widgets/ClipboardButton.qml @@ -132,7 +132,7 @@ BasePill { } } - DankContextMenu { + DContextMenu { id: contextMenu layerNamespace: "dms:clipboard-context-menu" menuItems: [ diff --git a/quickshell/Modules/DankBar/Widgets/Clock.qml b/quickshell/Modules/DBar/Widgets/Clock.qml similarity index 99% rename from quickshell/Modules/DankBar/Widgets/Clock.qml rename to quickshell/Modules/DBar/Widgets/Clock.qml index 0d981518b..9dc2da49a 100644 --- a/quickshell/Modules/DankBar/Widgets/Clock.qml +++ b/quickshell/Modules/DBar/Widgets/Clock.qml @@ -1,6 +1,6 @@ import QtQuick import qs.Common -import qs.Modules.DankBar +import qs.Modules.DBar import qs.Modules.Plugins import qs.DCommon.Widgets import qs.Widgets diff --git a/quickshell/Modules/DankBar/Widgets/ColorPicker.qml b/quickshell/Modules/DBar/Widgets/ColorPicker.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/ColorPicker.qml rename to quickshell/Modules/DBar/Widgets/ColorPicker.qml diff --git a/quickshell/Modules/DankBar/Widgets/ControlCenterButton.qml b/quickshell/Modules/DBar/Widgets/ControlCenterButton.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/ControlCenterButton.qml rename to quickshell/Modules/DBar/Widgets/ControlCenterButton.qml diff --git a/quickshell/Modules/DankBar/Widgets/CpuMonitor.qml b/quickshell/Modules/DBar/Widgets/CpuMonitor.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/CpuMonitor.qml rename to quickshell/Modules/DBar/Widgets/CpuMonitor.qml diff --git a/quickshell/Modules/DankBar/Widgets/CpuTemperature.qml b/quickshell/Modules/DBar/Widgets/CpuTemperature.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/CpuTemperature.qml rename to quickshell/Modules/DBar/Widgets/CpuTemperature.qml diff --git a/quickshell/Modules/DankBar/Widgets/DWLLayout.qml b/quickshell/Modules/DBar/Widgets/DWLLayout.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/DWLLayout.qml rename to quickshell/Modules/DBar/Widgets/DWLLayout.qml diff --git a/quickshell/Modules/DankBar/Widgets/DiskUsage.qml b/quickshell/Modules/DBar/Widgets/DiskUsage.qml similarity index 98% rename from quickshell/Modules/DankBar/Widgets/DiskUsage.qml rename to quickshell/Modules/DBar/Widgets/DiskUsage.qml index 68ddef72c..29e16eba5 100644 --- a/quickshell/Modules/DankBar/Widgets/DiskUsage.qml +++ b/quickshell/Modules/DBar/Widgets/DiskUsage.qml @@ -59,7 +59,7 @@ MonitorPill { Loader { id: tooltipLoader active: false - sourceComponent: DankTooltip {} + sourceComponent: DTooltip {} } MouseArea { diff --git a/quickshell/Modules/DankBar/Widgets/FocusedApp.qml b/quickshell/Modules/DBar/Widgets/FocusedApp.qml similarity index 99% rename from quickshell/Modules/DankBar/Widgets/FocusedApp.qml rename to quickshell/Modules/DBar/Widgets/FocusedApp.qml index 40b088491..91f679525 100644 --- a/quickshell/Modules/DankBar/Widgets/FocusedApp.qml +++ b/quickshell/Modules/DBar/Widgets/FocusedApp.qml @@ -364,7 +364,7 @@ BasePill { Loader { id: tooltipLoader active: false - sourceComponent: DankTooltip {} + sourceComponent: DTooltip {} } Loader { diff --git a/quickshell/Modules/DankBar/Widgets/FocusedWindowContextMenu.qml b/quickshell/Modules/DBar/Widgets/FocusedWindowContextMenu.qml similarity index 99% rename from quickshell/Modules/DankBar/Widgets/FocusedWindowContextMenu.qml rename to quickshell/Modules/DBar/Widgets/FocusedWindowContextMenu.qml index 180b6c24d..9fdd8abb9 100644 --- a/quickshell/Modules/DankBar/Widgets/FocusedWindowContextMenu.qml +++ b/quickshell/Modules/DBar/Widgets/FocusedWindowContextMenu.qml @@ -2,12 +2,12 @@ import QtQuick import Quickshell import Quickshell.Widgets import qs.Common -import qs.Modules.DankBar +import qs.Modules.DBar import qs.Services import qs.DCommon.Widgets import qs.Widgets -DankPopout { +DPopout { id: root property var currentWindow: null diff --git a/quickshell/Modules/DankBar/Widgets/GpuTemperature.qml b/quickshell/Modules/DBar/Widgets/GpuTemperature.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/GpuTemperature.qml rename to quickshell/Modules/DBar/Widgets/GpuTemperature.qml diff --git a/quickshell/Modules/DankBar/Widgets/IdleInhibitPresets.qml b/quickshell/Modules/DBar/Widgets/IdleInhibitPresets.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/IdleInhibitPresets.qml rename to quickshell/Modules/DBar/Widgets/IdleInhibitPresets.qml diff --git a/quickshell/Modules/DankBar/Widgets/IdleInhibitor.qml b/quickshell/Modules/DBar/Widgets/IdleInhibitor.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/IdleInhibitor.qml rename to quickshell/Modules/DBar/Widgets/IdleInhibitor.qml diff --git a/quickshell/Modules/DankBar/Widgets/KeyboardLayoutLabels.js b/quickshell/Modules/DBar/Widgets/KeyboardLayoutLabels.js similarity index 100% rename from quickshell/Modules/DankBar/Widgets/KeyboardLayoutLabels.js rename to quickshell/Modules/DBar/Widgets/KeyboardLayoutLabels.js diff --git a/quickshell/Modules/DankBar/Widgets/KeyboardLayoutName.qml b/quickshell/Modules/DBar/Widgets/KeyboardLayoutName.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/KeyboardLayoutName.qml rename to quickshell/Modules/DBar/Widgets/KeyboardLayoutName.qml diff --git a/quickshell/Modules/DankBar/Widgets/LauncherButton.qml b/quickshell/Modules/DBar/Widgets/LauncherButton.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/LauncherButton.qml rename to quickshell/Modules/DBar/Widgets/LauncherButton.qml diff --git a/quickshell/Modules/DankBar/Widgets/Media.qml b/quickshell/Modules/DBar/Widgets/Media.qml similarity index 99% rename from quickshell/Modules/DankBar/Widgets/Media.qml rename to quickshell/Modules/DBar/Widgets/Media.qml index 6f5273573..b6e72343b 100644 --- a/quickshell/Modules/DankBar/Widgets/Media.qml +++ b/quickshell/Modules/DBar/Widgets/Media.qml @@ -2,7 +2,7 @@ import QtQuick import Quickshell.Services.Mpris import Quickshell.Widgets import qs.Common -import qs.Modules.DankBar +import qs.Modules.DBar import qs.Modules.Plugins import qs.Services import qs.DCommon.Widgets @@ -83,7 +83,7 @@ BasePill { Loader { id: tooltipLoader active: false - sourceComponent: DankTooltip {} + sourceComponent: DTooltip {} } function showTrackTooltip() { diff --git a/quickshell/Modules/DankBar/Widgets/MediaLyricLine.qml b/quickshell/Modules/DBar/Widgets/MediaLyricLine.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/MediaLyricLine.qml rename to quickshell/Modules/DBar/Widgets/MediaLyricLine.qml diff --git a/quickshell/Modules/DankBar/Widgets/MonitorPill.qml b/quickshell/Modules/DBar/Widgets/MonitorPill.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/MonitorPill.qml rename to quickshell/Modules/DBar/Widgets/MonitorPill.qml diff --git a/quickshell/Modules/DankBar/Widgets/NetworkMonitor.qml b/quickshell/Modules/DBar/Widgets/NetworkMonitor.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/NetworkMonitor.qml rename to quickshell/Modules/DBar/Widgets/NetworkMonitor.qml diff --git a/quickshell/Modules/DankBar/Widgets/NotepadButton.qml b/quickshell/Modules/DBar/Widgets/NotepadButton.qml similarity index 99% rename from quickshell/Modules/DankBar/Widgets/NotepadButton.qml rename to quickshell/Modules/DBar/Widgets/NotepadButton.qml index c569bf3b4..f72a3a78e 100644 --- a/quickshell/Modules/DankBar/Widgets/NotepadButton.qml +++ b/quickshell/Modules/DBar/Widgets/NotepadButton.qml @@ -128,7 +128,7 @@ BasePill { } } - DankContextMenu { + DContextMenu { id: contextMenu layerNamespace: "dms:notepad-context-menu" menuItems: root.savedTabEntries.map(entry => ({ diff --git a/quickshell/Modules/DankBar/Widgets/NotificationCenterButton.qml b/quickshell/Modules/DBar/Widgets/NotificationCenterButton.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/NotificationCenterButton.qml rename to quickshell/Modules/DBar/Widgets/NotificationCenterButton.qml diff --git a/quickshell/Modules/DankBar/Widgets/PowerMenuButton.qml b/quickshell/Modules/DBar/Widgets/PowerMenuButton.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/PowerMenuButton.qml rename to quickshell/Modules/DBar/Widgets/PowerMenuButton.qml diff --git a/quickshell/Modules/DankBar/Widgets/PrivacyIndicator.qml b/quickshell/Modules/DBar/Widgets/PrivacyIndicator.qml similarity index 99% rename from quickshell/Modules/DankBar/Widgets/PrivacyIndicator.qml rename to quickshell/Modules/DBar/Widgets/PrivacyIndicator.qml index a33d0fd41..c85854e09 100644 --- a/quickshell/Modules/DankBar/Widgets/PrivacyIndicator.qml +++ b/quickshell/Modules/DBar/Widgets/PrivacyIndicator.qml @@ -1,6 +1,6 @@ import QtQuick import qs.Common -import qs.Modules.DankBar +import qs.Modules.DBar import qs.Modules.Plugins import qs.Services import qs.DCommon.Widgets diff --git a/quickshell/Modules/DankBar/Widgets/RamMonitor.qml b/quickshell/Modules/DBar/Widgets/RamMonitor.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/RamMonitor.qml rename to quickshell/Modules/DBar/Widgets/RamMonitor.qml diff --git a/quickshell/Modules/DankBar/Widgets/RunningApps.qml b/quickshell/Modules/DBar/Widgets/RunningApps.qml similarity index 99% rename from quickshell/Modules/DankBar/Widgets/RunningApps.qml rename to quickshell/Modules/DBar/Widgets/RunningApps.qml index 2da55d5db..fcdaa2b0b 100644 --- a/quickshell/Modules/DankBar/Widgets/RunningApps.qml +++ b/quickshell/Modules/DBar/Widgets/RunningApps.qml @@ -3,7 +3,7 @@ import QtQuick.Effects import Quickshell import Quickshell.Widgets import qs.Common -import qs.Modules.DankBar +import qs.Modules.DBar import qs.Modules.Plugins import qs.Services import qs.DCommon.Widgets @@ -449,7 +449,7 @@ BasePill { active: false - sourceComponent: DankTooltip {} + sourceComponent: DTooltip {} } function menuAnchorFor(item) { @@ -468,7 +468,7 @@ BasePill { windowContextMenu.openFromBar(item ? root.menuAnchorFor(item) : root.contextMenuAnchor()); } - DankContextMenu { + DContextMenu { id: windowContextMenu property var currentWindow: null diff --git a/quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml b/quickshell/Modules/DBar/Widgets/SystemTrayBar.qml similarity index 99% rename from quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml rename to quickshell/Modules/DBar/Widgets/SystemTrayBar.qml index dba6aa033..255f8e3b3 100644 --- a/quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml +++ b/quickshell/Modules/DBar/Widgets/SystemTrayBar.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts import Quickshell import Quickshell.Services.SystemTray import qs.Common -import qs.Modules.DankBar +import qs.Modules.DBar import qs.Modules.Plugins import qs.Services import qs.DCommon.Widgets @@ -500,7 +500,7 @@ BasePill { return rows * itemSize + (rows - 1) * spacing + popupPadding * 2; } - DankPopout { + DPopout { id: overflowPopout layerNamespace: "dms:tray-overflow" screen: root.parentScreen @@ -509,7 +509,7 @@ BasePill { content: overflowContentComponent } - DankPopout { + DPopout { id: trayMenuPopout layerNamespace: "dms:tray-menu" screen: root.parentScreen @@ -988,7 +988,7 @@ BasePill { } } - // Overflow grid content rendered inside DankPopout + // Overflow grid content rendered inside DPopout Component { id: overflowContentComponent diff --git a/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml b/quickshell/Modules/DBar/Widgets/SystemUpdate.qml similarity index 99% rename from quickshell/Modules/DankBar/Widgets/SystemUpdate.qml rename to quickshell/Modules/DBar/Widgets/SystemUpdate.qml index 89951dcf7..38b5f46f9 100644 --- a/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml +++ b/quickshell/Modules/DBar/Widgets/SystemUpdate.qml @@ -1,6 +1,6 @@ import QtQuick import qs.Common -import qs.Modules.DankBar +import qs.Modules.DBar import qs.Modules.Plugins import qs.Services import qs.DCommon.Widgets diff --git a/quickshell/Modules/DankBar/Widgets/TrayItemIcon.qml b/quickshell/Modules/DBar/Widgets/TrayItemIcon.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/TrayItemIcon.qml rename to quickshell/Modules/DBar/Widgets/TrayItemIcon.qml diff --git a/quickshell/Modules/DankBar/Widgets/Vpn.qml b/quickshell/Modules/DBar/Widgets/Vpn.qml similarity index 99% rename from quickshell/Modules/DankBar/Widgets/Vpn.qml rename to quickshell/Modules/DBar/Widgets/Vpn.qml index 5ff87aa1f..584f774cb 100644 --- a/quickshell/Modules/DankBar/Widgets/Vpn.qml +++ b/quickshell/Modules/DBar/Widgets/Vpn.qml @@ -43,7 +43,7 @@ BasePill { Loader { id: tooltipLoader active: false - sourceComponent: DankTooltip {} + sourceComponent: DTooltip {} } MouseArea { diff --git a/quickshell/Modules/DankBar/Widgets/Weather.qml b/quickshell/Modules/DBar/Widgets/Weather.qml similarity index 100% rename from quickshell/Modules/DankBar/Widgets/Weather.qml rename to quickshell/Modules/DBar/Widgets/Weather.qml diff --git a/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml b/quickshell/Modules/DBar/Widgets/WorkspaceSwitcher.qml similarity index 99% rename from quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml rename to quickshell/Modules/DBar/Widgets/WorkspaceSwitcher.qml index 544e83cd5..1bb7b9a8d 100644 --- a/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml +++ b/quickshell/Modules/DBar/Widgets/WorkspaceSwitcher.qml @@ -4,7 +4,7 @@ import Quickshell import Quickshell.Widgets import Quickshell.WindowManager import qs.Common -import qs.Modules.DankBar +import qs.Modules.DBar import qs.Modules.Plugins import qs.Services import qs.DCommon.Widgets diff --git a/quickshell/Modules/DankDash/DankDashPopout.qml b/quickshell/Modules/DDash/DDashPopout.qml similarity index 99% rename from quickshell/Modules/DankDash/DankDashPopout.qml rename to quickshell/Modules/DDash/DDashPopout.qml index ed841668c..ab9e31131 100644 --- a/quickshell/Modules/DankDash/DankDashPopout.qml +++ b/quickshell/Modules/DDash/DDashPopout.qml @@ -7,10 +7,10 @@ import qs.Services import qs.DCommon.Widgets import qs.Widgets import qs.Modules.ControlCenter.Widgets -import qs.Modules.DankDash.Overview +import qs.Modules.DDash.Overview import "../../DCommon/Common/FocusNavigation.js" as FocusNavigation -DankPopout { +DPopout { id: root layerNamespace: "dms:dash" @@ -276,7 +276,7 @@ DankPopout { readonly property int contentRows: DashMetrics.rowsForHeight(pages.currentHostImplicitHeight) readonly property int panelRows: Math.max(DashMetrics.panelFloorRowsFor(root.activeTabId), contentRows) readonly property bool panelAtDefault: panelColumns === DashMetrics.defaultGridColumns && panelRows === DashMetrics.defaultPanelRows(root.activeTabId, contentRows) - readonly property DankPanelResizer panelResizer: DankPanelResizer { + readonly property DPanelResizer panelResizer: DPanelResizer { popout: root stepWidth: DashMetrics.preferredColumnWidth + DashMetrics.gridGap widthFor: columns => root.panelWidthFor(columns) @@ -568,7 +568,7 @@ DankPopout { onDismissed: mainContainer.focusInitial() } - DankGridEditChrome { + DGridEditChrome { id: panelChrome anchors.fill: parent diff --git a/quickshell/Modules/DankDash/DashMetrics.qml b/quickshell/Modules/DDash/DashMetrics.qml similarity index 100% rename from quickshell/Modules/DankDash/DashMetrics.qml rename to quickshell/Modules/DDash/DashMetrics.qml diff --git a/quickshell/Modules/DankDash/DashPageActions.qml b/quickshell/Modules/DDash/DashPageActions.qml similarity index 98% rename from quickshell/Modules/DankDash/DashPageActions.qml rename to quickshell/Modules/DDash/DashPageActions.qml index c50fb7fc8..4620a6e28 100644 --- a/quickshell/Modules/DankDash/DashPageActions.qml +++ b/quickshell/Modules/DDash/DashPageActions.qml @@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common import qs.Modules.ControlCenter.Widgets -import qs.Modules.DankDash.Overview +import qs.Modules.DDash.Overview import "utils/cards.js" as CardUtils Item { diff --git a/quickshell/Modules/DankDash/DashPageTitle.qml b/quickshell/Modules/DDash/DashPageTitle.qml similarity index 100% rename from quickshell/Modules/DankDash/DashPageTitle.qml rename to quickshell/Modules/DDash/DashPageTitle.qml diff --git a/quickshell/Modules/DankDash/DashRegistry.qml b/quickshell/Modules/DDash/DashRegistry.qml similarity index 99% rename from quickshell/Modules/DankDash/DashRegistry.qml rename to quickshell/Modules/DDash/DashRegistry.qml index a49ee61b3..7de0feabb 100644 --- a/quickshell/Modules/DankDash/DashRegistry.qml +++ b/quickshell/Modules/DDash/DashRegistry.qml @@ -4,7 +4,7 @@ import QtQuick import Quickshell import qs.Common import qs.Services -import qs.Modules.DankDash.Overview +import qs.Modules.DDash.Overview import "utils/options.js" as Options Singleton { diff --git a/quickshell/Modules/DankDash/DashSheetHandle.qml b/quickshell/Modules/DDash/DashSheetHandle.qml similarity index 100% rename from quickshell/Modules/DankDash/DashSheetHandle.qml rename to quickshell/Modules/DDash/DashSheetHandle.qml diff --git a/quickshell/Modules/DankDash/DashTabHost.qml b/quickshell/Modules/DDash/DashTabHost.qml similarity index 100% rename from quickshell/Modules/DankDash/DashTabHost.qml rename to quickshell/Modules/DDash/DashTabHost.qml diff --git a/quickshell/Modules/DankDash/DashWidgetGrid.qml b/quickshell/Modules/DDash/DashWidgetGrid.qml similarity index 98% rename from quickshell/Modules/DankDash/DashWidgetGrid.qml rename to quickshell/Modules/DDash/DashWidgetGrid.qml index 1b506f6d7..6037d6f4d 100644 --- a/quickshell/Modules/DankDash/DashWidgetGrid.qml +++ b/quickshell/Modules/DDash/DashWidgetGrid.qml @@ -5,7 +5,7 @@ import qs.Common import qs.Widgets import qs.Modules.ControlCenter.Widgets import qs.Modules.Settings.Widgets -import qs.Modules.DankDash.Overview +import qs.Modules.DDash.Overview import "../../Common/GridLayout.js" as GridUtils import "utils/widgets.js" as WidgetUtils import "../../DCommon/Common/FocusNavigation.js" as FocusNavigation @@ -119,7 +119,7 @@ Item { optionsSheet.dismiss(); } - DankEditableGrid { + DEditableGrid { id: grid width: parent.width editMode: root.editMode @@ -136,7 +136,7 @@ Item { id: slots model: grid.tileModel - DankEditableGridSlot { + DEditableGridSlot { id: slot grid: grid readonly property var widget: JSON.parse(json) diff --git a/quickshell/Modules/DankDash/Media/BentoChrome.qml b/quickshell/Modules/DDash/Media/BentoChrome.qml similarity index 99% rename from quickshell/Modules/DankDash/Media/BentoChrome.qml rename to quickshell/Modules/DDash/Media/BentoChrome.qml index 439f01b47..e076e0b72 100644 --- a/quickshell/Modules/DankDash/Media/BentoChrome.qml +++ b/quickshell/Modules/DDash/Media/BentoChrome.qml @@ -5,7 +5,7 @@ import qs.Common import qs.Services import qs.DCommon.Widgets import qs.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash import "../../../Common/Format.js" as Format MediaChromeBase { diff --git a/quickshell/Modules/DankDash/Media/LyricsOverlay.qml b/quickshell/Modules/DDash/Media/LyricsOverlay.qml similarity index 99% rename from quickshell/Modules/DankDash/Media/LyricsOverlay.qml rename to quickshell/Modules/DDash/Media/LyricsOverlay.qml index a867d907f..b4791eb4c 100644 --- a/quickshell/Modules/DankDash/Media/LyricsOverlay.qml +++ b/quickshell/Modules/DDash/Media/LyricsOverlay.qml @@ -5,7 +5,7 @@ import qs.Common import qs.DCommon.Widgets import qs.Widgets import qs.Services -import qs.Modules.DankDash +import qs.Modules.DDash FocusScope { id: root diff --git a/quickshell/Modules/DankDash/Media/LyricsVocal.qml b/quickshell/Modules/DDash/Media/LyricsVocal.qml similarity index 99% rename from quickshell/Modules/DankDash/Media/LyricsVocal.qml rename to quickshell/Modules/DDash/Media/LyricsVocal.qml index d76a2875b..73166e982 100644 --- a/quickshell/Modules/DankDash/Media/LyricsVocal.qml +++ b/quickshell/Modules/DDash/Media/LyricsVocal.qml @@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash import "../../../Common/Format.js" as Format Item { diff --git a/quickshell/Modules/DankDash/Media/MaterialChrome.qml b/quickshell/Modules/DDash/Media/MaterialChrome.qml similarity index 99% rename from quickshell/Modules/DankDash/Media/MaterialChrome.qml rename to quickshell/Modules/DDash/Media/MaterialChrome.qml index b6bf47d7e..1da8bf192 100644 --- a/quickshell/Modules/DankDash/Media/MaterialChrome.qml +++ b/quickshell/Modules/DDash/Media/MaterialChrome.qml @@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash import "../../../Common/Format.js" as Format MediaChromeBase { diff --git a/quickshell/Modules/DankDash/Media/MaterialSourceGroup.qml b/quickshell/Modules/DDash/Media/MaterialSourceGroup.qml similarity index 100% rename from quickshell/Modules/DankDash/Media/MaterialSourceGroup.qml rename to quickshell/Modules/DDash/Media/MaterialSourceGroup.qml diff --git a/quickshell/Modules/DankDash/Media/MaterialTransport.qml b/quickshell/Modules/DDash/Media/MaterialTransport.qml similarity index 100% rename from quickshell/Modules/DankDash/Media/MaterialTransport.qml rename to quickshell/Modules/DDash/Media/MaterialTransport.qml diff --git a/quickshell/Modules/DankDash/Media/MediaArtSurface.qml b/quickshell/Modules/DDash/Media/MediaArtSurface.qml similarity index 98% rename from quickshell/Modules/DankDash/Media/MediaArtSurface.qml rename to quickshell/Modules/DDash/Media/MediaArtSurface.qml index c8c674ffb..1b39785a6 100644 --- a/quickshell/Modules/DankDash/Media/MediaArtSurface.qml +++ b/quickshell/Modules/DDash/Media/MediaArtSurface.qml @@ -5,7 +5,7 @@ import QtQuick.Effects import QtQuick.Shapes import Quickshell.Widgets import qs.Common -import qs.Modules.DankDash +import qs.Modules.DDash import "../../../DCommon/Widgets/MaterialShapes.js" as Shapes ClippingRectangle { diff --git a/quickshell/Modules/DankDash/Media/MediaArtView.qml b/quickshell/Modules/DDash/Media/MediaArtView.qml similarity index 97% rename from quickshell/Modules/DankDash/Media/MediaArtView.qml rename to quickshell/Modules/DDash/Media/MediaArtView.qml index ed0b79274..e6c729eb3 100644 --- a/quickshell/Modules/DankDash/Media/MediaArtView.qml +++ b/quickshell/Modules/DDash/Media/MediaArtView.qml @@ -2,7 +2,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash Item { id: root diff --git a/quickshell/Modules/DankDash/Media/MediaChromeBase.qml b/quickshell/Modules/DDash/Media/MediaChromeBase.qml similarity index 99% rename from quickshell/Modules/DankDash/Media/MediaChromeBase.qml rename to quickshell/Modules/DDash/Media/MediaChromeBase.qml index 6e043b1cc..433a89ef7 100644 --- a/quickshell/Modules/DankDash/Media/MediaChromeBase.qml +++ b/quickshell/Modules/DDash/Media/MediaChromeBase.qml @@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common import qs.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash import "../../../DCommon/Common/FocusNavigation.js" as FocusNavigation Item { diff --git a/quickshell/Modules/DankDash/Media/MediaDeviceRow.qml b/quickshell/Modules/DDash/Media/MediaDeviceRow.qml similarity index 100% rename from quickshell/Modules/DankDash/Media/MediaDeviceRow.qml rename to quickshell/Modules/DDash/Media/MediaDeviceRow.qml diff --git a/quickshell/Modules/DankDash/Media/MediaEmptyState.qml b/quickshell/Modules/DDash/Media/MediaEmptyState.qml similarity index 100% rename from quickshell/Modules/DankDash/Media/MediaEmptyState.qml rename to quickshell/Modules/DDash/Media/MediaEmptyState.qml diff --git a/quickshell/Modules/DankDash/Media/MediaPanel.qml b/quickshell/Modules/DDash/Media/MediaPanel.qml similarity index 99% rename from quickshell/Modules/DankDash/Media/MediaPanel.qml rename to quickshell/Modules/DDash/Media/MediaPanel.qml index a87e4e7de..5cb08940f 100644 --- a/quickshell/Modules/DankDash/Media/MediaPanel.qml +++ b/quickshell/Modules/DDash/Media/MediaPanel.qml @@ -4,7 +4,7 @@ import QtQuick import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash DBottomSheet { id: root diff --git a/quickshell/Modules/DankDash/Media/MediaPanelRow.qml b/quickshell/Modules/DDash/Media/MediaPanelRow.qml similarity index 96% rename from quickshell/Modules/DankDash/Media/MediaPanelRow.qml rename to quickshell/Modules/DDash/Media/MediaPanelRow.qml index 5e5cc4cb1..44c726505 100644 --- a/quickshell/Modules/DankDash/Media/MediaPanelRow.qml +++ b/quickshell/Modules/DDash/Media/MediaPanelRow.qml @@ -2,7 +2,7 @@ import QtQuick import qs.Common import qs.DCommon.Widgets import qs.Modules.Settings.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash SettingsRow { id: root diff --git a/quickshell/Modules/DankDash/Media/MediaPresentation.qml b/quickshell/Modules/DDash/Media/MediaPresentation.qml similarity index 99% rename from quickshell/Modules/DankDash/Media/MediaPresentation.qml rename to quickshell/Modules/DDash/Media/MediaPresentation.qml index 5248cdec4..4c7307f55 100644 --- a/quickshell/Modules/DankDash/Media/MediaPresentation.qml +++ b/quickshell/Modules/DDash/Media/MediaPresentation.qml @@ -1,7 +1,7 @@ import QtQuick import Quickshell.Services.Mpris import qs.Services -import qs.Modules.DankDash +import qs.Modules.DDash QtObject { id: root diff --git a/quickshell/Modules/DankDash/Media/MediaSeekbar.qml b/quickshell/Modules/DDash/Media/MediaSeekbar.qml similarity index 92% rename from quickshell/Modules/DankDash/Media/MediaSeekbar.qml rename to quickshell/Modules/DDash/Media/MediaSeekbar.qml index 664f4818d..70c3bef2e 100644 --- a/quickshell/Modules/DankDash/Media/MediaSeekbar.qml +++ b/quickshell/Modules/DDash/Media/MediaSeekbar.qml @@ -1,9 +1,9 @@ import QtQuick import qs.Services import qs.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash -DankSeekbar { +DSeekbar { id: root required property var player diff --git a/quickshell/Modules/DankDash/Media/MediaSinkWheel.qml b/quickshell/Modules/DDash/Media/MediaSinkWheel.qml similarity index 100% rename from quickshell/Modules/DankDash/Media/MediaSinkWheel.qml rename to quickshell/Modules/DDash/Media/MediaSinkWheel.qml diff --git a/quickshell/Modules/DankDash/Media/MediaSourceGroup.qml b/quickshell/Modules/DDash/Media/MediaSourceGroup.qml similarity index 99% rename from quickshell/Modules/DankDash/Media/MediaSourceGroup.qml rename to quickshell/Modules/DDash/Media/MediaSourceGroup.qml index 525900563..f02e2c669 100644 --- a/quickshell/Modules/DankDash/Media/MediaSourceGroup.qml +++ b/quickshell/Modules/DDash/Media/MediaSourceGroup.qml @@ -4,7 +4,7 @@ import QtQuick import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash import "../../../DCommon/Common/FocusNavigation.js" as FocusNavigation Item { diff --git a/quickshell/Modules/DankDash/Media/MediaTransport.qml b/quickshell/Modules/DDash/Media/MediaTransport.qml similarity index 99% rename from quickshell/Modules/DankDash/Media/MediaTransport.qml rename to quickshell/Modules/DDash/Media/MediaTransport.qml index 65e61c031..b039b463b 100644 --- a/quickshell/Modules/DankDash/Media/MediaTransport.qml +++ b/quickshell/Modules/DDash/Media/MediaTransport.qml @@ -4,7 +4,7 @@ import QtQuick import QtQuick.Layouts import qs.Common import qs.Services -import qs.Modules.DankDash +import qs.Modules.DDash import "../../../DCommon/Common/FocusNavigation.js" as FocusNavigation RowLayout { diff --git a/quickshell/Modules/DankDash/Media/MediaTransportButton.qml b/quickshell/Modules/DDash/Media/MediaTransportButton.qml similarity index 100% rename from quickshell/Modules/DankDash/Media/MediaTransportButton.qml rename to quickshell/Modules/DDash/Media/MediaTransportButton.qml diff --git a/quickshell/Modules/DankDash/Media/MediaVolumeSlider.qml b/quickshell/Modules/DDash/Media/MediaVolumeSlider.qml similarity index 100% rename from quickshell/Modules/DankDash/Media/MediaVolumeSlider.qml rename to quickshell/Modules/DDash/Media/MediaVolumeSlider.qml diff --git a/quickshell/Modules/DankDash/Media/MediaVolumeWheel.qml b/quickshell/Modules/DDash/Media/MediaVolumeWheel.qml similarity index 100% rename from quickshell/Modules/DankDash/Media/MediaVolumeWheel.qml rename to quickshell/Modules/DDash/Media/MediaVolumeWheel.qml diff --git a/quickshell/Modules/DankDash/MediaPlayerTab.qml b/quickshell/Modules/DDash/MediaPlayerTab.qml similarity index 99% rename from quickshell/Modules/DankDash/MediaPlayerTab.qml rename to quickshell/Modules/DDash/MediaPlayerTab.qml index 4fa009bf1..4d0eaaf05 100644 --- a/quickshell/Modules/DankDash/MediaPlayerTab.qml +++ b/quickshell/Modules/DDash/MediaPlayerTab.qml @@ -2,7 +2,7 @@ import QtQuick import Quickshell.Services.Mpris import qs.Common import qs.Services -import qs.Modules.DankDash.Media +import qs.Modules.DDash.Media Item { id: root diff --git a/quickshell/Modules/DankDash/NotificationsTab.qml b/quickshell/Modules/DDash/NotificationsTab.qml similarity index 99% rename from quickshell/Modules/DankDash/NotificationsTab.qml rename to quickshell/Modules/DDash/NotificationsTab.qml index 704c1d8e3..6ae7076ec 100644 --- a/quickshell/Modules/DankDash/NotificationsTab.qml +++ b/quickshell/Modules/DDash/NotificationsTab.qml @@ -202,7 +202,7 @@ FocusScope { } } - DankDropdown { + DDropdown { id: duration showTrigger: false popupAnchorItem: dndButton diff --git a/quickshell/Modules/DankDash/Overview/BatteryCard.qml b/quickshell/Modules/DDash/Overview/BatteryCard.qml similarity index 99% rename from quickshell/Modules/DankDash/Overview/BatteryCard.qml rename to quickshell/Modules/DDash/Overview/BatteryCard.qml index 5b0c2108b..f1d88f8cd 100644 --- a/quickshell/Modules/DankDash/Overview/BatteryCard.qml +++ b/quickshell/Modules/DDash/Overview/BatteryCard.qml @@ -3,7 +3,7 @@ import qs.Common import qs.Services import qs.DCommon.Widgets import qs.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash Card { id: root diff --git a/quickshell/Modules/DankDash/Overview/CalendarEventDetail.qml b/quickshell/Modules/DDash/Overview/CalendarEventDetail.qml similarity index 100% rename from quickshell/Modules/DankDash/Overview/CalendarEventDetail.qml rename to quickshell/Modules/DDash/Overview/CalendarEventDetail.qml diff --git a/quickshell/Modules/DankDash/Overview/CalendarEventEditor.qml b/quickshell/Modules/DDash/Overview/CalendarEventEditor.qml similarity index 100% rename from quickshell/Modules/DankDash/Overview/CalendarEventEditor.qml rename to quickshell/Modules/DDash/Overview/CalendarEventEditor.qml diff --git a/quickshell/Modules/DankDash/Overview/CalendarOverviewCard.qml b/quickshell/Modules/DDash/Overview/CalendarOverviewCard.qml similarity index 99% rename from quickshell/Modules/DankDash/Overview/CalendarOverviewCard.qml rename to quickshell/Modules/DDash/Overview/CalendarOverviewCard.qml index a6d2e2f3c..a5e96d563 100644 --- a/quickshell/Modules/DankDash/Overview/CalendarOverviewCard.qml +++ b/quickshell/Modules/DDash/Overview/CalendarOverviewCard.qml @@ -6,7 +6,7 @@ import qs.Common import qs.Services import qs.DCommon.Widgets import qs.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash import "../../../Common/DateOnly.js" as DateOnly Card { diff --git a/quickshell/Modules/DankDash/Overview/Card.qml b/quickshell/Modules/DDash/Overview/Card.qml similarity index 97% rename from quickshell/Modules/DankDash/Overview/Card.qml rename to quickshell/Modules/DDash/Overview/Card.qml index c6643f7c8..df2b7b1e3 100644 --- a/quickshell/Modules/DankDash/Overview/Card.qml +++ b/quickshell/Modules/DDash/Overview/Card.qml @@ -1,7 +1,7 @@ import QtQuick import qs.Common import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash DCard { id: root diff --git a/quickshell/Modules/DankDash/Overview/ClockCard.qml b/quickshell/Modules/DDash/Overview/ClockCard.qml similarity index 99% rename from quickshell/Modules/DankDash/Overview/ClockCard.qml rename to quickshell/Modules/DDash/Overview/ClockCard.qml index e3e59be4c..91845adb8 100644 --- a/quickshell/Modules/DankDash/Overview/ClockCard.qml +++ b/quickshell/Modules/DDash/Overview/ClockCard.qml @@ -3,7 +3,7 @@ import Quickshell import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash Card { id: root diff --git a/quickshell/Modules/DankDash/Overview/CpuCard.qml b/quickshell/Modules/DDash/Overview/CpuCard.qml similarity index 94% rename from quickshell/Modules/DankDash/Overview/CpuCard.qml rename to quickshell/Modules/DDash/Overview/CpuCard.qml index f9af6c264..5829a9cb5 100644 --- a/quickshell/Modules/DankDash/Overview/CpuCard.qml +++ b/quickshell/Modules/DDash/Overview/CpuCard.qml @@ -1,7 +1,7 @@ import QtQuick import qs.Common import qs.Services -import qs.Modules.DankDash +import qs.Modules.DDash MetricCard { entryId: "cpu" diff --git a/quickshell/Modules/DankDash/Overview/DashCardGrid.qml b/quickshell/Modules/DDash/Overview/DashCardGrid.qml similarity index 99% rename from quickshell/Modules/DankDash/Overview/DashCardGrid.qml rename to quickshell/Modules/DDash/Overview/DashCardGrid.qml index a50341b01..0a9e631f7 100644 --- a/quickshell/Modules/DankDash/Overview/DashCardGrid.qml +++ b/quickshell/Modules/DDash/Overview/DashCardGrid.qml @@ -3,12 +3,12 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common import qs.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash import "../../../Common/GridLayout.js" as GridUtils import "../utils/cards.js" as CardUtils import "../../../DCommon/Common/FocusNavigation.js" as FocusNavigation -DankEditableGrid { +DEditableGrid { id: root property bool live: true diff --git a/quickshell/Modules/DankDash/Overview/DashCardSlot.qml b/quickshell/Modules/DDash/Overview/DashCardSlot.qml similarity index 99% rename from quickshell/Modules/DankDash/Overview/DashCardSlot.qml rename to quickshell/Modules/DDash/Overview/DashCardSlot.qml index a1f67f8bf..209d7c8bd 100644 --- a/quickshell/Modules/DankDash/Overview/DashCardSlot.qml +++ b/quickshell/Modules/DDash/Overview/DashCardSlot.qml @@ -3,10 +3,10 @@ import qs.Common import qs.Services import qs.DCommon.Widgets import qs.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash import "../utils/cards.js" as CardUtils -DankEditableGridSlot { +DEditableGridSlot { id: root readonly property var cardData: JSON.parse(json) diff --git a/quickshell/Modules/DankDash/Overview/DashEditChrome.qml b/quickshell/Modules/DDash/Overview/DashEditChrome.qml similarity index 81% rename from quickshell/Modules/DankDash/Overview/DashEditChrome.qml rename to quickshell/Modules/DDash/Overview/DashEditChrome.qml index 367a38f49..e7b203a8f 100644 --- a/quickshell/Modules/DankDash/Overview/DashEditChrome.qml +++ b/quickshell/Modules/DDash/Overview/DashEditChrome.qml @@ -1,8 +1,8 @@ import qs.Common import qs.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash -DankGridEditChrome { +DGridEditChrome { cornerRadius: DashMetrics.cardRadius hitOverflow: DashMetrics.gridGap / 2 buttonSize: PopoutMetrics.chromeButtonSize diff --git a/quickshell/Modules/DankDash/Overview/DashEditControls.qml b/quickshell/Modules/DDash/Overview/DashEditControls.qml similarity index 100% rename from quickshell/Modules/DankDash/Overview/DashEditControls.qml rename to quickshell/Modules/DDash/Overview/DashEditControls.qml diff --git a/quickshell/Modules/DankDash/Overview/DashOptionRow.qml b/quickshell/Modules/DDash/Overview/DashOptionRow.qml similarity index 97% rename from quickshell/Modules/DankDash/Overview/DashOptionRow.qml rename to quickshell/Modules/DDash/Overview/DashOptionRow.qml index 64e97e236..96f28066c 100644 --- a/quickshell/Modules/DankDash/Overview/DashOptionRow.qml +++ b/quickshell/Modules/DDash/Overview/DashOptionRow.qml @@ -3,7 +3,7 @@ import qs.Common import qs.DCommon.Widgets import qs.Widgets import qs.Modules.Settings.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash SettingsRow { id: root @@ -53,7 +53,7 @@ SettingsRow { Component { id: choiceControl - DankDropdown { + DDropdown { options: root.choices.map(c => c.text) currentValue: root.choices[root.choiceIndex]?.text ?? "" onValueChanged: value => { diff --git a/quickshell/Modules/DankDash/Overview/DashOptionsSheet.qml b/quickshell/Modules/DDash/Overview/DashOptionsSheet.qml similarity index 98% rename from quickshell/Modules/DankDash/Overview/DashOptionsSheet.qml rename to quickshell/Modules/DDash/Overview/DashOptionsSheet.qml index deaed3930..2d4159663 100644 --- a/quickshell/Modules/DankDash/Overview/DashOptionsSheet.qml +++ b/quickshell/Modules/DDash/Overview/DashOptionsSheet.qml @@ -4,7 +4,7 @@ import qs.Common import qs.DCommon.Widgets import qs.Modules.Settings.Widgets import qs.Modules.ControlCenter.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash CcSheetDialog { id: root diff --git a/quickshell/Modules/DankDash/Overview/DiskCard.qml b/quickshell/Modules/DDash/Overview/DiskCard.qml similarity index 97% rename from quickshell/Modules/DankDash/Overview/DiskCard.qml rename to quickshell/Modules/DDash/Overview/DiskCard.qml index d60094857..500166e2b 100644 --- a/quickshell/Modules/DankDash/Overview/DiskCard.qml +++ b/quickshell/Modules/DDash/Overview/DiskCard.qml @@ -1,7 +1,7 @@ import QtQuick import qs.Common import qs.Services -import qs.Modules.DankDash +import qs.Modules.DDash import "../../../Common/Format.js" as Format MetricCard { diff --git a/quickshell/Modules/DankDash/Overview/MediaOverviewCard.qml b/quickshell/Modules/DDash/Overview/MediaOverviewCard.qml similarity index 99% rename from quickshell/Modules/DankDash/Overview/MediaOverviewCard.qml rename to quickshell/Modules/DDash/Overview/MediaOverviewCard.qml index b13593111..da4a66589 100644 --- a/quickshell/Modules/DankDash/Overview/MediaOverviewCard.qml +++ b/quickshell/Modules/DDash/Overview/MediaOverviewCard.qml @@ -6,8 +6,8 @@ import qs.Common import qs.Services import qs.DCommon.Widgets import qs.Widgets -import qs.Modules.DankDash -import qs.Modules.DankDash.Media +import qs.Modules.DDash +import qs.Modules.DDash.Media import "../../../DCommon/Common/FocusNavigation.js" as FocusNavigation Card { @@ -151,7 +151,7 @@ Card { height: DashMetrics.overviewSeekHeight visible: root.showSeekbar - DankSeekbar { + DSeekbar { id: seekbar anchors.fill: parent activePlayer: root.activePlayer diff --git a/quickshell/Modules/DankDash/Overview/MemoryCard.qml b/quickshell/Modules/DDash/Overview/MemoryCard.qml similarity index 96% rename from quickshell/Modules/DankDash/Overview/MemoryCard.qml rename to quickshell/Modules/DDash/Overview/MemoryCard.qml index 7912d0036..6ad0d98cb 100644 --- a/quickshell/Modules/DankDash/Overview/MemoryCard.qml +++ b/quickshell/Modules/DDash/Overview/MemoryCard.qml @@ -1,7 +1,7 @@ import QtQuick import qs.Common import qs.Services -import qs.Modules.DankDash +import qs.Modules.DDash MetricCard { entryId: "memory" diff --git a/quickshell/Modules/DankDash/Overview/MetricCard.qml b/quickshell/Modules/DDash/Overview/MetricCard.qml similarity index 99% rename from quickshell/Modules/DankDash/Overview/MetricCard.qml rename to quickshell/Modules/DDash/Overview/MetricCard.qml index 0facb0290..787ce2747 100644 --- a/quickshell/Modules/DankDash/Overview/MetricCard.qml +++ b/quickshell/Modules/DDash/Overview/MetricCard.qml @@ -2,7 +2,7 @@ import QtQuick import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash Card { id: root diff --git a/quickshell/Modules/DankDash/Overview/MetricGauge.qml b/quickshell/Modules/DDash/Overview/MetricGauge.qml similarity index 97% rename from quickshell/Modules/DankDash/Overview/MetricGauge.qml rename to quickshell/Modules/DDash/Overview/MetricGauge.qml index 827c17419..a31ba6426 100644 --- a/quickshell/Modules/DankDash/Overview/MetricGauge.qml +++ b/quickshell/Modules/DDash/Overview/MetricGauge.qml @@ -1,7 +1,7 @@ import QtQuick import qs.Common import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash DRingGauge { id: root diff --git a/quickshell/Modules/DankDash/Overview/NetworkCard.qml b/quickshell/Modules/DDash/Overview/NetworkCard.qml similarity index 95% rename from quickshell/Modules/DankDash/Overview/NetworkCard.qml rename to quickshell/Modules/DDash/Overview/NetworkCard.qml index 36e1ada00..7ee19e200 100644 --- a/quickshell/Modules/DankDash/Overview/NetworkCard.qml +++ b/quickshell/Modules/DDash/Overview/NetworkCard.qml @@ -1,7 +1,7 @@ import QtQuick import qs.Common import qs.Services -import qs.Modules.DankDash +import qs.Modules.DDash import "../../../Common/Format.js" as Format MetricCard { diff --git a/quickshell/Modules/DankDash/Overview/NotificationsOverviewCard.qml b/quickshell/Modules/DDash/Overview/NotificationsOverviewCard.qml similarity index 96% rename from quickshell/Modules/DankDash/Overview/NotificationsOverviewCard.qml rename to quickshell/Modules/DDash/Overview/NotificationsOverviewCard.qml index d8276a727..5bacbc631 100644 --- a/quickshell/Modules/DankDash/Overview/NotificationsOverviewCard.qml +++ b/quickshell/Modules/DDash/Overview/NotificationsOverviewCard.qml @@ -1,6 +1,6 @@ import QtQuick import qs.Common -import qs.Modules.DankDash +import qs.Modules.DDash Card { id: root diff --git a/quickshell/Modules/DankDash/Overview/SystemMonitorCard.qml b/quickshell/Modules/DDash/Overview/SystemMonitorCard.qml similarity index 99% rename from quickshell/Modules/DankDash/Overview/SystemMonitorCard.qml rename to quickshell/Modules/DDash/Overview/SystemMonitorCard.qml index b67aa579f..10311905e 100644 --- a/quickshell/Modules/DankDash/Overview/SystemMonitorCard.qml +++ b/quickshell/Modules/DDash/Overview/SystemMonitorCard.qml @@ -2,7 +2,7 @@ import QtQuick import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash Card { id: root diff --git a/quickshell/Modules/DankDash/Overview/UserInfoCard.qml b/quickshell/Modules/DDash/Overview/UserInfoCard.qml similarity index 96% rename from quickshell/Modules/DankDash/Overview/UserInfoCard.qml rename to quickshell/Modules/DDash/Overview/UserInfoCard.qml index 2b9488d7b..e4b4f4c55 100644 --- a/quickshell/Modules/DankDash/Overview/UserInfoCard.qml +++ b/quickshell/Modules/DDash/Overview/UserInfoCard.qml @@ -1,7 +1,7 @@ import QtQuick import qs.Common import qs.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash Card { id: root diff --git a/quickshell/Modules/DankDash/Overview/WeatherOverviewCard.qml b/quickshell/Modules/DDash/Overview/WeatherOverviewCard.qml similarity index 99% rename from quickshell/Modules/DankDash/Overview/WeatherOverviewCard.qml rename to quickshell/Modules/DDash/Overview/WeatherOverviewCard.qml index 291e7afaa..e57479d4c 100644 --- a/quickshell/Modules/DankDash/Overview/WeatherOverviewCard.qml +++ b/quickshell/Modules/DDash/Overview/WeatherOverviewCard.qml @@ -2,8 +2,8 @@ import QtQuick import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash -import qs.Modules.DankDash.Weather +import qs.Modules.DDash +import qs.Modules.DDash.Weather import "../Weather/WeatherVisuals.js" as Visuals Card { diff --git a/quickshell/Modules/DankDash/Overview/WellbeingOverviewCard.qml b/quickshell/Modules/DDash/Overview/WellbeingOverviewCard.qml similarity index 98% rename from quickshell/Modules/DankDash/Overview/WellbeingOverviewCard.qml rename to quickshell/Modules/DDash/Overview/WellbeingOverviewCard.qml index 939770598..b6f8ce33d 100644 --- a/quickshell/Modules/DankDash/Overview/WellbeingOverviewCard.qml +++ b/quickshell/Modules/DDash/Overview/WellbeingOverviewCard.qml @@ -4,8 +4,8 @@ import QtQuick import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash -import qs.Modules.DankDash.Wellbeing +import qs.Modules.DDash +import qs.Modules.DDash.Wellbeing import qs.Modules.ControlCenter.Widgets import "../Wellbeing/Wellbeing.js" as Wellbeing diff --git a/quickshell/Modules/DankDash/OverviewTab.qml b/quickshell/Modules/DDash/OverviewTab.qml similarity index 99% rename from quickshell/Modules/DankDash/OverviewTab.qml rename to quickshell/Modules/DDash/OverviewTab.qml index 541be2aa0..66f069781 100644 --- a/quickshell/Modules/DankDash/OverviewTab.qml +++ b/quickshell/Modules/DDash/OverviewTab.qml @@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common import qs.Services -import qs.Modules.DankDash.Overview +import qs.Modules.DDash.Overview import qs.Modules.ControlCenter.Widgets import "utils/cards.js" as CardUtils diff --git a/quickshell/Modules/DankDash/WallpaperCarousel.qml b/quickshell/Modules/DDash/WallpaperCarousel.qml similarity index 99% rename from quickshell/Modules/DankDash/WallpaperCarousel.qml rename to quickshell/Modules/DDash/WallpaperCarousel.qml index f2f7b9e39..bce78dc1c 100644 --- a/quickshell/Modules/DankDash/WallpaperCarousel.qml +++ b/quickshell/Modules/DDash/WallpaperCarousel.qml @@ -4,7 +4,7 @@ import QtQuick import Quickshell.Widgets import qs.Common import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash Item { id: root diff --git a/quickshell/Modules/DankDash/WallpaperTab.qml b/quickshell/Modules/DDash/WallpaperTab.qml similarity index 99% rename from quickshell/Modules/DankDash/WallpaperTab.qml rename to quickshell/Modules/DDash/WallpaperTab.qml index c690934c5..75500d867 100644 --- a/quickshell/Modules/DankDash/WallpaperTab.qml +++ b/quickshell/Modules/DDash/WallpaperTab.qml @@ -8,7 +8,7 @@ import qs.DCommon.FileBrowser as FB import qs.DCommon.Widgets import qs.Widgets import qs.Modules.ControlCenter.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash import "../../DCommon/Common/FocusNavigation.js" as FocusNavigation Item { @@ -816,7 +816,7 @@ Item { event.accepted = true; } - DankDropdown { + DDropdown { id: sortMenu showTrigger: false diff --git a/quickshell/Modules/DankDash/Weather/WeatherForecastCard.qml b/quickshell/Modules/DDash/Weather/WeatherForecastCard.qml similarity index 99% rename from quickshell/Modules/DankDash/Weather/WeatherForecastCard.qml rename to quickshell/Modules/DDash/Weather/WeatherForecastCard.qml index c94cfd414..a3a05d232 100644 --- a/quickshell/Modules/DankDash/Weather/WeatherForecastCard.qml +++ b/quickshell/Modules/DDash/Weather/WeatherForecastCard.qml @@ -2,7 +2,7 @@ import QtQuick import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash Rectangle { id: root diff --git a/quickshell/Modules/DankDash/Weather/WeatherForecastChart.qml b/quickshell/Modules/DDash/Weather/WeatherForecastChart.qml similarity index 99% rename from quickshell/Modules/DankDash/Weather/WeatherForecastChart.qml rename to quickshell/Modules/DDash/Weather/WeatherForecastChart.qml index d29d60388..621efdfdc 100644 --- a/quickshell/Modules/DankDash/Weather/WeatherForecastChart.qml +++ b/quickshell/Modules/DDash/Weather/WeatherForecastChart.qml @@ -4,7 +4,7 @@ import QtQuick import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash Item { id: root diff --git a/quickshell/Modules/DankDash/Weather/WeatherForecastWidget.qml b/quickshell/Modules/DDash/Weather/WeatherForecastWidget.qml similarity index 99% rename from quickshell/Modules/DankDash/Weather/WeatherForecastWidget.qml rename to quickshell/Modules/DDash/Weather/WeatherForecastWidget.qml index 31101b54d..3c7fa872a 100644 --- a/quickshell/Modules/DankDash/Weather/WeatherForecastWidget.qml +++ b/quickshell/Modules/DDash/Weather/WeatherForecastWidget.qml @@ -4,7 +4,7 @@ import QtQuick import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash Rectangle { id: root diff --git a/quickshell/Modules/DankDash/Weather/WeatherHero.qml b/quickshell/Modules/DDash/Weather/WeatherHero.qml similarity index 100% rename from quickshell/Modules/DankDash/Weather/WeatherHero.qml rename to quickshell/Modules/DDash/Weather/WeatherHero.qml diff --git a/quickshell/Modules/DankDash/Weather/WeatherMetricCard.qml b/quickshell/Modules/DDash/Weather/WeatherMetricCard.qml similarity index 99% rename from quickshell/Modules/DankDash/Weather/WeatherMetricCard.qml rename to quickshell/Modules/DDash/Weather/WeatherMetricCard.qml index 9c577c2e4..9fe8ef28d 100644 --- a/quickshell/Modules/DankDash/Weather/WeatherMetricCard.qml +++ b/quickshell/Modules/DDash/Weather/WeatherMetricCard.qml @@ -5,7 +5,7 @@ import QtQuick.Shapes import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash import "WeatherVisuals.js" as Visuals Rectangle { diff --git a/quickshell/Modules/DankDash/Weather/WeatherSky.qml b/quickshell/Modules/DDash/Weather/WeatherSky.qml similarity index 99% rename from quickshell/Modules/DankDash/Weather/WeatherSky.qml rename to quickshell/Modules/DDash/Weather/WeatherSky.qml index 8cacacad1..b21b30b42 100644 --- a/quickshell/Modules/DankDash/Weather/WeatherSky.qml +++ b/quickshell/Modules/DDash/Weather/WeatherSky.qml @@ -3,7 +3,7 @@ import QtQuick.Shapes import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash Rectangle { id: root diff --git a/quickshell/Modules/DankDash/Weather/WeatherVisuals.js b/quickshell/Modules/DDash/Weather/WeatherVisuals.js similarity index 100% rename from quickshell/Modules/DankDash/Weather/WeatherVisuals.js rename to quickshell/Modules/DDash/Weather/WeatherVisuals.js diff --git a/quickshell/Modules/DankDash/WeatherTab.qml b/quickshell/Modules/DDash/WeatherTab.qml similarity index 99% rename from quickshell/Modules/DankDash/WeatherTab.qml rename to quickshell/Modules/DDash/WeatherTab.qml index 3ffd0e890..5f59ae3aa 100644 --- a/quickshell/Modules/DankDash/WeatherTab.qml +++ b/quickshell/Modules/DDash/WeatherTab.qml @@ -4,8 +4,8 @@ import QtQuick import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash -import qs.Modules.DankDash.Weather +import qs.Modules.DDash +import qs.Modules.DDash.Weather import qs.Modules.ControlCenter.Widgets Item { diff --git a/quickshell/Modules/DankDash/Wellbeing/AppLimitSheet.qml b/quickshell/Modules/DDash/Wellbeing/AppLimitSheet.qml similarity index 97% rename from quickshell/Modules/DankDash/Wellbeing/AppLimitSheet.qml rename to quickshell/Modules/DDash/Wellbeing/AppLimitSheet.qml index 23c86fbac..b283e6fda 100644 --- a/quickshell/Modules/DankDash/Wellbeing/AppLimitSheet.qml +++ b/quickshell/Modules/DDash/Wellbeing/AppLimitSheet.qml @@ -3,7 +3,7 @@ import qs.Common import qs.Services import qs.Modules.Settings.Widgets import qs.Modules.ControlCenter.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash CcSheetDialog { id: root diff --git a/quickshell/Modules/DankDash/Wellbeing/AppUsageList.qml b/quickshell/Modules/DDash/Wellbeing/AppUsageList.qml similarity index 99% rename from quickshell/Modules/DankDash/Wellbeing/AppUsageList.qml rename to quickshell/Modules/DDash/Wellbeing/AppUsageList.qml index f6877e5cc..8b2e03a4a 100644 --- a/quickshell/Modules/DankDash/Wellbeing/AppUsageList.qml +++ b/quickshell/Modules/DDash/Wellbeing/AppUsageList.qml @@ -4,7 +4,7 @@ import QtQuick import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash import qs.Modules.ControlCenter.Widgets import "Wellbeing.js" as Wellbeing diff --git a/quickshell/Modules/DankDash/Wellbeing/DurationSteppers.qml b/quickshell/Modules/DDash/Wellbeing/DurationSteppers.qml similarity index 100% rename from quickshell/Modules/DankDash/Wellbeing/DurationSteppers.qml rename to quickshell/Modules/DDash/Wellbeing/DurationSteppers.qml diff --git a/quickshell/Modules/DankDash/Wellbeing/WeeklyChart.qml b/quickshell/Modules/DDash/Wellbeing/WeeklyChart.qml similarity index 99% rename from quickshell/Modules/DankDash/Wellbeing/WeeklyChart.qml rename to quickshell/Modules/DDash/Wellbeing/WeeklyChart.qml index b66839e6a..c4a3e08ee 100644 --- a/quickshell/Modules/DankDash/Wellbeing/WeeklyChart.qml +++ b/quickshell/Modules/DDash/Wellbeing/WeeklyChart.qml @@ -5,7 +5,7 @@ import QtQuick.Shapes import qs.Common import qs.Services import qs.DCommon.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash import "Wellbeing.js" as Wellbeing DCard { diff --git a/quickshell/Modules/DankDash/Wellbeing/Wellbeing.js b/quickshell/Modules/DDash/Wellbeing/Wellbeing.js similarity index 100% rename from quickshell/Modules/DankDash/Wellbeing/Wellbeing.js rename to quickshell/Modules/DDash/Wellbeing/Wellbeing.js diff --git a/quickshell/Modules/DankDash/Wellbeing/WellbeingMetrics.qml b/quickshell/Modules/DDash/Wellbeing/WellbeingMetrics.qml similarity index 96% rename from quickshell/Modules/DankDash/Wellbeing/WellbeingMetrics.qml rename to quickshell/Modules/DDash/Wellbeing/WellbeingMetrics.qml index 381a51734..09c9b6d53 100644 --- a/quickshell/Modules/DankDash/Wellbeing/WellbeingMetrics.qml +++ b/quickshell/Modules/DDash/Wellbeing/WellbeingMetrics.qml @@ -3,7 +3,7 @@ pragma Singleton import QtQuick import Quickshell import qs.Common -import qs.Modules.DankDash +import qs.Modules.DDash import "Wellbeing.js" as Wellbeing Singleton { diff --git a/quickshell/Modules/DankDash/WellbeingTab.qml b/quickshell/Modules/DDash/WellbeingTab.qml similarity index 97% rename from quickshell/Modules/DankDash/WellbeingTab.qml rename to quickshell/Modules/DDash/WellbeingTab.qml index 6f54709bb..e8a04f2ab 100644 --- a/quickshell/Modules/DankDash/WellbeingTab.qml +++ b/quickshell/Modules/DDash/WellbeingTab.qml @@ -3,8 +3,8 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common import qs.Services -import qs.Modules.DankDash -import qs.Modules.DankDash.Wellbeing +import qs.Modules.DDash +import qs.Modules.DDash.Wellbeing import qs.Modules.ControlCenter.Widgets import "Wellbeing/Wellbeing.js" as Wellbeing diff --git a/quickshell/Modules/DankDash/utils/cards.js b/quickshell/Modules/DDash/utils/cards.js similarity index 100% rename from quickshell/Modules/DankDash/utils/cards.js rename to quickshell/Modules/DDash/utils/cards.js diff --git a/quickshell/Modules/DankDash/utils/options.js b/quickshell/Modules/DDash/utils/options.js similarity index 100% rename from quickshell/Modules/DankDash/utils/options.js rename to quickshell/Modules/DDash/utils/options.js diff --git a/quickshell/Modules/DankDash/utils/widgets.js b/quickshell/Modules/DDash/utils/widgets.js similarity index 100% rename from quickshell/Modules/DankDash/utils/widgets.js rename to quickshell/Modules/DDash/utils/widgets.js diff --git a/quickshell/Modules/DankIsland/Activities/ClipboardExpanded.qml b/quickshell/Modules/DIsland/Activities/ClipboardExpanded.qml similarity index 100% rename from quickshell/Modules/DankIsland/Activities/ClipboardExpanded.qml rename to quickshell/Modules/DIsland/Activities/ClipboardExpanded.qml diff --git a/quickshell/Modules/DankIsland/Activities/ControlCenterExpanded.qml b/quickshell/Modules/DIsland/Activities/ControlCenterExpanded.qml similarity index 100% rename from quickshell/Modules/DankIsland/Activities/ControlCenterExpanded.qml rename to quickshell/Modules/DIsland/Activities/ControlCenterExpanded.qml diff --git a/quickshell/Modules/DankIsland/Activities/DashTabFace.qml b/quickshell/Modules/DIsland/Activities/DashTabFace.qml similarity index 98% rename from quickshell/Modules/DankIsland/Activities/DashTabFace.qml rename to quickshell/Modules/DIsland/Activities/DashTabFace.qml index b2e9db94b..f1f5a4d98 100644 --- a/quickshell/Modules/DankIsland/Activities/DashTabFace.qml +++ b/quickshell/Modules/DIsland/Activities/DashTabFace.qml @@ -5,8 +5,8 @@ import qs.Common import qs.Services import qs.DCommon.Widgets import qs.Widgets -import qs.Modules.DankDash -import qs.Modules.DankDash.Overview +import qs.Modules.DDash +import qs.Modules.DDash.Overview FocusScope { id: root @@ -37,7 +37,7 @@ FocusScope { } } - readonly property DankPanelResizer panelResizer: DankPanelResizer { + readonly property DPanelResizer panelResizer: DPanelResizer { popout: root.resizeHost stepWidth: DashMetrics.preferredColumnWidth + DashMetrics.gridGap widthFor: columns => Math.min(root.controller.dashboardAvailableWidth, DashMetrics.widthFor(SettingsData.showWeekNumber, undefined, columns)) @@ -221,7 +221,7 @@ FocusScope { } } - DankGridEditChrome { + DGridEditChrome { id: panelChrome anchors.fill: parent diff --git a/quickshell/Modules/DankIsland/Activities/DestinationCompact.qml b/quickshell/Modules/DIsland/Activities/DestinationCompact.qml similarity index 100% rename from quickshell/Modules/DankIsland/Activities/DestinationCompact.qml rename to quickshell/Modules/DIsland/Activities/DestinationCompact.qml diff --git a/quickshell/Modules/DankIsland/Activities/DotCompact.qml b/quickshell/Modules/DIsland/Activities/DotCompact.qml similarity index 100% rename from quickshell/Modules/DankIsland/Activities/DotCompact.qml rename to quickshell/Modules/DIsland/Activities/DotCompact.qml diff --git a/quickshell/Modules/DankIsland/Activities/HomeCompact.qml b/quickshell/Modules/DIsland/Activities/HomeCompact.qml similarity index 99% rename from quickshell/Modules/DankIsland/Activities/HomeCompact.qml rename to quickshell/Modules/DIsland/Activities/HomeCompact.qml index 405dfdc28..a695079b2 100644 --- a/quickshell/Modules/DankIsland/Activities/HomeCompact.qml +++ b/quickshell/Modules/DIsland/Activities/HomeCompact.qml @@ -2,7 +2,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common -import qs.Modules.DankBar.Widgets +import qs.Modules.DBar.Widgets import qs.Services import qs.DCommon.Widgets import qs.Widgets diff --git a/quickshell/Modules/DankIsland/Activities/HomeExpanded.qml b/quickshell/Modules/DIsland/Activities/HomeExpanded.qml similarity index 97% rename from quickshell/Modules/DankIsland/Activities/HomeExpanded.qml rename to quickshell/Modules/DIsland/Activities/HomeExpanded.qml index 9fcae03df..1180df5a9 100644 --- a/quickshell/Modules/DankIsland/Activities/HomeExpanded.qml +++ b/quickshell/Modules/DIsland/Activities/HomeExpanded.qml @@ -2,7 +2,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common -import qs.Modules.DankDash +import qs.Modules.DDash DashTabFace { id: root diff --git a/quickshell/Modules/DankIsland/Activities/IslandSlotHoverArea.qml b/quickshell/Modules/DIsland/Activities/IslandSlotHoverArea.qml similarity index 100% rename from quickshell/Modules/DankIsland/Activities/IslandSlotHoverArea.qml rename to quickshell/Modules/DIsland/Activities/IslandSlotHoverArea.qml diff --git a/quickshell/Modules/DankIsland/Activities/LauncherExpanded.qml b/quickshell/Modules/DIsland/Activities/LauncherExpanded.qml similarity index 99% rename from quickshell/Modules/DankIsland/Activities/LauncherExpanded.qml rename to quickshell/Modules/DIsland/Activities/LauncherExpanded.qml index 1472566ae..fb67101c0 100644 --- a/quickshell/Modules/DankIsland/Activities/LauncherExpanded.qml +++ b/quickshell/Modules/DIsland/Activities/LauncherExpanded.qml @@ -2,7 +2,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common -import qs.Modals.DankLauncherV2 +import qs.Modals.DLauncherV2 FocusScope { id: root diff --git a/quickshell/Modules/DankIsland/Activities/MediaCompact.qml b/quickshell/Modules/DIsland/Activities/MediaCompact.qml similarity index 100% rename from quickshell/Modules/DankIsland/Activities/MediaCompact.qml rename to quickshell/Modules/DIsland/Activities/MediaCompact.qml diff --git a/quickshell/Modules/DankIsland/Activities/MediaExpanded.qml b/quickshell/Modules/DIsland/Activities/MediaExpanded.qml similarity index 88% rename from quickshell/Modules/DankIsland/Activities/MediaExpanded.qml rename to quickshell/Modules/DIsland/Activities/MediaExpanded.qml index 08f2328b0..fb3df322a 100644 --- a/quickshell/Modules/DankIsland/Activities/MediaExpanded.qml +++ b/quickshell/Modules/DIsland/Activities/MediaExpanded.qml @@ -1,7 +1,7 @@ pragma ComponentBehavior: Bound import QtQuick -import qs.Modules.DankDash +import qs.Modules.DDash DashTabFace { id: root diff --git a/quickshell/Modules/DankIsland/Activities/NotificationCenterExpanded.qml b/quickshell/Modules/DIsland/Activities/NotificationCenterExpanded.qml similarity index 94% rename from quickshell/Modules/DankIsland/Activities/NotificationCenterExpanded.qml rename to quickshell/Modules/DIsland/Activities/NotificationCenterExpanded.qml index 832a56f1d..a72881297 100644 --- a/quickshell/Modules/DankIsland/Activities/NotificationCenterExpanded.qml +++ b/quickshell/Modules/DIsland/Activities/NotificationCenterExpanded.qml @@ -1,7 +1,7 @@ pragma ComponentBehavior: Bound import QtQuick -import qs.Modules.DankDash +import qs.Modules.DDash DashTabFace { id: root diff --git a/quickshell/Modules/DankIsland/Activities/NotificationCompact.qml b/quickshell/Modules/DIsland/Activities/NotificationCompact.qml similarity index 100% rename from quickshell/Modules/DankIsland/Activities/NotificationCompact.qml rename to quickshell/Modules/DIsland/Activities/NotificationCompact.qml diff --git a/quickshell/Modules/DankIsland/Activities/NotificationExpanded.qml b/quickshell/Modules/DIsland/Activities/NotificationExpanded.qml similarity index 100% rename from quickshell/Modules/DankIsland/Activities/NotificationExpanded.qml rename to quickshell/Modules/DIsland/Activities/NotificationExpanded.qml diff --git a/quickshell/Modules/DankIsland/Activities/SystemLevelCompact.qml b/quickshell/Modules/DIsland/Activities/SystemLevelCompact.qml similarity index 100% rename from quickshell/Modules/DankIsland/Activities/SystemLevelCompact.qml rename to quickshell/Modules/DIsland/Activities/SystemLevelCompact.qml diff --git a/quickshell/Modules/DankIsland/Activities/SystemLevelExpanded.qml b/quickshell/Modules/DIsland/Activities/SystemLevelExpanded.qml similarity index 100% rename from quickshell/Modules/DankIsland/Activities/SystemLevelExpanded.qml rename to quickshell/Modules/DIsland/Activities/SystemLevelExpanded.qml diff --git a/quickshell/Modules/DankIsland/Activities/SystemStateCompact.qml b/quickshell/Modules/DIsland/Activities/SystemStateCompact.qml similarity index 100% rename from quickshell/Modules/DankIsland/Activities/SystemStateCompact.qml rename to quickshell/Modules/DIsland/Activities/SystemStateCompact.qml diff --git a/quickshell/Modules/DankIsland/Activities/WallpaperExpanded.qml b/quickshell/Modules/DIsland/Activities/WallpaperExpanded.qml similarity index 97% rename from quickshell/Modules/DankIsland/Activities/WallpaperExpanded.qml rename to quickshell/Modules/DIsland/Activities/WallpaperExpanded.qml index de7463ef1..aefab9cd3 100644 --- a/quickshell/Modules/DankIsland/Activities/WallpaperExpanded.qml +++ b/quickshell/Modules/DIsland/Activities/WallpaperExpanded.qml @@ -1,7 +1,7 @@ pragma ComponentBehavior: Bound import QtQuick -import qs.Modules.DankDash +import qs.Modules.DDash DashTabFace { id: root diff --git a/quickshell/Modules/DankIsland/Activities/WeatherExpanded.qml b/quickshell/Modules/DIsland/Activities/WeatherExpanded.qml similarity index 94% rename from quickshell/Modules/DankIsland/Activities/WeatherExpanded.qml rename to quickshell/Modules/DIsland/Activities/WeatherExpanded.qml index 7ae795434..162c77298 100644 --- a/quickshell/Modules/DankIsland/Activities/WeatherExpanded.qml +++ b/quickshell/Modules/DIsland/Activities/WeatherExpanded.qml @@ -1,7 +1,7 @@ pragma ComponentBehavior: Bound import QtQuick -import qs.Modules.DankDash +import qs.Modules.DDash DashTabFace { id: root diff --git a/quickshell/Modules/DankIsland/DankIsland.qml b/quickshell/Modules/DIsland/DIsland.qml similarity index 99% rename from quickshell/Modules/DankIsland/DankIsland.qml rename to quickshell/Modules/DIsland/DIsland.qml index b695a3561..661650efc 100644 --- a/quickshell/Modules/DankIsland/DankIsland.qml +++ b/quickshell/Modules/DIsland/DIsland.qml @@ -292,7 +292,7 @@ Item { model: root.hostSlots - delegate: DankIslandHostWindow { + delegate: DIslandHostWindow { required property var modelData readonly property var identity: JSON.parse(modelData) diff --git a/quickshell/Modules/DankIsland/DankIslandHostWindow.qml b/quickshell/Modules/DIsland/DIslandHostWindow.qml similarity index 100% rename from quickshell/Modules/DankIsland/DankIslandHostWindow.qml rename to quickshell/Modules/DIsland/DIslandHostWindow.qml diff --git a/quickshell/Modules/DankIsland/DankIslandSurface.qml b/quickshell/Modules/DIsland/DIslandSurface.qml similarity index 99% rename from quickshell/Modules/DankIsland/DankIslandSurface.qml rename to quickshell/Modules/DIsland/DIslandSurface.qml index 73958ebfd..5c74bff9b 100644 --- a/quickshell/Modules/DankIsland/DankIslandSurface.qml +++ b/quickshell/Modules/DIsland/DIslandSurface.qml @@ -3,8 +3,8 @@ pragma ComponentBehavior: Bound import qs.Modules.SurfaceWidgets import QtQuick import qs.Common -import qs.Modules.DankDash -import qs.Modules.DankIsland.Activities +import qs.Modules.DDash +import qs.Modules.DIsland.Activities import qs.Services import qs.Widgets diff --git a/quickshell/Modules/DankIsland/IslandBarHost.qml b/quickshell/Modules/DIsland/IslandBarHost.qml similarity index 99% rename from quickshell/Modules/DankIsland/IslandBarHost.qml rename to quickshell/Modules/DIsland/IslandBarHost.qml index 7900150f9..6000a08a8 100644 --- a/quickshell/Modules/DankIsland/IslandBarHost.qml +++ b/quickshell/Modules/DIsland/IslandBarHost.qml @@ -3,9 +3,9 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common import Quickshell.Wayland -import qs.Modals.DankLauncherV2 as DankLauncher -import qs.Modules.DankBar -import qs.Modules.DankIsland.Activities +import qs.Modals.DLauncherV2 as DLauncher +import qs.Modules.DBar +import qs.Modules.DIsland.Activities import qs.Services import qs.Widgets import "../../Common/LayoutResolver.js" as Resolver @@ -401,7 +401,7 @@ Item { hoverCloseDelay: Math.max(0, Math.min(root.maxHoverDelay, root.setting("islandHoverCloseDelay"))) } - DankLauncher.Controller { + DLauncher.Controller { id: launcherController active: controller.launcherSessionActive @@ -435,7 +435,7 @@ Item { enabled: !root.setting("islandNotificationPopups") && root.barConfig?.visible !== false } - DankIslandSurface { + DIslandSurface { id: surface anchors.fill: parent diff --git a/quickshell/Modules/DankIsland/IslandContentHost.qml b/quickshell/Modules/DIsland/IslandContentHost.qml similarity index 100% rename from quickshell/Modules/DankIsland/IslandContentHost.qml rename to quickshell/Modules/DIsland/IslandContentHost.qml diff --git a/quickshell/Modules/DankIsland/IslandController.qml b/quickshell/Modules/DIsland/IslandController.qml similarity index 99% rename from quickshell/Modules/DankIsland/IslandController.qml rename to quickshell/Modules/DIsland/IslandController.qml index a635ecfb4..fcad2f802 100644 --- a/quickshell/Modules/DankIsland/IslandController.qml +++ b/quickshell/Modules/DIsland/IslandController.qml @@ -3,10 +3,10 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common import qs.Modals.Clipboard -import qs.Modals.DankLauncherV2.Components +import qs.Modals.DLauncherV2.Components import qs.Modules.ControlCenter -import qs.Modules.DankBar -import qs.Modules.DankDash +import qs.Modules.DBar +import qs.Modules.DDash QtObject { id: root diff --git a/quickshell/Modules/DankIsland/IslandFreeDragArea.qml b/quickshell/Modules/DIsland/IslandFreeDragArea.qml similarity index 100% rename from quickshell/Modules/DankIsland/IslandFreeDragArea.qml rename to quickshell/Modules/DIsland/IslandFreeDragArea.qml diff --git a/quickshell/Modules/DankIsland/IslandFreeHostWindow.qml b/quickshell/Modules/DIsland/IslandFreeHostWindow.qml similarity index 100% rename from quickshell/Modules/DankIsland/IslandFreeHostWindow.qml rename to quickshell/Modules/DIsland/IslandFreeHostWindow.qml diff --git a/quickshell/Modules/DankIsland/IslandHostChrome.qml b/quickshell/Modules/DIsland/IslandHostChrome.qml similarity index 97% rename from quickshell/Modules/DankIsland/IslandHostChrome.qml rename to quickshell/Modules/DIsland/IslandHostChrome.qml index 4f7b614bb..6f7e12108 100644 --- a/quickshell/Modules/DankIsland/IslandHostChrome.qml +++ b/quickshell/Modules/DIsland/IslandHostChrome.qml @@ -2,7 +2,7 @@ import QtQuick import Quickshell.Wayland import qs.Widgets -DankFocusGrab { +DFocusGrab { id: root required property var window diff --git a/quickshell/Modules/DankIsland/IslandHostRegistry.qml b/quickshell/Modules/DIsland/IslandHostRegistry.qml similarity index 100% rename from quickshell/Modules/DankIsland/IslandHostRegistry.qml rename to quickshell/Modules/DIsland/IslandHostRegistry.qml diff --git a/quickshell/Modules/DankIsland/IslandMediaSource.qml b/quickshell/Modules/DIsland/IslandMediaSource.qml similarity index 100% rename from quickshell/Modules/DankIsland/IslandMediaSource.qml rename to quickshell/Modules/DIsland/IslandMediaSource.qml diff --git a/quickshell/Modules/DankIsland/IslandNotificationSource.qml b/quickshell/Modules/DIsland/IslandNotificationSource.qml similarity index 100% rename from quickshell/Modules/DankIsland/IslandNotificationSource.qml rename to quickshell/Modules/DIsland/IslandNotificationSource.qml diff --git a/quickshell/Modules/DankIsland/IslandSystemSource.qml b/quickshell/Modules/DIsland/IslandSystemSource.qml similarity index 100% rename from quickshell/Modules/DankIsland/IslandSystemSource.qml rename to quickshell/Modules/DIsland/IslandSystemSource.qml diff --git a/quickshell/Modules/Dock/DockBody.qml b/quickshell/Modules/Dock/DockBody.qml index 4b9ab06bd..cbb1b7c1b 100644 --- a/quickshell/Modules/Dock/DockBody.qml +++ b/quickshell/Modules/Dock/DockBody.qml @@ -4,8 +4,8 @@ import qs.Common import qs.Services import qs.Widgets import qs.Modules.SurfaceWidgets -import qs.Modules.DankBar -import qs.Modules.DankBar.Widgets as BarWidgets +import qs.Modules.DBar +import qs.Modules.DBar.Widgets as BarWidgets import qs.Modules.ControlCenter.Widgets import "../../Common/settings/DockConfig.js" as DockConfig @@ -579,7 +579,7 @@ FocusScope { readonly property var hoveredButton: widgetStrip.hoveredButton - DankTooltip { + DTooltip { id: dockTooltip targetScreen: dock.screen } diff --git a/quickshell/Modules/Frame/FrameBarHost.qml b/quickshell/Modules/Frame/FrameBarHost.qml index 2061ae39a..39ee5cbf8 100644 --- a/quickshell/Modules/Frame/FrameBarHost.qml +++ b/quickshell/Modules/Frame/FrameBarHost.qml @@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import Quickshell import qs.Common -import qs.Modules.DankBar +import qs.Modules.DBar import qs.Services Item { @@ -64,7 +64,7 @@ Item { anchors.fill: parent active: slot.dankBarItem !== null && slot.slotBarConfig !== null - sourceComponent: DankBarBody { + sourceComponent: DBarBody { hostWindow: host.frameWindow modelData: host.targetScreen rootWindow: slot.dankBarItem diff --git a/quickshell/Modules/Frame/FrameWindow.qml b/quickshell/Modules/Frame/FrameWindow.qml index 232212f2a..e9f5476ee 100644 --- a/quickshell/Modules/Frame/FrameWindow.qml +++ b/quickshell/Modules/Frame/FrameWindow.qml @@ -4,7 +4,7 @@ import QtQuick import Quickshell import Quickshell.Wayland import qs.Common -import qs.Modules.DankIsland +import qs.Modules.DIsland import qs.Services import "../../Common/ConnectorGeometry.js" as ConnectorGeometry import "../../Common/ConnectedSurfaceGeometry.js" as SurfaceGeometry diff --git a/quickshell/Modules/Greetd/GreeterContent.qml b/quickshell/Modules/Greetd/GreeterContent.qml index b70d4c5bc..f5ebec661 100644 --- a/quickshell/Modules/Greetd/GreeterContent.qml +++ b/quickshell/Modules/Greetd/GreeterContent.qml @@ -625,7 +625,7 @@ Item { return hasCustomWallpaper ? "Fill" : SessionData.getMonitorWallpaperFillMode(screenName); } - DankBackdrop { + DBackdrop { anchors.fill: parent screenName: root.screenName blur: Theme.lockScreenBlur @@ -1287,7 +1287,7 @@ Item { } } - DankDropdown { + DDropdown { id: sessionDropdown anchors.fill: parent text: "" diff --git a/quickshell/Modules/Lock/LockScreenBackground.qml b/quickshell/Modules/Lock/LockScreenBackground.qml index cc1638c36..730be50ab 100644 --- a/quickshell/Modules/Lock/LockScreenBackground.qml +++ b/quickshell/Modules/Lock/LockScreenBackground.qml @@ -37,7 +37,7 @@ Item { } asynchronous: false - sourceComponent: DankBackdrop { + sourceComponent: DBackdrop { screenName: root.screenName blur: Theme.lockScreenBlur blurMax: Theme.lockScreenBlurMax diff --git a/quickshell/Modules/Lock/Widgets/GreeterSessionWidget.qml b/quickshell/Modules/Lock/Widgets/GreeterSessionWidget.qml index 5e568a5d6..48628887e 100644 --- a/quickshell/Modules/Lock/Widgets/GreeterSessionWidget.qml +++ b/quickshell/Modules/Lock/Widgets/GreeterSessionWidget.qml @@ -24,7 +24,7 @@ Item { text: root.sessionName } - DankDropdown { + DDropdown { anchors.fill: parent text: "" description: "" diff --git a/quickshell/Modules/Notepad/Notepad.qml b/quickshell/Modules/Notepad/Notepad.qml index 67182ed03..002f43bde 100644 --- a/quickshell/Modules/Notepad/Notepad.qml +++ b/quickshell/Modules/Notepad/Notepad.qml @@ -692,7 +692,7 @@ Item { id: confirmationDialogLoader active: false - DankModal { + DModal { id: confirmationDialog modalWidth: 400 diff --git a/quickshell/Modules/Notepad/NotepadPopoutWindow.qml b/quickshell/Modules/Notepad/NotepadPopoutWindow.qml index e9893d6cd..b2372045d 100644 --- a/quickshell/Modules/Notepad/NotepadPopoutWindow.qml +++ b/quickshell/Modules/Notepad/NotepadPopoutWindow.qml @@ -5,7 +5,7 @@ import qs.DCommon.Widgets import qs.Widgets import qs.Modules.Notepad -DankFloatingWindow { +DFloatingWindow { id: win property alias shouldBeVisible: win.visible diff --git a/quickshell/Modules/Notepad/NotepadSettings.qml b/quickshell/Modules/Notepad/NotepadSettings.qml index 6415d8c0d..0ee5eb3f4 100644 --- a/quickshell/Modules/Notepad/NotepadSettings.qml +++ b/quickshell/Modules/Notepad/NotepadSettings.qml @@ -235,7 +235,7 @@ Item { color: "transparent" visible: !SettingsData.notepadUseMonospace - DankDropdown { + DDropdown { id: fontDropdown anchors.left: parent.left anchors.leftMargin: -Theme.spacingM @@ -539,7 +539,7 @@ Item { anchors.top: shortcutsHeader.bottom anchors.horizontalCenter: parent.horizontalCenter - sourceComponent: DankKeyHints { + sourceComponent: DKeyHints { hints: [ { keys: ["Ctrl+S"], diff --git a/quickshell/Modules/Notifications/Center/NotificationCard.qml b/quickshell/Modules/Notifications/Center/NotificationCard.qml index 4e4788d9a..cb82eac8f 100644 --- a/quickshell/Modules/Notifications/Center/NotificationCard.qml +++ b/quickshell/Modules/Notifications/Center/NotificationCard.qml @@ -247,7 +247,7 @@ Item { onAppMuted: NotificationService.dismissGroup(root.notificationGroup?.key || "") } - DankDropdown { + DDropdown { id: notificationCardContextMenu showTrigger: false popupWidth: NotificationMetrics.menuWidth diff --git a/quickshell/Modules/Notifications/Center/NotificationCenterPopout.qml b/quickshell/Modules/Notifications/Center/NotificationCenterPopout.qml index e247457ae..7dd190d61 100644 --- a/quickshell/Modules/Notifications/Center/NotificationCenterPopout.qml +++ b/quickshell/Modules/Notifications/Center/NotificationCenterPopout.qml @@ -4,7 +4,7 @@ import qs.Modules.Notifications import qs.Services import qs.Widgets -DankPopout { +DPopout { id: root layerNamespace: "dms:notification-center-popout" diff --git a/quickshell/Modules/Notifications/Center/NotificationHeader.qml b/quickshell/Modules/Notifications/Center/NotificationHeader.qml index cbbcdd3e1..334808954 100644 --- a/quickshell/Modules/Notifications/Center/NotificationHeader.qml +++ b/quickshell/Modules/Notifications/Center/NotificationHeader.qml @@ -155,7 +155,7 @@ Item { } } - DankDropdown { + DDropdown { id: durationMenu showTrigger: false popupAnchorItem: dndButton diff --git a/quickshell/Modules/Notifications/Center/NotificationKeyboardHints.qml b/quickshell/Modules/Notifications/Center/NotificationKeyboardHints.qml index 73f2a115f..660a0f1dd 100644 --- a/quickshell/Modules/Notifications/Center/NotificationKeyboardHints.qml +++ b/quickshell/Modules/Notifications/Center/NotificationKeyboardHints.qml @@ -27,7 +27,7 @@ Rectangle { anchors.margins: Theme.spacingM active: root.visible - sourceComponent: DankKeyHints { + sourceComponent: DKeyHints { hints: { const listHints = root.historyTab ? [] : [ { diff --git a/quickshell/Modules/Notifications/NotificationContextMenu.qml b/quickshell/Modules/Notifications/NotificationContextMenu.qml index 3335c788f..6afbe8f7c 100644 --- a/quickshell/Modules/Notifications/NotificationContextMenu.qml +++ b/quickshell/Modules/Notifications/NotificationContextMenu.qml @@ -4,7 +4,7 @@ import qs.Modules.Notifications import qs.Services import qs.Widgets -DankContextMenu { +DContextMenu { id: root property alias appName: actions.appName diff --git a/quickshell/Modules/OSD/AudioOutputOSD.qml b/quickshell/Modules/OSD/AudioOutputOSD.qml index 09f6d8382..e5f4ce49d 100644 --- a/quickshell/Modules/OSD/AudioOutputOSD.qml +++ b/quickshell/Modules/OSD/AudioOutputOSD.qml @@ -4,7 +4,7 @@ import qs.Services import qs.DCommon.Widgets import qs.Widgets -DankOSD { +DOSD { id: root osdKind: "audioOutput" diff --git a/quickshell/Modules/OSD/CapsLockOSD.qml b/quickshell/Modules/OSD/CapsLockOSD.qml index a6830cec3..aa9c38ffc 100644 --- a/quickshell/Modules/OSD/CapsLockOSD.qml +++ b/quickshell/Modules/OSD/CapsLockOSD.qml @@ -3,7 +3,7 @@ import qs.Common import qs.Services import qs.Widgets -DankOSD { +DOSD { id: root osdKind: "capsLock" diff --git a/quickshell/Modules/OSD/IdleInhibitorOSD.qml b/quickshell/Modules/OSD/IdleInhibitorOSD.qml index de4292b72..13cd2029f 100644 --- a/quickshell/Modules/OSD/IdleInhibitorOSD.qml +++ b/quickshell/Modules/OSD/IdleInhibitorOSD.qml @@ -3,7 +3,7 @@ import qs.Common import qs.Services import qs.Widgets -DankOSD { +DOSD { id: root osdKind: "idleInhibitor" diff --git a/quickshell/Modules/OSD/LevelOSD.qml b/quickshell/Modules/OSD/LevelOSD.qml index 57eff4f4d..224ecc352 100644 --- a/quickshell/Modules/OSD/LevelOSD.qml +++ b/quickshell/Modules/OSD/LevelOSD.qml @@ -5,7 +5,7 @@ import qs.Common import qs.Modules.ControlCenter import qs.Widgets -DankOSD { +DOSD { id: root property string iconName: "" @@ -78,7 +78,7 @@ DankOSD { Loader { id: endIconTooltip active: false - sourceComponent: DankTooltip {} + sourceComponent: DTooltip {} } content: OsdLevelRow { diff --git a/quickshell/Modules/OSD/MediaPlaybackOSD.qml b/quickshell/Modules/OSD/MediaPlaybackOSD.qml index 2476c5d1b..d360b5f18 100644 --- a/quickshell/Modules/OSD/MediaPlaybackOSD.qml +++ b/quickshell/Modules/OSD/MediaPlaybackOSD.qml @@ -7,7 +7,7 @@ import qs.Widgets import Quickshell.Services.Mpris import Quickshell.Widgets -DankOSD { +DOSD { id: root osdKind: "mediaPlayback" diff --git a/quickshell/Modules/OSD/PowerProfileOSD.qml b/quickshell/Modules/OSD/PowerProfileOSD.qml index d117ad58b..eda2e4134 100644 --- a/quickshell/Modules/OSD/PowerProfileOSD.qml +++ b/quickshell/Modules/OSD/PowerProfileOSD.qml @@ -3,7 +3,7 @@ import qs.Common import qs.Services import qs.Widgets -DankOSD { +DOSD { id: root osdKind: "powerProfile" diff --git a/quickshell/Modules/OSD/WorkspaceOSD.qml b/quickshell/Modules/OSD/WorkspaceOSD.qml index ce80ff3f2..693f9eb2d 100644 --- a/quickshell/Modules/OSD/WorkspaceOSD.qml +++ b/quickshell/Modules/OSD/WorkspaceOSD.qml @@ -7,7 +7,7 @@ import qs.Services import qs.DCommon.Widgets import qs.Widgets -DankOSD { +DOSD { id: root osdKind: "workspace" diff --git a/quickshell/Modules/Plugins/DashCardComponent.qml b/quickshell/Modules/Plugins/DashCardComponent.qml index f36b4584b..c52c0e425 100644 --- a/quickshell/Modules/Plugins/DashCardComponent.qml +++ b/quickshell/Modules/Plugins/DashCardComponent.qml @@ -1,6 +1,6 @@ import QtQuick import qs.Common -import qs.Modules.DankDash.Overview +import qs.Modules.DDash.Overview Card { id: root diff --git a/quickshell/Modules/Plugins/DashTabComponent.qml b/quickshell/Modules/Plugins/DashTabComponent.qml index 349aa51ab..a426daad3 100644 --- a/quickshell/Modules/Plugins/DashTabComponent.qml +++ b/quickshell/Modules/Plugins/DashTabComponent.qml @@ -1,6 +1,6 @@ import QtQuick import qs.Common -import qs.Modules.DankDash +import qs.Modules.DDash Item { id: root diff --git a/quickshell/Modules/Plugins/PluginPopout.qml b/quickshell/Modules/Plugins/PluginPopout.qml index 9aa8787bc..e7977f796 100644 --- a/quickshell/Modules/Plugins/PluginPopout.qml +++ b/quickshell/Modules/Plugins/PluginPopout.qml @@ -2,7 +2,7 @@ import QtQuick import qs.Common import qs.Widgets -DankPopout { +DPopout { id: root layerNamespace: "dms:plugins:" + layerNamespacePlugin diff --git a/quickshell/Modules/Plugins/SelectionSetting.qml b/quickshell/Modules/Plugins/SelectionSetting.qml index a04d388e9..6b0ff35e7 100644 --- a/quickshell/Modules/Plugins/SelectionSetting.qml +++ b/quickshell/Modules/Plugins/SelectionSetting.qml @@ -1,5 +1,6 @@ import QtQuick import qs.Common +import qs.DCommon.Widgets import qs.Widgets import "../../Common/QmlUtils.js" as QmlUtils @@ -68,7 +69,7 @@ Column { } } - DankDropdown { + DDropdown { downKeyOpens: false width: parent.width text: root.label diff --git a/quickshell/Modules/Plugins/WidgetEditItem.qml b/quickshell/Modules/Plugins/WidgetEditItem.qml index 1a45b3ca2..d10e90191 100644 --- a/quickshell/Modules/Plugins/WidgetEditItem.qml +++ b/quickshell/Modules/Plugins/WidgetEditItem.qml @@ -200,7 +200,7 @@ Item { } } - DankGridEditChrome { + DGridEditChrome { id: chrome property real startWidth diff --git a/quickshell/Modules/Plugins/WidgetEditorOverlay.qml b/quickshell/Modules/Plugins/WidgetEditorOverlay.qml index 5155c6b6d..10079203e 100644 --- a/quickshell/Modules/Plugins/WidgetEditorOverlay.qml +++ b/quickshell/Modules/Plugins/WidgetEditorOverlay.qml @@ -5,7 +5,7 @@ import qs.Common import qs.Services import qs.DCommon.Widgets import qs.Modules.ControlCenter.Widgets -import qs.Modules.DankDash.Overview +import qs.Modules.DDash.Overview import qs.Modules.Settings.DesktopWidgetSettings import qs.Modules.Settings.Widgets diff --git a/quickshell/Modules/ProcessList/ProcessListPopout.qml b/quickshell/Modules/ProcessList/ProcessListPopout.qml index e7474066e..5ecbcd1f1 100644 --- a/quickshell/Modules/ProcessList/ProcessListPopout.qml +++ b/quickshell/Modules/ProcessList/ProcessListPopout.qml @@ -6,7 +6,7 @@ import qs.Services import qs.DCommon.Widgets import qs.Widgets -DankPopout { +DPopout { id: processListPopout layerNamespace: "dms:process-list-popout" diff --git a/quickshell/Modules/Settings/BarWidgetTab.qml b/quickshell/Modules/Settings/BarWidgetTab.qml index 0e32a0905..1d2275258 100644 --- a/quickshell/Modules/Settings/BarWidgetTab.qml +++ b/quickshell/Modules/Settings/BarWidgetTab.qml @@ -6,7 +6,7 @@ import qs.Services import qs.DCommon.Widgets import qs.Modules.Settings.Widgets import "../../Common/settings/DockConfig.js" as DockConfig -import "../DankBar/OverflowLayout.js" as OverflowLayout +import "../DBar/OverflowLayout.js" as OverflowLayout Item { id: root diff --git a/quickshell/Modules/Settings/BatteryTab.qml b/quickshell/Modules/Settings/BatteryTab.qml index 23c5f4112..5b8e8fc03 100644 --- a/quickshell/Modules/Settings/BatteryTab.qml +++ b/quickshell/Modules/Settings/BatteryTab.qml @@ -4,7 +4,7 @@ import qs.Common import qs.Services import qs.DCommon.Widgets import qs.Modules.Settings.Widgets -import qs.Modules.DankBar.Popouts +import qs.Modules.DBar.Popouts Item { id: root diff --git a/quickshell/Modules/Settings/DankBarAppearanceTab.qml b/quickshell/Modules/Settings/DBarAppearanceTab.qml similarity index 100% rename from quickshell/Modules/Settings/DankBarAppearanceTab.qml rename to quickshell/Modules/Settings/DBarAppearanceTab.qml diff --git a/quickshell/Modules/Settings/DankBarTab.qml b/quickshell/Modules/Settings/DBarTab.qml similarity index 100% rename from quickshell/Modules/Settings/DankBarTab.qml rename to quickshell/Modules/Settings/DBarTab.qml diff --git a/quickshell/Modules/Settings/DankDashTab.qml b/quickshell/Modules/Settings/DDashTab.qml similarity index 99% rename from quickshell/Modules/Settings/DankDashTab.qml rename to quickshell/Modules/Settings/DDashTab.qml index e3e777ecf..32eab29a6 100644 --- a/quickshell/Modules/Settings/DankDashTab.qml +++ b/quickshell/Modules/Settings/DDashTab.qml @@ -6,8 +6,8 @@ import qs.Common import qs.Services import qs.DCommon.Widgets import qs.Modules.Settings.Widgets -import qs.Modules.DankDash -import qs.Modules.DankDash.Overview +import qs.Modules.DDash +import qs.Modules.DDash.Overview FocusScope { id: root diff --git a/quickshell/Modules/Settings/DankDotTab.qml b/quickshell/Modules/Settings/DDotTab.qml similarity index 100% rename from quickshell/Modules/Settings/DankDotTab.qml rename to quickshell/Modules/Settings/DDotTab.qml diff --git a/quickshell/Modules/Settings/DigitalWellbeingTab.qml b/quickshell/Modules/Settings/DigitalWellbeingTab.qml index 6100521e8..1a297412e 100644 --- a/quickshell/Modules/Settings/DigitalWellbeingTab.qml +++ b/quickshell/Modules/Settings/DigitalWellbeingTab.qml @@ -7,8 +7,8 @@ import qs.DCommon.Widgets import qs.Modals.Common import qs.Modules.Settings.Widgets import qs.Modules.ControlCenter.Widgets -import qs.Modules.DankDash.Wellbeing -import "../DankDash/Wellbeing/Wellbeing.js" as Wellbeing +import qs.Modules.DDash.Wellbeing +import "../DDash/Wellbeing/Wellbeing.js" as Wellbeing Item { id: root diff --git a/quickshell/Modules/Settings/DisplayConfig/ICCProfileInfoModal.qml b/quickshell/Modules/Settings/DisplayConfig/ICCProfileInfoModal.qml index 3db201eed..7cf1a5ac8 100644 --- a/quickshell/Modules/Settings/DisplayConfig/ICCProfileInfoModal.qml +++ b/quickshell/Modules/Settings/DisplayConfig/ICCProfileInfoModal.qml @@ -4,7 +4,7 @@ import qs.Modals.Common import qs.Services import qs.DCommon.Widgets -DankModal { +DModal { id: root layerNamespace: "dms:icc-profile-info" diff --git a/quickshell/Modules/Settings/DisplayConfig/OutputCard.qml b/quickshell/Modules/Settings/DisplayConfig/OutputCard.qml index 2586794b1..cf7d3b5f1 100644 --- a/quickshell/Modules/Settings/DisplayConfig/OutputCard.qml +++ b/quickshell/Modules/Settings/DisplayConfig/OutputCard.qml @@ -155,7 +155,7 @@ Column { title: I18n.tr("Scale") onCurrentLabelChanged: scaleDropdown.currentValue = currentLabel - DankDropdown { + DDropdown { id: scaleDropdown downKeyOpens: false backgroundColor: SettingsMetrics.controlSurface diff --git a/quickshell/Modules/Settings/DisplayConfigTab.qml b/quickshell/Modules/Settings/DisplayConfigTab.qml index 9d904d9fa..11c1d85e1 100644 --- a/quickshell/Modules/Settings/DisplayConfigTab.qml +++ b/quickshell/Modules/Settings/DisplayConfigTab.qml @@ -139,7 +139,7 @@ Item { spacing: Theme.spacingS opacity: SettingsData.displayProfileAutoSelect ? 0.4 : 1.0 - DankDropdown { + DDropdown { id: profileDropdown downKeyOpens: false backgroundColor: SettingsMetrics.controlSurface diff --git a/quickshell/Modules/Settings/KeybindEditorDialog.qml b/quickshell/Modules/Settings/KeybindEditorDialog.qml index f0223ca3b..58522298d 100644 --- a/quickshell/Modules/Settings/KeybindEditorDialog.qml +++ b/quickshell/Modules/Settings/KeybindEditorDialog.qml @@ -925,7 +925,7 @@ DDialog { SettingsRow { visible: root.actionType === "dms" - body: DankDropdown { + body: DDropdown { id: dmsActionDropdown width: parent.width compactMode: true @@ -950,7 +950,7 @@ DDialog { width: parent.width spacing: Theme.spacingS - DankDropdown { + DDropdown { id: compositorCategoryDropdown width: Math.round((parent.width - parent.spacing) / 3) compactMode: true @@ -958,7 +958,7 @@ DDialog { onValueChanged: value => root.selectCompositorCategory(value) } - DankDropdown { + DDropdown { id: compositorActionDropdown visible: !root.useCustomCompositor width: parent.width - compositorCategoryDropdown.width - parent.spacing @@ -1091,7 +1091,7 @@ DDialog { visible: root.showDmsArgs && root.dmsArgDefs.some(arg => arg.name === "tab") title: I18n.tr("Tab", "noun, keybind argument label for a dashboard tab") - DankDropdown { + DDropdown { id: dashTabDropdown compactMode: true options: [I18n.tr("Overview"), I18n.tr("Media"), I18n.tr("Wallpaper"), I18n.tr("Weather")] diff --git a/quickshell/Modules/Settings/MediaPlayerTab.qml b/quickshell/Modules/Settings/MediaPlayerTab.qml index 15afe8dc7..8dab5e9fe 100644 --- a/quickshell/Modules/Settings/MediaPlayerTab.qml +++ b/quickshell/Modules/Settings/MediaPlayerTab.qml @@ -3,7 +3,7 @@ import Quickshell.Io import qs.Common import qs.DCommon.Widgets import qs.Modules.Settings.Widgets -import qs.Modules.DankDash +import qs.Modules.DDash import qs.Services Item { diff --git a/quickshell/Modules/Settings/NotificationRuleEditorDialog.qml b/quickshell/Modules/Settings/NotificationRuleEditorDialog.qml index e58dd38e9..d6a5712a0 100644 --- a/quickshell/Modules/Settings/NotificationRuleEditorDialog.qml +++ b/quickshell/Modules/Settings/NotificationRuleEditorDialog.qml @@ -99,7 +99,7 @@ DDialog { width: parent.width spacing: Theme.spacingS - DankDropdown { + DDropdown { id: fieldDropdown width: Math.round(parent.width / 3) anchors.verticalCenter: parent.verticalCenter @@ -109,7 +109,7 @@ DDialog { onValueChanged: value => root.ruleField = root.valueOf(root.fieldOptions, value) } - DankDropdown { + DDropdown { id: matchTypeDropdown width: Math.round(parent.width / 4) anchors.verticalCenter: parent.verticalCenter diff --git a/quickshell/Modules/Settings/PluginBrowser.qml b/quickshell/Modules/Settings/PluginBrowser.qml index eb10d8355..373c3f6d0 100644 --- a/quickshell/Modules/Settings/PluginBrowser.qml +++ b/quickshell/Modules/Settings/PluginBrowser.qml @@ -696,7 +696,7 @@ RegistryBrowserWindow { Layout.alignment: Qt.AlignVCenter } - DankDropdown { + DDropdown { Layout.fillWidth: true Layout.preferredHeight: Theme.buttonHeightS backgroundColor: SettingsMetrics.controlSurface diff --git a/quickshell/Modules/Settings/PluginsHubHeader.qml b/quickshell/Modules/Settings/PluginsHubHeader.qml index 63d6d7b90..a2a1ea021 100644 --- a/quickshell/Modules/Settings/PluginsHubHeader.qml +++ b/quickshell/Modules/Settings/PluginsHubHeader.qml @@ -521,7 +521,7 @@ Column { filterMenu.openDropdownMenu(); } - DankDropdown { + DDropdown { id: filterMenu showTrigger: false popupAnchorItem: filterButton.trailingButton @@ -549,7 +549,7 @@ Column { sortMenu.openDropdownMenu(); } - DankDropdown { + DDropdown { id: sortMenu showTrigger: false popupAnchorItem: sortButton.trailingButton diff --git a/quickshell/Modules/Settings/PowerSleepTab.qml b/quickshell/Modules/Settings/PowerSleepTab.qml index 8ca62fe79..7fa1a9818 100644 --- a/quickshell/Modules/Settings/PowerSleepTab.qml +++ b/quickshell/Modules/Settings/PowerSleepTab.qml @@ -300,7 +300,7 @@ Item { visible: BootEntryService.status === "ready" title: I18n.tr("Add entry", "settings row that adds an EFI boot entry to the power menu") - DankDropdown { + DDropdown { id: bootEntryDropdown downKeyOpens: false backgroundColor: SettingsMetrics.controlSurface diff --git a/quickshell/Modules/Settings/RegistryBrowserWindow.qml b/quickshell/Modules/Settings/RegistryBrowserWindow.qml index e661b175c..bd7ea1d60 100644 --- a/quickshell/Modules/Settings/RegistryBrowserWindow.qml +++ b/quickshell/Modules/Settings/RegistryBrowserWindow.qml @@ -5,7 +5,7 @@ import qs.DCommon.Widgets import qs.Widgets import qs.Modules.Settings.Widgets -DankFloatingWindow { +DFloatingWindow { id: root property var parentModal: null diff --git a/quickshell/Modules/Settings/WidgetPickerWindow.qml b/quickshell/Modules/Settings/WidgetPickerWindow.qml index 64ed4aa86..29b891bfb 100644 --- a/quickshell/Modules/Settings/WidgetPickerWindow.qml +++ b/quickshell/Modules/Settings/WidgetPickerWindow.qml @@ -4,7 +4,7 @@ import qs.DCommon.Widgets import qs.Widgets import qs.Modules.Settings.Widgets -DankFloatingWindow { +DFloatingWindow { id: root property var widgets: [] diff --git a/quickshell/Modules/Settings/Widgets/AppBrowserPopup.qml b/quickshell/Modules/Settings/Widgets/AppBrowserPopup.qml index 8cfaf1073..ac6257b8c 100644 --- a/quickshell/Modules/Settings/Widgets/AppBrowserPopup.qml +++ b/quickshell/Modules/Settings/Widgets/AppBrowserPopup.qml @@ -3,7 +3,7 @@ import qs.Common import qs.DCommon.Widgets import qs.Widgets -DankFloatingWindow { +DFloatingWindow { id: root property string searchQuery: "" diff --git a/quickshell/Modules/Settings/Widgets/SettingsDropdownRow.qml b/quickshell/Modules/Settings/Widgets/SettingsDropdownRow.qml index 7648428a3..5312cf148 100644 --- a/quickshell/Modules/Settings/Widgets/SettingsDropdownRow.qml +++ b/quickshell/Modules/Settings/Widgets/SettingsDropdownRow.qml @@ -1,5 +1,6 @@ import QtQuick import qs.Common +import qs.DCommon.Widgets import qs.Widgets SettingsRow { @@ -39,7 +40,7 @@ SettingsRow { subtitle: description onCurrentValueChanged: dropdown.currentValue = currentValue - DankDropdown { + DDropdown { id: dropdown downKeyOpens: false backgroundColor: SettingsMetrics.controlSurface diff --git a/quickshell/Modules/Settings/Widgets/SettingsLayoutPicker.qml b/quickshell/Modules/Settings/Widgets/SettingsLayoutPicker.qml index 3c6353756..e7db49db6 100644 --- a/quickshell/Modules/Settings/Widgets/SettingsLayoutPicker.qml +++ b/quickshell/Modules/Settings/Widgets/SettingsLayoutPicker.qml @@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import QtQuick.Layouts import qs.Common -import qs.Modules.DankBar +import qs.Modules.DBar import qs.DCommon.Widgets import qs.Widgets diff --git a/quickshell/Modules/Settings/WidgetsTabSection.qml b/quickshell/Modules/Settings/WidgetsTabSection.qml index 52717710d..f04f70e91 100644 --- a/quickshell/Modules/Settings/WidgetsTabSection.qml +++ b/quickshell/Modules/Settings/WidgetsTabSection.qml @@ -5,7 +5,7 @@ import qs.Common import qs.DCommon.Widgets import qs.Services import qs.Modules.Settings.Widgets -import "../DankBar/OverflowLayout.js" as OverflowLayout +import "../DBar/OverflowLayout.js" as OverflowLayout Column { id: root diff --git a/quickshell/Modules/Settings/WindowRulesTab.qml b/quickshell/Modules/Settings/WindowRulesTab.qml index 570d002a6..8e6dab9a4 100644 --- a/quickshell/Modules/Settings/WindowRulesTab.qml +++ b/quickshell/Modules/Settings/WindowRulesTab.qml @@ -345,7 +345,7 @@ Item { visible: root.activeWindows.length > 0 title: I18n.tr("Create rule for:") - DankDropdown { + DDropdown { id: windowSelector downKeyOpens: false backgroundColor: SettingsMetrics.controlSurface diff --git a/quickshell/Modules/SurfaceWidgets/ApplicationStrip.qml b/quickshell/Modules/SurfaceWidgets/ApplicationStrip.qml index 51e97c3d5..c0fd05e3f 100644 --- a/quickshell/Modules/SurfaceWidgets/ApplicationStrip.qml +++ b/quickshell/Modules/SurfaceWidgets/ApplicationStrip.qml @@ -397,7 +397,7 @@ Item { } } - DankTooltip { + DTooltip { id: tooltip screen: root.dockScreen } diff --git a/quickshell/Modules/SurfaceWidgets/BarPill.qml b/quickshell/Modules/SurfaceWidgets/BarPill.qml index ce26bde36..bf8aeee66 100644 --- a/quickshell/Modules/SurfaceWidgets/BarPill.qml +++ b/quickshell/Modules/SurfaceWidgets/BarPill.qml @@ -3,7 +3,7 @@ import qs.Common import qs.Services import qs.DCommon.Widgets import qs.Widgets -import qs.Modules.DankBar +import qs.Modules.DBar Item { id: root diff --git a/quickshell/Modules/SurfaceWidgets/MediaActivityFace.qml b/quickshell/Modules/SurfaceWidgets/MediaActivityFace.qml index e092fd928..0aafa18b4 100644 --- a/quickshell/Modules/SurfaceWidgets/MediaActivityFace.qml +++ b/quickshell/Modules/SurfaceWidgets/MediaActivityFace.qml @@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import Quickshell import qs.Common -import qs.Modules.DankBar.Widgets +import qs.Modules.DBar.Widgets import qs.Services import qs.DCommon.Widgets import qs.Widgets diff --git a/quickshell/Modules/SurfaceWidgets/SurfaceWidgetFactory.qml b/quickshell/Modules/SurfaceWidgets/SurfaceWidgetFactory.qml index 860147728..ee8462f82 100644 --- a/quickshell/Modules/SurfaceWidgets/SurfaceWidgetFactory.qml +++ b/quickshell/Modules/SurfaceWidgets/SurfaceWidgetFactory.qml @@ -3,8 +3,8 @@ import QtQuick import Quickshell.Services.SystemTray import qs.Common import qs.Services -import qs.Modules.DankBar.Widgets -import "../DankBar/WidgetModel.js" as WidgetModel +import qs.Modules.DBar.Widgets +import "../DBar/WidgetModel.js" as WidgetModel Item { id: root diff --git a/quickshell/Modules/WallpaperBackground.qml b/quickshell/Modules/WallpaperBackground.qml index 1f87e517a..2c217d899 100644 --- a/quickshell/Modules/WallpaperBackground.qml +++ b/quickshell/Modules/WallpaperBackground.qml @@ -268,7 +268,7 @@ Variants { onSessionMonitorWallpaperFillModesChanged: regenerate() onSessionPerMonitorWallpaperChanged: regenerate() - // Theme changes repaint DankBackdrop but nothing else wakes the render loop + // Theme changes repaint DBackdrop but nothing else wakes the render loop readonly property color themePrimary: Theme.primary readonly property color themeBackground: Theme.background @@ -725,7 +725,7 @@ Variants { active: root.showsBackdrop asynchronous: true - sourceComponent: DankBackdrop { + sourceComponent: DBackdrop { screenName: modelData.name blur: root.overviewBlurActive ? Theme.wallpaperBlur : 0 onInvalidated: root.invalidate() diff --git a/quickshell/Modules/WorkspaceOverlays/NiriOverviewOverlay.qml b/quickshell/Modules/WorkspaceOverlays/NiriOverviewOverlay.qml index 3c0f48ad6..0da53261c 100644 --- a/quickshell/Modules/WorkspaceOverlays/NiriOverviewOverlay.qml +++ b/quickshell/Modules/WorkspaceOverlays/NiriOverviewOverlay.qml @@ -3,8 +3,8 @@ import QtQuick.Controls import Quickshell import Quickshell.Wayland import qs.Common -import qs.Modals.DankLauncherV2 -import qs.Modals.DankLauncherV2.Components +import qs.Modals.DLauncherV2 +import qs.Modals.DLauncherV2.Components import qs.Services import qs.Widgets diff --git a/quickshell/Modules/WorkspaceOverlays/OverviewWidget.qml b/quickshell/Modules/WorkspaceOverlays/OverviewWidget.qml index 3c17f0ea4..fb4728b12 100644 --- a/quickshell/Modules/WorkspaceOverlays/OverviewWidget.qml +++ b/quickshell/Modules/WorkspaceOverlays/OverviewWidget.qml @@ -26,7 +26,7 @@ Item { } // scratchpad windows are not in the grid, so the menu only ever offers a move in - DankContextMenu { + DContextMenu { id: windowMenu property string targetWindow: "" diff --git a/quickshell/PLUGINS/DashCardExample/ProgressCard.qml b/quickshell/PLUGINS/DashCardExample/ProgressCard.qml index 556d13c58..84210a175 100644 --- a/quickshell/PLUGINS/DashCardExample/ProgressCard.qml +++ b/quickshell/PLUGINS/DashCardExample/ProgressCard.qml @@ -3,7 +3,7 @@ import Quickshell import qs.Common import qs.DCommon.Widgets import qs.Modules.Plugins -import qs.Modules.DankDash +import qs.Modules.DDash DashCardComponent { id: root diff --git a/quickshell/PLUGINS/DashCounterExample/CounterTab.qml b/quickshell/PLUGINS/DashCounterExample/CounterTab.qml index 554952da0..887a53e6c 100644 --- a/quickshell/PLUGINS/DashCounterExample/CounterTab.qml +++ b/quickshell/PLUGINS/DashCounterExample/CounterTab.qml @@ -2,8 +2,8 @@ import QtQuick import qs.Common import qs.DCommon.Widgets import qs.Modules.Plugins -import qs.Modules.DankDash -import qs.Modules.DankDash.Overview +import qs.Modules.DDash +import qs.Modules.DDash.Overview DashTabComponent { id: root diff --git a/quickshell/PLUGINS/DashTabExample/StopwatchTab.qml b/quickshell/PLUGINS/DashTabExample/StopwatchTab.qml index 836e85a63..1c9ca2b1e 100644 --- a/quickshell/PLUGINS/DashTabExample/StopwatchTab.qml +++ b/quickshell/PLUGINS/DashTabExample/StopwatchTab.qml @@ -2,8 +2,8 @@ import QtQuick import qs.Common import qs.DCommon.Widgets import qs.Modules.Plugins -import qs.Modules.DankDash -import qs.Modules.DankDash.Overview +import qs.Modules.DDash +import qs.Modules.DDash.Overview DashTabComponent { id: root diff --git a/quickshell/PLUGINS/README.md b/quickshell/PLUGINS/README.md index fd694247d..393911d98 100644 --- a/quickshell/PLUGINS/README.md +++ b/quickshell/PLUGINS/README.md @@ -31,7 +31,7 @@ Plugins are discovered from `~/.config/DankMaterialShell/plugins/` and managed b - Merges plugin components with built-in widgets - Supports every bar and dock edge -5. **Dash integration** (`Modules/DankDash/DashRegistry.qml`) +5. **Dash integration** (`Modules/DDash/DashRegistry.qml`) - Lists built-in and plugin tabs and overview cards - Hosts plugin tabs in `DashTabHost.qml` and cards in `Overview/DashCardSlot.qml` @@ -1945,7 +1945,7 @@ Optional on the tab: - `signal tabRequested(string id)`: switch the dash to another tab (`"overview"`, `"media"`, `"wallpaper"`, `"weather"`, `"notifications"` or a `plugin_`); a tab hidden from the bar opens as a detail page - `signal navFocusRequested`: return focus to the dash navigation -Use `Card` from `qs.Modules.DankDash.Overview` for tiles inside a tab so they pick up the same surface colors, radius and tones as the overview. +Use `Card` from `qs.Modules.DDash.Overview` for tiles inside a tab so they pick up the same surface colors, radius and tones as the overview. ### Widgets inside a tab @@ -1976,7 +1976,7 @@ DashTabComponent { } ``` -Import `qs.Modules.DankDash` for the grid. Each definition has a stable `id`, a translated `text`, an `icon`, a QML `component`, default `w`/`h` and optional `minW`/`minH`/`maxW`/`maxH`. The grid is 4 columns wide (2 when narrower than `Theme.smallBreakpoint`), independent of the overview column count. Set `enabled: false` to leave a widget in the Add menu initially. +Import `qs.Modules.DDash` for the grid. Each definition has a stable `id`, a translated `text`, an `icon`, a QML `component`, default `w`/`h` and optional `minW`/`minH`/`maxW`/`maxH`. The grid is 4 columns wide (2 when narrower than `Theme.smallBreakpoint`), independent of the overview column count. Set `enabled: false` to leave a widget in the Add menu initially. A definition can carry `options`, a list of option specs in the same shape as `dash.options` (`toggle`, `choice`, `number`). Build them with `DashRegistry.toggle(key, text, def)`, `DashRegistry.choice(key, text, def, choices)`, `DashRegistry.number(key, text, def, min, max, step, unit)` or `DashRegistry.toneOption(def)` for the shared Tone choice. In edit mode a widget with options shows an options button that opens them in a sheet. Each widget instance stores its own values, and the widget reads them from `widgetOptions` by key. `id`, `w`, `h`, `col` and `row` are reserved keys. @@ -2147,8 +2147,8 @@ plugin. - **PluginService**: `Services/PluginService.qml` - **Settings UI**: `Modules/Settings/PluginSettingsPage.qml` - **Bar and Dock Integration**: `Modules/SurfaceWidgets/SurfaceWidgetHost.qml` -- **Dash Integration**: `Modules/DankDash/DashRegistry.qml` -- **Launcher Integration**: `Modals/DankLauncherV2/Controller.qml` +- **Dash Integration**: `Modules/DDash/DashRegistry.qml` +- **Launcher Integration**: `Modals/DLauncherV2/Controller.qml` - **Desktop Widget Integration**: `Modules/DesktopWidgetLayer.qml` - **Theme Reference**: `Common/Theme.qml` - **Widget Library**: `Widgets/` diff --git a/quickshell/README.md b/quickshell/README.md index 002d15ad6..288ec737a 100644 --- a/quickshell/README.md +++ b/quickshell/README.md @@ -36,7 +36,7 @@ make lint-qml # Run from repo root; requires quickshell/.qmlls.ini (generated b **Panels & Bars** - `Modules/TopBar/` - Multi-monitor status bars with workspace switching -- `Modules/DankBar/` - Customizable widget bar with plugin support +- `Modules/DBar/` - Customizable widget bar with plugin support - `Modules/Dock/` - Application dock with window management **System Controls** @@ -91,8 +91,8 @@ Reusable Material Design 3 components in `Widgets/`: - `DankGridView` - Grid layout with adaptive columns - `DankListView` - Scrollable list view - `DankTextField` - Text input with validation -- `DankDropdown` - Dropdown selection -- `DankPopout` - Base for overlay components +- `DDropdown` - Dropdown selection +- `DPopout` - Base for overlay components - `StateLayer` - Material interaction states ## Theming diff --git a/quickshell/Services/LyricsController.qml b/quickshell/Services/LyricsController.qml index eace29857..f0d41562f 100644 --- a/quickshell/Services/LyricsController.qml +++ b/quickshell/Services/LyricsController.qml @@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Common import qs.Services -import qs.Modules.DankDash +import qs.Modules.DDash QtObject { id: root diff --git a/quickshell/Services/LyricsService.qml b/quickshell/Services/LyricsService.qml index 778f47540..4f471cd22 100644 --- a/quickshell/Services/LyricsService.qml +++ b/quickshell/Services/LyricsService.qml @@ -5,8 +5,8 @@ import QtQuick import Quickshell import Quickshell.Services.Mpris import qs.Services -import qs.Modules.DankDash -import qs.Modules.DankDash.Media +import qs.Modules.DDash +import qs.Modules.DDash.Media Singleton { id: root diff --git a/quickshell/Services/SettingsSearchService.qml b/quickshell/Services/SettingsSearchService.qml index 2ea078fb1..be742d3d6 100644 --- a/quickshell/Services/SettingsSearchService.qml +++ b/quickshell/Services/SettingsSearchService.qml @@ -6,7 +6,7 @@ import Quickshell import Quickshell.Io import qs.Common import qs.Services -import qs.Modules.DankDash +import qs.Modules.DDash Singleton { id: root diff --git a/quickshell/Services/WellbeingService.qml b/quickshell/Services/WellbeingService.qml index 66c0f01b0..c8707dddc 100644 --- a/quickshell/Services/WellbeingService.qml +++ b/quickshell/Services/WellbeingService.qml @@ -7,7 +7,7 @@ import Quickshell.Io import Quickshell.Wayland import qs.Common import qs.Services -import "../Modules/DankDash/Wellbeing/Wellbeing.js" as Wellbeing +import "../Modules/DDash/Wellbeing/Wellbeing.js" as Wellbeing Singleton { id: root diff --git a/quickshell/ShellCore.qml b/quickshell/ShellCore.qml index af979e58b..a05263b9b 100644 --- a/quickshell/ShellCore.qml +++ b/quickshell/ShellCore.qml @@ -1,8 +1,8 @@ import QtQuick import Quickshell import qs.Common -import qs.Modules.DankBar -import qs.Modules.DankIsland +import qs.Modules.DBar +import qs.Modules.DIsland import qs.Modules.Frame import qs.Modules.WorkspaceOverlays import qs.Services @@ -142,7 +142,7 @@ Item { asynchronous: false onItemChanged: dankBarRepeater.recountHorizontalReady() - sourceComponent: DankBar { + sourceComponent: DBar { barConfig: barLoader.barConfig hyprlandOverviewLoader: dankBarRepeater.hyprlandOverviewLoaderRef } @@ -152,7 +152,7 @@ Item { Loader { active: SettingsData.dankIslandEnabled asynchronous: false - sourceComponent: DankIsland { + sourceComponent: DIsland { hyprlandOverviewLoader: root.hyprlandOverviewLoader } } diff --git a/quickshell/Widgets/DAnimatedAlbumArt.qml b/quickshell/Widgets/DAnimatedAlbumArt.qml new file mode 100644 index 000000000..efb2bfab1 --- /dev/null +++ b/quickshell/Widgets/DAnimatedAlbumArt.qml @@ -0,0 +1,42 @@ +import QtQuick +import QtMultimedia +import Quickshell.Widgets +import qs.Services + +// Loaded by url so a missing QtMultimedia degrades to the static art underneath. +ClippingRectangle { + id: root + + radius: width / 2 + color: "transparent" + contentInsideBorder: true + border.color: MediaAccentService.accent + border.width: 2 + // Reveal only while frames are flowing; the static art beneath covers load, stall and error. + opacity: video.hasVideo && video.playbackState === MediaPlayer.PlayingState && video.error === MediaPlayer.NoError ? 1 : 0 + visible: opacity > 0 + + Behavior on opacity { + NumberAnimation { + duration: 300 + easing.type: Easing.InOutQuad + } + } + + Video { + id: video + anchors.fill: parent + source: AppleMusicArtService.animatedArtUrl + fillMode: VideoOutput.PreserveAspectCrop + loops: MediaPlayer.Infinite + muted: true + onSourceChanged: { + if (source != "") + play(); + } + Component.onCompleted: { + if (source != "") + play(); + } + } +} diff --git a/quickshell/Widgets/DBackdrop.qml b/quickshell/Widgets/DBackdrop.qml new file mode 100644 index 000000000..9a3e544d4 --- /dev/null +++ b/quickshell/Widgets/DBackdrop.qml @@ -0,0 +1,114 @@ +import QtQuick +import QtQuick.Effects +import Quickshell +import qs.Common + +Item { + id: root + + property string screenName: "" + property real blur: 0 + property int blurMax: Theme.wallpaperBlurMax + readonly property string source: SessionData.getMonitorWallpaper(screenName) + readonly property bool isColorWallpaper: source.startsWith("#") + readonly property var composition: SessionData.getMonitorMaterialWallpaper(screenName) + readonly property var palette: Theme.wallpaperPalette() + readonly property real pixelRatio: Window.window?.devicePixelRatio ?? Screen.devicePixelRatio + readonly property string renderKey: JSON.stringify([source, composition, palette, width, height, pixelRatio, blur, blurMax]) + readonly property bool ready: isColorWallpaper || frozenValid + readonly property bool liveReady: liveActive && (wallpaper.item?.ready ?? false) + property bool liveActive: false + property bool frozenValid: false + property bool snapshotEnabled: true + property bool capturePending: false + property string capturedKey: "" + + signal invalidated + + anchors.fill: parent + onRenderKeyChanged: refresh() + onReadyChanged: invalidated() + onLiveReadyChanged: capture() + + function capture() { + if (!liveReady || capturePending || !frozen.item) + return; + capturedKey = renderKey; + capturePending = true; + frozen.item.scheduleUpdate(); + invalidated(); + } + + function refresh() { + frozenValid = false; + liveActive = !isColorWallpaper; + capture(); + invalidated(); + } + + Connections { + target: root.QsWindow.window + function onResourcesLost() { + root.snapshotEnabled = false; + root.refresh(); + root.snapshotEnabled = true; + } + } + + Rectangle { + anchors.fill: parent + color: root.isColorWallpaper ? root.source : root.palette.surface + } + + Loader { + id: frozen + anchors.fill: parent + active: !root.isColorWallpaper && root.snapshotEnabled + visible: root.liveActive || root.frozenValid + onLoaded: root.capture() + onActiveChanged: { + if (!active) + root.capturePending = false; + } + sourceComponent: ShaderEffectSource { + sourceItem: liveContainer + live: false + hideSource: true + smooth: true + onScheduledUpdateCompleted: { + root.capturePending = false; + if (root.capturedKey !== root.renderKey || !root.liveReady) { + root.capture(); + return; + } + root.frozenValid = true; + root.liveActive = false; + root.invalidated(); + } + } + } + + Item { + id: liveContainer + anchors.fill: parent + visible: root.liveActive + layer.enabled: root.liveActive && root.blur > 0 + layer.effect: MultiEffect { + autoPaddingEnabled: false + blurEnabled: true + blur: root.blur + blurMax: root.blurMax + } + + Loader { + id: wallpaper + anchors.fill: parent + active: root.liveActive + sourceComponent: MaterialWallpaper { + composition: root.composition + palette: root.palette + onInvalidated: root.invalidated() + } + } + } +} diff --git a/quickshell/Widgets/DankContextMenu.qml b/quickshell/Widgets/DContextMenu.qml similarity index 100% rename from quickshell/Widgets/DankContextMenu.qml rename to quickshell/Widgets/DContextMenu.qml diff --git a/quickshell/Widgets/DankEditableGrid.qml b/quickshell/Widgets/DEditableGrid.qml similarity index 100% rename from quickshell/Widgets/DankEditableGrid.qml rename to quickshell/Widgets/DEditableGrid.qml diff --git a/quickshell/Widgets/DankEditableGridSlot.qml b/quickshell/Widgets/DEditableGridSlot.qml similarity index 100% rename from quickshell/Widgets/DankEditableGridSlot.qml rename to quickshell/Widgets/DEditableGridSlot.qml diff --git a/quickshell/Widgets/DFloatingWindow.qml b/quickshell/Widgets/DFloatingWindow.qml new file mode 100644 index 000000000..6e4ce43f4 --- /dev/null +++ b/quickshell/Widgets/DFloatingWindow.qml @@ -0,0 +1,44 @@ +pragma ComponentBehavior: Bound + +import QtQuick +import Quickshell +import qs.Common + +FloatingWindow { + id: root + + readonly property bool isFloatingWindowSurface: true + + default property alias content: contentItem.data + + property color surfaceColor: Theme.floatingWindowSurface + property bool contentVisible: true + + color: "transparent" + + Rectangle { + anchors.fill: parent + color: root.surfaceColor + visible: root.contentVisible + } + + // No surfaceColor gate: compositor window rules can make this window translucent. + WindowBlur { + targetWindow: root + blurEnabled: root.contentVisible && Theme.connectedSurfaceBlurEnabled + blurX: 0 + blurY: 0 + blurWidth: root.visible ? root.width : 0 + blurHeight: root.visible ? root.height : 0 + } + + Item { + id: contentItem + + readonly property bool isFloatingWindowSurface: true + property bool disablePopupTransparency: true + + anchors.fill: parent + visible: root.contentVisible + } +} diff --git a/quickshell/Widgets/DFocusGrab.qml b/quickshell/Widgets/DFocusGrab.qml new file mode 100644 index 000000000..df8a3181a --- /dev/null +++ b/quickshell/Widgets/DFocusGrab.qml @@ -0,0 +1,46 @@ +import QtQuick +import Quickshell.Hyprland +import qs.Common + +// Delays grab release so keyboardFocus=None commits before the grab dies, +// keeping Hyprland from handing focus back to the closing surface (#2577) +HyprlandFocusGrab { + id: root + + property bool wanted: false + property bool _held: false + property bool _compositorCleared: false + property var _restoreToplevel: null + property int _restoreWorkspaceId: -1 + + property Timer _releaseTimer: Timer { + interval: 50 + onTriggered: { + root._held = false; + root.active = false; + // Restoring a toplevel from another workspace would drag the user back + // to the workspace they just navigated away from (#2963) + const workspaceChanged = (Hyprland.focusedWorkspace?.id ?? -1) !== root._restoreWorkspaceId; + root._restoreToplevel = (root._compositorCleared || workspaceChanged) ? null : KeyboardFocus.restoreToplevel(root._restoreToplevel); + } + } + + onWantedChanged: _sync() + Component.onCompleted: _sync() + + function _sync() { + if (!wanted) { + if (_held) + _releaseTimer.restart(); + return; + } + _releaseTimer.stop(); + _held = true; + _compositorCleared = false; + _restoreToplevel = KeyboardFocus.captureActiveToplevel(); + _restoreWorkspaceId = Hyprland.focusedWorkspace?.id ?? -1; + active = true; + } + + onCleared: _compositorCleared = true +} diff --git a/quickshell/Widgets/DankGridEditChrome.qml b/quickshell/Widgets/DGridEditChrome.qml similarity index 99% rename from quickshell/Widgets/DankGridEditChrome.qml rename to quickshell/Widgets/DGridEditChrome.qml index 2948a9ab9..980a8ce71 100644 --- a/quickshell/Widgets/DankGridEditChrome.qml +++ b/quickshell/Widgets/DGridEditChrome.qml @@ -195,7 +195,7 @@ Item { visible: root.horizontalResize } - DankResizeGrip { + DResizeGrip { anchors.fill: parent anchors.leftMargin: handleItem.signX < 0 ? root.gripInset : 0 anchors.rightMargin: handleItem.signX > 0 ? root.gripInset : 0 diff --git a/quickshell/Widgets/DankKeyHints.qml b/quickshell/Widgets/DKeyHints.qml similarity index 100% rename from quickshell/Widgets/DankKeyHints.qml rename to quickshell/Widgets/DKeyHints.qml diff --git a/quickshell/Widgets/DOSD.qml b/quickshell/Widgets/DOSD.qml new file mode 100644 index 000000000..b53fab482 --- /dev/null +++ b/quickshell/Widgets/DOSD.qml @@ -0,0 +1,397 @@ +import QtQuick +import Quickshell +import Quickshell.Wayland +import qs.Common +import qs.Services + +PanelWindow { + id: root + readonly property var log: Log.scoped("DOSD") + + property string blurNamespace: "dms:osd" + WlrLayershell.namespace: blurNamespace + + property alias content: contentLoader.sourceComponent + property alias contentLoader: contentLoader + property var modelData + property string osdKind: "" + readonly property int osdPosition: SettingsData.osdPositionFor(osdKind) + property bool shouldBeVisible: false + property bool _surfaceFrameReady: false + readonly property bool presented: shouldBeVisible && _surfaceFrameReady + property int autoHideInterval: 2000 + property bool enableMouseInteraction: false + property real osdWidth: Theme.osdHeight + property real osdHeight: Theme.osdHeight + property color surfaceColor: Theme.hostSurface + property real surfaceRadius: Theme.fullRadius(alignedWidth, alignedHeight) + property int animationDuration: Theme.mediumDuration + property var animationEasing: Theme.emphasizedEasing + property Component sheet: null + property real sheetWidth: 0 + property bool expanded: false + + signal osdShown + signal osdHidden + + function show() { + if (SessionData.suppressOSD || expanded) + return; + if (shouldBeVisible) { + hideTimer.restart(); + return; + } + OSDManager.showOSD(root); + closeTimer.stop(); + shouldBeVisible = true; + visible = true; + hideTimer.restart(); + osdShown(); + } + + function hide() { + if (expanded) { + closeSheet(); + return; + } + shouldBeVisible = false; + closeTimer.restart(); + } + + function expand() { + if (!sheet || !shouldBeVisible || expanded) + return; + hideTimer.stop(); + expanded = true; + } + + function closeSheet() { + if (sheetLoader.item) { + sheetLoader.item.close(); + return; + } + finishSheet(); + } + + function finishSheet() { + expanded = false; + shouldBeVisible = false; + hideTimer.stop(); + closeTimer.stop(); + visible = false; + osdHidden(); + } + + function resetHideTimer() { + if (shouldBeVisible) { + hideTimer.restart(); + } + } + + function updateHoverState() { + let isHovered = (enableMouseInteraction && mouseArea.containsMouse) || osdContainer.childHovered; + if (enableMouseInteraction) { + if (isHovered) { + hideTimer.stop(); + } else if (shouldBeVisible) { + hideTimer.restart(); + } + } + } + + function setChildHovered(hovered) { + osdContainer.childHovered = hovered; + updateHoverState(); + } + + screen: modelData + visible: false + onVisibleChanged: { + if (!visible) + _surfaceFrameReady = false; + } + + Connections { + target: osdContainer.Window.window + enabled: root.visible && !root._surfaceFrameReady + + function onFrameSwapped() { + root._surfaceFrameReady = true; + } + } + + readonly property var quickshellScreens: Quickshell.screens + + onQuickshellScreensChanged: { + if (!visible && !shouldBeVisible) + return; + const currentScreenName = screen?.name; + if (!currentScreenName) { + hide(); + return; + } + for (let i = 0; i < Quickshell.screens.length; i++) { + if (Quickshell.screens[i].name === currentScreenName) + return; + } + expanded = false; + shouldBeVisible = false; + visible = false; + hideTimer.stop(); + closeTimer.stop(); + osdHidden(); + } + + WlrLayershell.layer: LayerShell.fromEnv("DMS_OSD_LAYER", WlrLayer.Overlay, { + "allow": ["top", "overlay"], + "invalidLayer": WlrLayer.Overlay, + "label": "OSDs" + }) + WlrLayershell.exclusiveZone: -1 + WlrLayershell.keyboardFocus: WlrKeyboardFocus.None + + WindowBlur { + targetWindow: root + surfaceColor: Theme.withAlpha(root.surfaceColor, osdContainer.popupSurfaceAlpha) + blurX: shadowBuffer + blurY: shadowBuffer + blurWidth: presented ? alignedWidth : 0 + blurHeight: presented ? alignedHeight : 0 + blurRadius: root.surfaceRadius + } + + color: "transparent" + + readonly property real dpr: CompositorService.getScreenScale(screen) + readonly property real screenWidth: screen.width + readonly property real screenHeight: screen.height + readonly property real shadowBuffer: Theme.elevationRenderPadding(Theme.elevationLevel2, Theme.elevationLightDirection, Theme.spacingXS, Theme.spacingS, Theme.spacingL) + readonly property real alignedWidth: Theme.px(osdWidth, dpr) + readonly property real alignedHeight: Theme.px(osdHeight, dpr) + + readonly property bool isVerticalLayout: osdPosition === SettingsData.Position.LeftCenter || osdPosition === SettingsData.Position.RightCenter + + readonly property var barEdgeOffsets: { + const offsets = { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }; + const configs = SettingsData.barConfigs; + if (!screen || !configs) + return offsets; + const defaultBar = SettingsData.getPrimaryBarConfig(); + for (var i = 0; i < configs.length; i++) { + const bc = configs[i]; + if (!bc || !(bc.enabled ?? true) || !(bc.visible ?? true)) + continue; + if (SettingsData.isIslandBarConfig(bc)) + continue; + if (!SettingsData.barConfigCoversScreen(bc, screen)) + continue; + const innerPadding = bc.innerPadding ?? (defaultBar?.innerPadding ?? 4); + const thickness = Theme.barThickness(innerPadding, dpr); + const spacing = bc.spacing ?? (defaultBar?.spacing ?? 4); + const bottomGap = bc.bottomGap ?? (defaultBar?.bottomGap ?? 0); + const offset = thickness + spacing + bottomGap; + switch (bc.position ?? SettingsData.Position.Top) { + case SettingsData.Position.Top: + offsets.top = Math.max(offsets.top, offset); + break; + case SettingsData.Position.Bottom: + offsets.bottom = Math.max(offsets.bottom, offset); + break; + case SettingsData.Position.Left: + offsets.left = Math.max(offsets.left, offset); + break; + case SettingsData.Position.Right: + offsets.right = Math.max(offsets.right, offset); + break; + } + } + offsets.top = Math.max(offsets.top, SettingsData.dankIslandEdgeOffset(screen, "top")); + offsets.bottom = Math.max(offsets.bottom, SettingsData.dankIslandEdgeOffset(screen, "bottom")); + offsets.left = Math.max(offsets.left, SettingsData.dankIslandEdgeOffset(screen, "left")); + offsets.right = Math.max(offsets.right, SettingsData.dankIslandEdgeOffset(screen, "right")); + return offsets; + } + + function dockOffsetForEdge(side) { + return SettingsData.dockReservationForEdge(screen, side); + } + + function edgeInset(side) { + return Theme.spacingM + Math.max(barEdgeOffsets[side], dockOffsetForEdge(side)); + } + + function placeAlong(align, extent, size, startSide, endSide) { + switch (align) { + case -1: + return Theme.snap(edgeInset(startSide), dpr); + case 1: + return Theme.snap(extent - size - edgeInset(endSide), dpr); + default: + return Theme.snap((extent - size) / 2, dpr); + } + } + + readonly property int alignX: { + switch (osdPosition) { + case SettingsData.Position.Left: + case SettingsData.Position.Bottom: + case SettingsData.Position.LeftCenter: + return -1; + case SettingsData.Position.Top: + case SettingsData.Position.Right: + case SettingsData.Position.RightCenter: + return 1; + default: + return 0; + } + } + + readonly property int alignY: { + switch (osdPosition) { + case SettingsData.Position.Top: + case SettingsData.Position.Left: + case SettingsData.Position.TopCenter: + return -1; + case SettingsData.Position.Right: + case SettingsData.Position.Bottom: + case SettingsData.Position.BottomCenter: + return 1; + default: + return 0; + } + } + + readonly property real alignedX: placeAlong(alignX, screenWidth, alignedWidth, "left", "right") + readonly property real alignedY: placeAlong(alignY, screenHeight, alignedHeight, "top", "bottom") + + anchors { + top: true + left: true + } + + readonly property real windowX: Math.max(0, Theme.snap(alignedX - shadowBuffer, dpr)) + readonly property real windowY: Math.max(0, Theme.snap(alignedY - shadowBuffer, dpr)) + + WlrLayershell.margins { + left: root.windowX + top: root.windowY + } + + implicitWidth: alignedWidth + (shadowBuffer * 2) + implicitHeight: alignedHeight + (shadowBuffer * 2) + + readonly property var scaleSpringParams: Theme.springPreset("default", animationDuration) + + SpringMotion { + id: osdScaleSpring + reducedMotion: root.animationDuration <= 0 + positionEpsilon: 0.001 + velocityEpsilon: positionEpsilon * damping / Math.max(0.001, 2 * mass) + stiffness: root.scaleSpringParams.stiffness + damping: root.scaleSpringParams.damping + value: root.presented ? 1 : Theme.popupEnterScale + + Component.onCompleted: snapTo(root.presented ? 1 : Theme.popupEnterScale) + } + + onPresentedChanged: osdScaleSpring.retarget(root.presented ? 1 : Theme.popupEnterScale) + + Timer { + id: hideTimer + + interval: autoHideInterval + repeat: false + onTriggered: { + if (expanded) + return; + if (!enableMouseInteraction || !mouseArea.containsMouse) { + hide(); + } else { + hideTimer.restart(); + } + } + } + + Timer { + id: closeTimer + interval: Math.max(animationDuration + 50, Math.round(osdScaleSpring.settleDurationMs) + 50) + onTriggered: { + if (!shouldBeVisible) { + visible = false; + osdHidden(); + } + } + } + + Item { + id: osdContainer + x: shadowBuffer + y: shadowBuffer + width: alignedWidth + height: alignedHeight + opacity: presented ? 1 : 0 + scale: osdScaleSpring.value + + property bool childHovered: false + readonly property real popupSurfaceAlpha: Theme.popupTransparency + + ElevationShadow { + id: bgShadowLayer + anchors.fill: parent + z: -2 + level: Theme.elevationLevel2 + fallbackOffset: Theme.spacingXS + targetRadius: root.surfaceRadius + targetColor: Theme.withAlpha(root.surfaceColor, osdContainer.popupSurfaceAlpha) + borderColor: Theme.outlineVariant + borderWidth: 0 + shadowEnabled: Theme.elevationEnabled && SettingsData.popoutElevationEnabled && Quickshell.env("DMS_DISABLE_LAYER") !== "true" && Quickshell.env("DMS_DISABLE_LAYER") !== "1" + } + + MouseArea { + id: mouseArea + anchors.fill: parent + hoverEnabled: enableMouseInteraction + acceptedButtons: Qt.NoButton + propagateComposedEvents: true + z: -1 + onContainsMouseChanged: updateHoverState() + } + + onChildHoveredChanged: updateHoverState() + + Loader { + id: contentLoader + anchors.fill: parent + active: root.visible + asynchronous: false + } + + Behavior on opacity { + NumberAnimation { + duration: animationDuration + easing.type: animationEasing + } + } + } + + mask: Region { + item: bgShadowLayer + } + + LazyLoader { + id: sheetLoader + active: root.expanded + + DOSDSheet { + host: root + onPresented: root.visible = false + onDismissed: root.finishSheet() + } + } +} diff --git a/quickshell/Widgets/DankOSDSheet.qml b/quickshell/Widgets/DOSDSheet.qml similarity index 99% rename from quickshell/Widgets/DankOSDSheet.qml rename to quickshell/Widgets/DOSDSheet.qml index 1108820b7..704095839 100644 --- a/quickshell/Widgets/DankOSDSheet.qml +++ b/quickshell/Widgets/DOSDSheet.qml @@ -166,7 +166,7 @@ PanelWindow { blurRadius: root.surfaceRadius } - DankFocusGrab { + DFocusGrab { windows: [root, dismissWindow].concat(KeyboardFocus.barWindows) wanted: KeyboardFocus.wantsGrab(root.opened && !root.closing) onCleared: root.close() diff --git a/quickshell/Widgets/DankPanelResizer.qml b/quickshell/Widgets/DPanelResizer.qml similarity index 100% rename from quickshell/Widgets/DankPanelResizer.qml rename to quickshell/Widgets/DPanelResizer.qml diff --git a/quickshell/Widgets/DPopout.qml b/quickshell/Widgets/DPopout.qml new file mode 100644 index 000000000..e9600af1d --- /dev/null +++ b/quickshell/Widgets/DPopout.qml @@ -0,0 +1,435 @@ +import QtQuick +import qs.Common +import qs.Services + +Item { + id: root + readonly property var log: Log.scoped("DPopout") + + property string layerNamespace: "dms:popout" + property Component content: null + property Component overlayContent: null + property real popupWidth: 400 + property real popupHeight: 300 + property real triggerX: 0 + property real triggerY: 0 + property real triggerWidth: 40 + property string triggerSection: "" + property string positioning: "center" + property int animationDuration: Theme.popoutAnimationDuration + property real animationScaleCollapsed: Theme.effectScaleCollapsed + property real animationOffset: Theme.effectAnimOffset + property list animationEnterCurve: Theme.variantPopoutEnterCurve + property list animationExitCurve: Theme.variantPopoutExitCurve + property list resizeCurve: Theme.variantPopoutResizeCurve + property int resizeDuration: animationDuration + property bool resizeMotion: false + property bool resizing: false + property real surfacePadding: 0 + property real inputMargin: 0 + property bool suspendShadowWhileResizing: false + property bool shouldBeVisible: false + property bool hoverDismissEnabled: false + property bool hoverDismissSuspended: false + property var customKeyboardFocus: null + readonly property alias transientSurfaceTracker: _transientSurfaceTracker + readonly property bool effectiveHoverDismissSuspended: hoverDismissSuspended || (transientSurfaceTracker?.active ?? false) + property bool backgroundInteractive: true + property bool contentHandlesKeys: false + property bool fullHeightSurface: false + property real minimumSurfaceWidth: 0 + property bool _primeContent: false + property bool _warmContent: false + + property real storedBarThickness: Theme.barThickness(SettingsData.getPrimaryBarConfig()?.innerPadding ?? 4, 1) + property real storedBarSpacing: 4 + property var storedBarConfig: null + property var sourceRegistration: null + property bool closesWithSource: true + readonly property bool sourceActive: !sourceRegistration || BarWidgetService.registrationActive(sourceRegistration) + onSourceActiveChanged: if (!sourceActive && closesWithSource) + close() + property var sourceDock: null + readonly property var inlineDockBounds: storedBarConfig?.widgetExpansion === "inline" ? sourceDock?.surfaceBounds ?? null : null + property bool triggerUsesOverlayLayer: false + property var adjacentBarInfo: ({ + "topBar": 0, + "bottomBar": 0, + "leftBar": 0, + "rightBar": 0 + }) + property var screen: null + property int effectiveBarPosition: 0 + property real effectiveBarBottomGap: 0 + + signal opened + signal popoutClosed + signal closeAnimationFinished + signal backgroundClicked + + readonly property var contentLoader: impl.item ? impl.item.contentLoader : _fallbackContentLoader + readonly property var overlayLoader: impl.item ? impl.item.overlayLoader : _fallbackOverlayLoader + readonly property var backgroundWindow: impl.item ? impl.item.backgroundWindow : null + readonly property var contentWindow: impl.item ? impl.item.contentWindow : null + + TransientSurfaceTracker { + id: _transientSurfaceTracker + } + + // Hyprland OnDemand grab: whitelist popout surfaces and bars so dismiss clicks still land. + DFocusGrab { + windows: { + const list = []; + if (root.contentWindow) + list.push(root.contentWindow); + if (root.backgroundWindow && root.backgroundWindow !== root.contentWindow) + list.push(root.backgroundWindow); + const transientWindows = root.transientSurfaceTracker?.focusWindows ?? []; + return list.concat(transientWindows).concat(KeyboardFocus.barWindows); + } + wanted: KeyboardFocus.wantsGrab(root.shouldBeVisible, root.customKeyboardFocus) + } + + Loader { + id: _fallbackContentLoader + active: false + } + Loader { + id: _fallbackOverlayLoader + active: false + } + readonly property bool isClosing: impl.item ? (impl.item.isClosing ?? false) : false + readonly property real dpr: impl.item ? impl.item.dpr : 1 + readonly property real screenWidth: impl.item ? impl.item.screenWidth : 0 + readonly property real screenHeight: impl.item ? impl.item.screenHeight : 0 + readonly property real alignedX: impl.item ? impl.item.alignedX : 0 + readonly property real alignedY: impl.item ? impl.item.alignedY : 0 + readonly property real alignedWidth: impl.item ? impl.item.alignedWidth : 0 + readonly property real alignedHeight: impl.item ? impl.item.alignedHeight : 0 + readonly property real renderedAlignedX: impl.item ? (impl.item.renderedAlignedX ?? impl.item.alignedX) : 0 + readonly property real renderedAlignedY: impl.item ? (impl.item.renderedAlignedY ?? impl.item.alignedY) : 0 + readonly property real renderedAlignedWidth: impl.item ? (impl.item.renderedAlignedWidth ?? impl.item.alignedWidth) : 0 + readonly property real renderedAlignedHeight: impl.item ? (impl.item.renderedAlignedHeight ?? impl.item.alignedHeight) : 0 + readonly property real maxBodyWidth: impl.item ? impl.item.maxBodyWidth : 0 + readonly property real maxBodyHeight: impl.item ? impl.item.maxBodyHeight : 0 + + function alignedXFor(width) { + return impl.item?.alignedXFor(width) ?? 0; + } + readonly property vector4d surfaceCornerRadii: impl.item?.surfaceCornerRadii ?? Qt.vector4d(Theme.windowRadius, Theme.windowRadius, Theme.windowRadius, Theme.windowRadius) + readonly property real maskX: impl.item ? impl.item.maskX : 0 + readonly property real maskY: impl.item ? impl.item.maskY : 0 + readonly property real maskWidth: impl.item ? impl.item.maskWidth : 0 + readonly property real maskHeight: impl.item ? impl.item.maskHeight : 0 + readonly property real barX: impl.item ? impl.item.barX : 0 + readonly property real barY: impl.item ? impl.item.barY : 0 + readonly property real barWidth: impl.item ? impl.item.barWidth : 0 + readonly property real barHeight: impl.item ? impl.item.barHeight : 0 + readonly property bool useConnectedBackend: _usesConnectedBackendForScreen(screen) + property bool _resolvedConnected: false + property bool _pendingOpen: false + + Timer { + id: _pendingOpenTimer + interval: 0 + onTriggered: { + if (!root._pendingOpen || !impl.item) + return; + root._pendingOpen = false; + impl.item.open(); + } + } + + onUseConnectedBackendChanged: _maybeResolveBackend() + Component.onCompleted: _loadHost(_usesConnectedBackendForScreen(screen)) + + Connections { + target: SettingsData + function onConnectedFrameModeActiveChanged() { + root._maybeResolveBackend(); + } + function onFrameEnabledChanged() { + root._maybeResolveBackend(); + } + function onFrameScreenPreferencesChanged() { + root._maybeResolveBackend(); + } + function onDockConfigsChanged() { + root._maybeResolveBackend(); + } + function onBarConfigsChanged() { + root._maybeResolveBackend(); + } + } + + function _usesConnectedBackendForScreen(targetScreen) { + return CompositorService.usesConnectedFrameChromeForScreen(targetScreen); + } + + function _maybeResolveBackend() { + _resolveBackendForScreen(screen); + } + + function _resolveBackendForScreen(targetScreen) { + const connected = _usesConnectedBackendForScreen(targetScreen); + if (_resolvedConnected === connected) + return; + if (impl.item && (impl.item.shouldBeVisible || impl.item.isClosing)) + return; + _loadHost(connected); + } + + function _loadHost(connected) { + impl.sourceComponent = null; + _resolvedConnected = connected; + impl.sourceComponent = hostComponent; + } + + function open() { + _maybeResolveBackend(); + if (impl.item) { + _pendingOpen = false; + impl.item.open(); + return; + } + _pendingOpen = true; + } + + function close() { + _close(false); + } + + function instantClose() { + _close(true); + } + + function _close(instant) { + _pendingOpen = false; + _pendingOpenTimer.stop(); + transientSurfaceTracker?.closeAll?.(); + if (impl.item) { + instant ? impl.item.instantClose() : impl.item.close(); + return; + } + PopoutManager.hidePopout(root); + if (!shouldBeVisible) + return; + shouldBeVisible = false; + popoutClosed(); + } + + function cancelHoverDismiss() { + if (impl.item?.cancelHoverDismiss) + impl.item.cancelHoverDismiss(); + } + + // Fade out in place during morph switch transitions. + function beginSupersededClose() { + if (impl.item) + impl.item.beginSupersededClose(); + } + + function closeFromHoverDismiss() { + if (effectiveHoverDismissSuspended) + return; + transientSurfaceTracker?.closeAll?.(); + hoverDismissEnabled = false; + // Enable animations using standard Theme-bound popout motion to preserve bindings. + if (impl.item) + impl.item.animationsEnabled = true; + for (const prop of ["dashVisible", "notificationHistoryVisible"]) { + if (root[prop] !== undefined) { + root[prop] = false; + return; + } + } + if (impl.item) + impl.item.close(); + else + close(); + } + + function toggle() { + (shouldBeVisible || _pendingOpen) ? close() : open(); + } + + function setBarContext(position, bottomGap) { + effectiveBarPosition = position !== undefined ? position : 0; + effectiveBarBottomGap = bottomGap !== undefined ? bottomGap : 0; + } + + function _triggerBarUsesOverlayLayer(targetScreen, barConfig) { + const frameHostsBar = CompositorService.frameHostsBarForConfig(targetScreen, barConfig); + const frameRequiresOverlay = CompositorService.framePeerSurfacesUseOverlayForScreen(targetScreen) && !frameHostsBar; + return LayerShell.envUsesOverlay("DMS_DANKBAR_LAYER", (barConfig?.useOverlayLayer ?? false) || frameRequiresOverlay); + } + + function dockClearance(side, popupGap) { + if (!screen) + return 0; + const reserved = SettingsData.dockReservationForEdge(screen, side); + const frameInset = CompositorService.frameWindowVisibleForScreen(screen) ? SettingsData.frameEdgeInsetForSide(screen, side) : 0; + let clearance = reserved > 0 ? reserved + frameInset : 0; + if (sourceDock?.config?.enabled && sourceDock.reveal && sourceDock.connectedBarSide === side) { + const bounds = sourceDock.surfaceBounds; + switch (side) { + case "top": + clearance = Math.max(clearance, bounds.y + bounds.height); + break; + case "bottom": + clearance = Math.max(clearance, screen.height - bounds.y); + break; + case "left": + clearance = Math.max(clearance, bounds.x + bounds.width); + break; + case "right": + clearance = Math.max(clearance, screen.width - bounds.x); + break; + } + } + return clearance > 0 ? clearance + popupGap : 0; + } + + function setTriggerPosition(x, y, width, section, targetScreen, barPosition, barThickness, barSpacing, barConfig, sourceItem) { + sourceRegistration = BarWidgetService.registrationForItem(sourceItem); + sourceDock = null; + for (let item = sourceItem; item; item = item.parent) { + if (item.surfaceContext?.kind !== "dock") + continue; + sourceDock = item.surfaceContext.host; + break; + } + if (barConfig?.widgetExpansion === "inline" && sourceDock) { + const bounds = sourceDock.surfaceBounds; + const gap = CompositorService.usesConnectedFrameChromeForScreen(targetScreen) && !barConfig.useOverlayLayer ? 0 : (barConfig.popupGapsAuto !== false ? Math.max(4, barSpacing) : barConfig.popupGapsManual ?? 4); + switch (barPosition) { + case SettingsData.Position.Top: + y = bounds.y + bounds.height + gap; + break; + case SettingsData.Position.Bottom: + y = bounds.y - gap; + break; + case SettingsData.Position.Left: + x = bounds.x + bounds.width + gap; + break; + case SettingsData.Position.Right: + x = bounds.x - gap; + break; + } + } + if (barConfig?.widgetExpansion === "popout" && targetScreen) { + const anchor = BarWidgetService.naturalPopoutAnchor(targetScreen, sourceItem, section); + if (!anchor) + return; + x = anchor.trigger.x; + y = anchor.trigger.y; + width = anchor.trigger.width; + section = anchor.section; + barPosition = anchor.position; + barThickness = anchor.thickness; + barSpacing = anchor.spacing; + barConfig = anchor.config; + } + triggerX = x; + triggerY = y; + triggerWidth = width; + triggerSection = section; + screen = targetScreen; + + storedBarThickness = barThickness !== undefined ? barThickness : Theme.barThickness(SettingsData.getPrimaryBarConfig()?.innerPadding ?? 4, 1); + storedBarSpacing = barSpacing !== undefined ? barSpacing : 4; + storedBarConfig = barConfig; + triggerUsesOverlayLayer = _triggerBarUsesOverlayLayer(targetScreen, barConfig); + + const pos = barPosition !== undefined ? barPosition : 0; + const bottomGap = barConfig ? (barConfig.bottomGap !== undefined ? barConfig.bottomGap : 0) : 0; + + adjacentBarInfo = SettingsData.getAdjacentBarInfo(targetScreen, pos, barConfig); + setBarContext(pos, bottomGap); + _resolveBackendForScreen(targetScreen); + } + + function updateSurfacePosition() { + if (impl.item) + impl.item.updateSurfacePosition(); + } + + function containsGlobalPoint(gx, gy) { + if (!screen) + return false; + const presented = shouldBeVisible || (impl.item?.isClosing ?? false); + if (!presented) + return false; + const padding = 24; + const x = renderedAlignedX - padding; + const y = renderedAlignedY - padding; + const w = renderedAlignedWidth + padding * 2; + const h = renderedAlignedHeight + padding * 2; + return gx >= x && gx <= x + w && gy >= y && gy <= y + h; + } + + Loader { + id: impl + active: root.screen !== null + onItemChanged: if (item) + root._wireBackend(item) + } + + Component { + id: hostComponent + DPopoutHost { + id: host + + popoutHandle: root + connected: root._resolvedConnected + + onShouldBeVisibleChanged: { + if (root.shouldBeVisible !== host.shouldBeVisible) + root.shouldBeVisible = host.shouldBeVisible; + } + onOpened: root.opened() + onCloseAnimationFinished: root.closeAnimationFinished() + onPopoutClosed: { + root.popoutClosed(); + root._maybeResolveBackend(); + } + onBackgroundClicked: root.backgroundClicked() + } + } + + function _wireBackend(it) { + if (root.shouldBeVisible && !_pendingOpen) + root.shouldBeVisible = false; + if (root._primeContent) + it.primeContent(); + if (root._warmContent) + it.warmContent(); + if (_pendingOpen) + _pendingOpenTimer.restart(); + } + + function primeContent() { + _primeContent = true; + if (impl.item) + impl.item.primeContent(); + } + + function clearPrimedContent() { + _primeContent = false; + if (impl.item) + impl.item.clearPrimedContent(); + } + + function warmContent() { + _warmContent = true; + if (impl.item) + impl.item.warmContent(); + } + + onShouldBeVisibleChanged: { + if (!shouldBeVisible) + transientSurfaceTracker?.closeAll?.(); + if (impl.item && impl.item.shouldBeVisible !== shouldBeVisible) + impl.item.shouldBeVisible = shouldBeVisible; + } +} diff --git a/quickshell/Widgets/DankPopoutHost.qml b/quickshell/Widgets/DPopoutHost.qml similarity index 99% rename from quickshell/Widgets/DankPopoutHost.qml rename to quickshell/Widgets/DPopoutHost.qml index 8b72f8b61..c1d281559 100644 --- a/quickshell/Widgets/DankPopoutHost.qml +++ b/quickshell/Widgets/DPopoutHost.qml @@ -12,7 +12,7 @@ import "../Common/FluidGeometry.js" as FluidGeometry Item { id: root - readonly property var log: Log.scoped("DankPopoutHost") + readonly property var log: Log.scoped("DPopoutHost") required property var popoutHandle property bool connected: true diff --git a/quickshell/Widgets/DankResizeGrip.qml b/quickshell/Widgets/DResizeGrip.qml similarity index 100% rename from quickshell/Widgets/DankResizeGrip.qml rename to quickshell/Widgets/DResizeGrip.qml diff --git a/quickshell/Widgets/DSeekbar.qml b/quickshell/Widgets/DSeekbar.qml new file mode 100644 index 000000000..7d4cf4b3f --- /dev/null +++ b/quickshell/Widgets/DSeekbar.qml @@ -0,0 +1,322 @@ +import QtQuick +import Quickshell.Services.Mpris +import qs.Common +import qs.DCommon.Widgets +import qs.Widgets + +Item { + id: root + + LayoutMirroring.enabled: false + LayoutMirroring.childrenInherit: true + + property MprisPlayer activePlayer + property real stableLength: 0 + readonly property bool canSeek: enabled && (activePlayer?.canSeek ?? false) && stableLength > 0 + readonly property real minimumValue: 0 + readonly property real maximumValue: 1 + readonly property real stepSize: stableLength > 0 ? 5 / stableLength : 0 + activeFocusOnTab: canSeek + Accessible.role: Accessible.Slider + Accessible.name: I18n.tr("Playback position", "media seekbar accessible name") + Accessible.focusable: canSeek + Accessible.onIncreaseAction: seekBy(5) + Accessible.onDecreaseAction: seekBy(-5) + + function seekTo(position) { + if (!canSeek) + return; + const clamped = Math.max(0.1, Math.min(position, stableLength * 0.99)); + activePlayer.position = clamped; + beginCommittedSeekPreview(clamped); + } + + function seekBy(seconds) { + seekTo(value * stableLength + seconds); + } + + Keys.onPressed: event => { + if (!canSeek) + return; + switch (event.key) { + case Qt.Key_Left: + seekBy(-5); + break; + case Qt.Key_Right: + seekBy(5); + break; + case Qt.Key_PageUp: + seekBy(stableLength / 10); + break; + case Qt.Key_PageDown: + seekBy(-stableLength / 10); + break; + case Qt.Key_Home: + seekTo(0); + break; + case Qt.Key_End: + seekTo(stableLength); + break; + default: + return; + } + event.accepted = true; + } + + FocusRing { + radius: Theme.cornerRadiusXS + Theme.focusRingOffset + visible: root.activeFocus + } + property color accentColor: Theme.primary + property color accentTrackColor: Theme.withAlpha(accentColor, 0.28) + property color accentSubtleColor: Theme.withAlpha(accentColor, 0.55) + + property real seekPreviewRatio: -1 + readonly property real playerValue: { + if (!activePlayer || stableLength <= 0) + return 0; + const pos = activePlayer.position || 0; + const calculatedRatio = pos / stableLength; + return Math.max(0, Math.min(1, calculatedRatio)); + } + property real value: seekPreviewRatio >= 0 ? seekPreviewRatio : playerValue + property bool isSeeking: false + property bool isDraggingSeek: false + property real committedSeekRatio: -1 + property int previewSettleChecksRemaining: 0 + property real dragThreshold: 4 + property int holdIndicatorDelay: 180 + + function clampRatio(ratio) { + return Math.max(0, Math.min(1, ratio)); + } + + function ratioForPosition(position) { + if (!activePlayer || stableLength <= 0) + return 0; + return clampRatio(position / stableLength); + } + + function positionForRatio(ratio) { + if (!activePlayer || stableLength <= 0) + return 0; + const rawPosition = clampRatio(ratio) * stableLength; + return Math.min(rawPosition, stableLength * 0.99); + } + + function updatePreviewFromMouse(mouseX, width) { + if (!activePlayer || stableLength <= 0 || width <= 0) + return; + seekPreviewRatio = clampRatio(mouseX / width); + } + + function clearCommittedSeekPreview() { + previewSettleTimer.stop(); + committedSeekRatio = -1; + previewSettleChecksRemaining = 0; + if (!isSeeking) + seekPreviewRatio = -1; + } + + function beginCommittedSeekPreview(position) { + seekPreviewRatio = ratioForPosition(position); + committedSeekRatio = seekPreviewRatio; + previewSettleChecksRemaining = 15; + previewSettleTimer.restart(); + } + + function handleSeekPressed(mouse, width, mouseArea, holdTimer) { + isSeeking = true; + isDraggingSeek = false; + mouseArea.pressX = mouse.x; + clearCommittedSeekPreview(); + holdTimer.restart(); + if (activePlayer && stableLength > 0 && activePlayer.canSeek) { + updatePreviewFromMouse(mouse.x, width); + mouseArea.pendingSeekPosition = positionForRatio(seekPreviewRatio); + } + } + + function handleSeekReleased(mouseArea, holdTimer) { + holdTimer.stop(); + isSeeking = false; + isDraggingSeek = false; + if (mouseArea.pendingSeekPosition >= 0 && activePlayer && activePlayer.canSeek && stableLength > 0) { + const clamped = Math.min(mouseArea.pendingSeekPosition, stableLength * 0.99); + activePlayer.position = Math.max(0.1, clamped); + mouseArea.pendingSeekPosition = -1; + beginCommittedSeekPreview(clamped); + } else { + seekPreviewRatio = -1; + } + } + + function handleSeekPositionChanged(mouse, width, mouseArea) { + if (mouseArea.pressed && isSeeking && activePlayer && stableLength > 0 && activePlayer.canSeek) { + if (!isDraggingSeek && Math.abs(mouse.x - mouseArea.pressX) >= dragThreshold) + isDraggingSeek = true; + updatePreviewFromMouse(mouse.x, width); + mouseArea.pendingSeekPosition = positionForRatio(seekPreviewRatio); + } + } + + function handleSeekCanceled(mouseArea, holdTimer) { + holdTimer.stop(); + isSeeking = false; + isDraggingSeek = false; + mouseArea.pendingSeekPosition = -1; + clearCommittedSeekPreview(); + } + + Timer { + id: previewSettleTimer + interval: 80 + repeat: true + onTriggered: { + if (root.isSeeking || root.committedSeekRatio < 0) { + stop(); + return; + } + + const previewSettled = Math.abs(root.playerValue - root.committedSeekRatio) <= 0.0015; + if (previewSettled || root.previewSettleChecksRemaining <= 0) { + root.clearCommittedSeekPreview(); + return; + } + + root.previewSettleChecksRemaining -= 1; + } + } + + implicitHeight: 20 + + Loader { + anchors.fill: parent + visible: activePlayer && stableLength > 0 + sourceComponent: MediaOptions.waveProgress ? waveProgressComponent : flatProgressComponent + z: 1 + + Component { + id: waveProgressComponent + + M3WaveProgress { + value: root.value + actualValue: root.playerValue + showActualPlaybackState: root.isSeeking + fillColor: root.accentColor + playheadColor: root.accentColor + trackColor: root.accentTrackColor + actualProgressColor: root.accentSubtleColor + isPlaying: activePlayer && activePlayer.playbackState === MprisPlaybackState.Playing + onFrameTicked: { + if (!root.isSeeking) + activePlayer.positionChanged(); + } + + MouseArea { + id: waveMouseArea + anchors.fill: parent + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + enabled: activePlayer && activePlayer.canSeek && stableLength > 0 + + property real pendingSeekPosition: -1 + property real pressX: 0 + + Timer { + id: waveHoldIndicatorTimer + interval: root.holdIndicatorDelay + repeat: false + onTriggered: { + if (parent.pressed && root.isSeeking) + root.isDraggingSeek = true; + } + } + + onPressed: mouse => root.handleSeekPressed(mouse, parent.width, waveMouseArea, waveHoldIndicatorTimer) + onReleased: root.handleSeekReleased(waveMouseArea, waveHoldIndicatorTimer) + onPositionChanged: mouse => root.handleSeekPositionChanged(mouse, parent.width, waveMouseArea) + onCanceled: root.handleSeekCanceled(waveMouseArea, waveHoldIndicatorTimer) + } + } + } + + Component { + id: flatProgressComponent + + Item { + property real lineWidth: 3 + property color trackColor: Theme.withAlpha(Theme.surfaceVariant, 0.40) + property color fillColor: root.accentColor + property color playheadColor: root.accentColor + property color actualProgressColor: Theme.onSurface_38 + readonly property real midY: height / 2 + + Rectangle { + width: parent.width + height: parent.lineWidth + anchors.verticalCenter: parent.verticalCenter + color: parent.trackColor + radius: Theme.fullRadius(width, height) + } + + Rectangle { + width: Math.max(0, Math.min(parent.width, parent.width * root.value)) + height: parent.lineWidth + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + color: parent.fillColor + radius: Theme.fullRadius(width, height) + } + + Rectangle { + visible: root.isDraggingSeek + width: 2 + height: Math.max(parent.lineWidth + 4, 10) + radius: Theme.fullRadius(width, height) + color: parent.actualProgressColor + x: Math.max(0, Math.min(parent.width, parent.width * root.playerValue)) - width / 2 + y: parent.midY - height / 2 + z: 2 + } + + Rectangle { + id: playhead + width: 3 + height: Math.max(parent.lineWidth + 8, 14) + radius: Theme.fullRadius(width, height) + color: parent.playheadColor + x: Math.max(0, Math.min(parent.width, parent.width * root.value)) - width / 2 + y: parent.midY - height / 2 + z: 3 + } + + MouseArea { + id: flatMouseArea + anchors.fill: parent + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + enabled: activePlayer && activePlayer.canSeek && stableLength > 0 + + property real pendingSeekPosition: -1 + property real pressX: 0 + + Timer { + id: flatHoldIndicatorTimer + interval: root.holdIndicatorDelay + repeat: false + onTriggered: { + if (parent.pressed && root.isSeeking) + root.isDraggingSeek = true; + } + } + + onPressed: mouse => root.handleSeekPressed(mouse, parent.width, flatMouseArea, flatHoldIndicatorTimer) + onReleased: root.handleSeekReleased(flatMouseArea, flatHoldIndicatorTimer) + onPositionChanged: mouse => root.handleSeekPositionChanged(mouse, parent.width, flatMouseArea) + onCanceled: root.handleSeekCanceled(flatMouseArea, flatHoldIndicatorTimer) + } + } + } + } +} diff --git a/quickshell/Widgets/DSlideout.qml b/quickshell/Widgets/DSlideout.qml new file mode 100644 index 000000000..beeaa6626 --- /dev/null +++ b/quickshell/Widgets/DSlideout.qml @@ -0,0 +1,324 @@ +pragma ComponentBehavior: Bound +import QtQuick +import Quickshell +import Quickshell.Wayland +import qs.Common +import qs.Services +import qs.DCommon.Widgets +import qs.Widgets + +PanelWindow { + id: root + + property string layerNamespace: "dms:slideout" + WlrLayershell.namespace: layerNamespace + + property bool isVisible: false + property bool hoverDismissEnabled: false + property bool hoverDismissSuspended: false + property var targetScreen: null + property var modelData: null + property bool triggerUsesOverlayLayer: false + // Drop off the Overlay layer (back to Top) while an overlay modal + property bool suppressOverlayLayer: false + property real slideoutWidth: 480 + property bool expandable: false + property bool expandedWidth: false + property real expandedWidthValue: 960 + property real edgeGap: 0 + property string slideEdge: "right" + readonly property bool slideFromLeft: slideEdge === "left" + readonly property real surfaceOriginX: slideFromLeft ? 0 : Math.max(0, (modelData?.width ?? width) - width) + property Component content: null + property bool contentRequested: false + property string title: "" + property alias container: contentContainer + property alias loadedItem: contentLoader.item + property real customTransparency: -1 + property bool mappedVisible: false + signal aboutToHide + signal revealed + + function show() { + contentRequested = true; + mappedVisible = true; + Qt.callLater(() => { + isVisible = true; + revealed(); + }); + } + + function hide() { + aboutToHide(); + isVisible = false; + } + + function hideFromHoverDismiss() { + if (hoverDismissSuspended) + return; + hoverDismissEnabled = false; + slideContainer.slideSlowExit = true; + hide(); + } + + function cancelHoverDismiss() { + hoverDismissTracker.cancelPending(); + } + + function containsGlobalPoint(gx, gy) { + if (!isVisible || !modelData) + return false; + const padding = 24; + const topLeft = slideContainer.mapToItem(null, 0, 0); + const globalX = surfaceOriginX + topLeft.x; + return gx >= globalX - padding && gx < globalX + slideContainer.width + padding && gy >= topLeft.y - padding && gy < topLeft.y + slideContainer.height + padding; + } + + function toggle() { + if (isVisible) { + hide(); + } else { + show(); + } + } + + visible: root.mappedVisible + screen: modelData + + anchors.top: true + anchors.bottom: true + anchors.right: !root.slideFromLeft + anchors.left: root.slideFromLeft + + implicitWidth: expandable ? expandedWidthValue : slideoutWidth + implicitHeight: modelData ? modelData.height : 800 + + color: "transparent" + + HoverDismissTracker { + id: hoverDismissTracker + parent: root.contentItem + enabled: root.hoverDismissEnabled && !root.hoverDismissSuspended && root.isVisible + shouldDismiss: function () { + return !PopoutManager.cursorOverBar(PopoutManager.hoverCursorGlobalX, PopoutManager.hoverCursorGlobalY); + } + onDismissRequested: root.hideFromHoverDismiss() + onHoverMoved: (sceneX, sceneY) => PopoutManager.updateHoverCursor(root.surfaceOriginX + sceneX, sceneY) + } + + readonly property bool slideoutBlurActive: root.visible && BlurService.enabled && Theme.connectedSurfaceBlurEnabled + + readonly property string _slideoutScreenName: modelData?.name ?? "" + + WlrLayershell.layer: (!suppressOverlayLayer && (triggerUsesOverlayLayer || CompositorService.framePeerSurfacesUseOverlayForScreen(modelData))) ? WlrLayershell.Overlay : WlrLayershell.Top + WlrLayershell.exclusiveZone: 0 + WlrLayershell.keyboardFocus: isVisible && !ModalManager.currentModalsByScreen[_slideoutScreenName] ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None + + readonly property real dpr: CompositorService.getScreenScale(root.screen) + readonly property real alignedWidth: Theme.px(expandable && expandedWidth ? expandedWidthValue : slideoutWidth, dpr) + onAlignedWidthChanged: widthSpring.retarget(alignedWidth) + readonly property real alignedHeight: Theme.px(modelData ? modelData.height : 800, dpr) + readonly property real alignedEdgeGap: Theme.px(edgeGap, dpr) + readonly property real slideoutSlideSnapX: Theme.snap(slideContainer.slideOffset, dpr) + + onIsVisibleChanged: { + slideSpring.retarget(isVisible ? 0 : (slideFromLeft ? -slideContainer.width : slideContainer.width)); + if (isVisible || slideSpring.running) + return; + mappedVisible = false; + } + + mask: Region { + item: Rectangle { + x: root.slideFromLeft ? root.alignedEdgeGap : (root.width - slideContainer.width - root.alignedEdgeGap) + y: root.alignedEdgeGap + width: root.isVisible ? slideContainer.width : 0 + height: root.isVisible ? root.height - root.alignedEdgeGap * 2 : 0 + } + } + + Item { + id: slideContainer + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.right: root.slideFromLeft ? undefined : parent.right + anchors.left: root.slideFromLeft ? parent.left : undefined + anchors.topMargin: root.alignedEdgeGap + anchors.bottomMargin: root.alignedEdgeGap + anchors.rightMargin: root.alignedEdgeGap + anchors.leftMargin: root.alignedEdgeGap + + property bool slideSlowExit: false + readonly property var slideSpringParams: Theme.springPreset("default", slideSlowExit ? Math.round(Theme.expressiveDurations.expressiveDefaultSpatial) : Theme.expressiveDurations.expressiveDefaultSpatial) + readonly property var widthSpringParams: Theme.springPreset("default", Theme.popoutAnimationDuration) + + SpringMotion { + id: slideSpring + reducedMotion: false + positionEpsilon: 0.05 + velocityEpsilon: 0.05 + stiffness: slideContainer.slideSpringParams.stiffness + damping: slideContainer.slideSpringParams.damping + value: root.slideFromLeft ? -root.alignedWidth : root.alignedWidth + + Component.onCompleted: snapTo(root.slideFromLeft ? -root.alignedWidth : root.alignedWidth) + + onRunningChanged: { + if (running) + return; + if (!root.isVisible) + root.mappedVisible = false; + slideContainer.slideSlowExit = false; + } + } + + SpringMotion { + id: widthSpring + enabled: root.expandable + reducedMotion: Theme.popoutAnimationDuration <= 0 + positionEpsilon: 0.05 + velocityEpsilon: 0.05 + stiffness: slideContainer.widthSpringParams.stiffness + damping: slideContainer.widthSpringParams.damping + value: root.alignedWidth + + Component.onCompleted: snapTo(root.alignedWidth) + } + + property real slideOffset: slideSpring.value + + width: widthSpring.value + height: root.alignedHeight - root.alignedEdgeGap * 2 + + Item { + id: contentRect + clip: true + + readonly property color slideoutSurfaceColor: { + if (root.customTransparency >= 0) + return Theme.withAlpha(Theme.hostSurface, root.customTransparency); + if (Theme.isConnectedEffect) + return Theme.connectedSurfaceColor; + return Theme.readableSurface; + } + + anchors.top: parent.top + anchors.bottom: parent.bottom + width: parent.width + x: root.slideoutSlideSnapX + + ElevationShadow { + anchors.fill: parent + visible: !Theme.isConnectedEffect + level: Theme.elevationLevel2 + targetRadius: Theme.windowRadius + targetColor: contentRect.slideoutSurfaceColor + shadowEnabled: Theme.elevationEnabled && SettingsData.popoutElevationEnabled + } + + Rectangle { + anchors.fill: parent + color: Theme.isConnectedEffect ? contentRect.slideoutSurfaceColor : "transparent" + radius: Theme.isConnectedEffect ? Theme.connectedSurfaceRadius : Theme.windowRadius + border.color: Theme.isConnectedEffect ? Theme.withAlpha(BlurService.borderColor, 0) : BlurService.borderColor + border.width: Theme.isConnectedEffect ? 0 : BlurService.borderWidth + } + + Item { + id: contentBody + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.right: root.slideFromLeft ? undefined : parent.right + anchors.left: root.slideFromLeft ? parent.left : undefined + width: root.alignedWidth + + Column { + id: headerColumn + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + anchors.margins: Theme.spacingL + spacing: Theme.spacingM + visible: root.title !== "" + + Row { + width: parent.width + height: 32 + + Column { + width: parent.width - buttonRow.width + spacing: Theme.spacingXS + anchors.verticalCenter: parent.verticalCenter + + StyledText { + text: root.title + font.pixelSize: Theme.fontSizeLarge + color: Theme.surfaceText + font.weight: Theme.fontWeightMedium + } + } + + Row { + id: buttonRow + spacing: Theme.spacingXS + + DActionButton { + id: expandButton + iconName: root.expandedWidth ? "unfold_less" : "unfold_more" + tooltipText: root.expandedWidth ? I18n.tr("Collapse") : I18n.tr("Expand") + iconSize: Theme.iconSize - 4 + iconColor: Theme.surfaceText + visible: root.expandable + onClicked: root.expandedWidth = !root.expandedWidth + + transform: Rotation { + angle: 90 + origin.x: expandButton.width / 2 + origin.y: expandButton.height / 2 + } + } + + DActionButton { + id: closeButton + iconName: "close" + Accessible.name: I18n.tr("Close") + iconSize: Theme.iconSize - 4 + iconColor: Theme.surfaceText + onClicked: root.hide() + } + } + } + } + + Item { + id: contentContainer + anchors.top: root.title !== "" ? headerColumn.bottom : parent.top + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.topMargin: root.title !== "" ? 0 : Theme.spacingL + anchors.leftMargin: Theme.spacingL + anchors.rightMargin: Theme.spacingL + anchors.bottomMargin: Theme.spacingL + + Loader { + id: contentLoader + anchors.fill: parent + active: root.contentRequested + sourceComponent: root.content + } + } + } + } + } + + WindowBlur { + targetWindow: root + surfaceColor: contentRect.slideoutSurfaceColor + blurX: root.slideoutBlurActive ? slideContainer.x + root.slideoutSlideSnapX : 0 + blurY: root.slideoutBlurActive ? slideContainer.y : 0 + blurWidth: root.slideoutBlurActive ? slideContainer.width : 0 + blurHeight: root.slideoutBlurActive ? slideContainer.height : 0 + blurRadius: Theme.isConnectedEffect ? Theme.connectedSurfaceRadius : Theme.windowRadius + } +} diff --git a/quickshell/Widgets/DTooltip.qml b/quickshell/Widgets/DTooltip.qml new file mode 100644 index 000000000..477c86768 --- /dev/null +++ b/quickshell/Widgets/DTooltip.qml @@ -0,0 +1,87 @@ +import QtQuick +import Quickshell +import Quickshell.Wayland +import qs.Common +import qs.DCommon.Widgets +import qs.Widgets + +PanelWindow { + id: root + + WlrLayershell.namespace: "dms:tooltip" + + property string text: "" + property real targetX: 0 + property real targetY: 0 + property var targetScreen: null + property bool alignLeft: false + property bool alignRight: false + + function show(text, x, y, screen, leftAlign, rightAlign) { + root.text = text; + targetScreen = screen ?? null; + targetX = x; + targetY = y; + alignLeft = leftAlign ?? false; + alignRight = rightAlign ?? false; + visible = true; + } + + function hide() { + visible = false; + } + + screen: targetScreen + implicitWidth: Math.min(Theme.tooltipMaxWidth, textContent.implicitWidth) + Theme.spacingM * 2 + implicitHeight: textContent.implicitHeight + Theme.spacingS * 2 + color: "transparent" + mask: Region {} + visible: false + WlrLayershell.layer: WlrLayershell.Overlay + WlrLayershell.exclusiveZone: -1 + + anchors { + top: true + left: true + } + + margins { + left: { + const screenWidth = targetScreen?.width ?? Screen.width; + if (alignLeft) { + return Math.round(Math.max(Theme.spacingS, Math.min(screenWidth - implicitWidth - Theme.spacingS, targetX))); + } else if (alignRight) { + return Math.round(Math.max(Theme.spacingS, Math.min(screenWidth - implicitWidth - Theme.spacingS, targetX - implicitWidth))); + } else { + return Math.round(Math.max(Theme.spacingS, Math.min(screenWidth - implicitWidth - Theme.spacingS, targetX - implicitWidth / 2))); + } + } + top: { + const screenHeight = targetScreen?.height ?? Screen.height; + if (alignLeft || alignRight) { + return Math.round(Math.max(Theme.spacingS, Math.min(screenHeight - implicitHeight - Theme.spacingS, targetY - implicitHeight / 2))); + } else { + return Math.round(Math.max(Theme.spacingS, Math.min(screenHeight - implicitHeight - Theme.spacingS, targetY))); + } + } + } + + Rectangle { + anchors.fill: parent + color: Theme.inverseSurface + radius: Theme.cornerRadiusXS + + StyledText { + id: textContent + + anchors.centerIn: parent + text: root.text + font.pixelSize: Theme.fontSizeSmall + color: Theme.inverseOnSurface + wrapMode: Text.NoWrap + maximumLineCount: 1 + elide: Text.ElideRight + width: Math.min(implicitWidth, Theme.tooltipMaxWidth) + } + } +} diff --git a/quickshell/Widgets/DankAnimatedAlbumArt.qml b/quickshell/Widgets/DankAnimatedAlbumArt.qml index efb2bfab1..d295f4a87 100644 --- a/quickshell/Widgets/DankAnimatedAlbumArt.qml +++ b/quickshell/Widgets/DankAnimatedAlbumArt.qml @@ -1,42 +1,7 @@ import QtQuick -import QtMultimedia -import Quickshell.Widgets -import qs.Services +import qs.Common -// Loaded by url so a missing QtMultimedia degrades to the static art underneath. -ClippingRectangle { - id: root - - radius: width / 2 - color: "transparent" - contentInsideBorder: true - border.color: MediaAccentService.accent - border.width: 2 - // Reveal only while frames are flowing; the static art beneath covers load, stall and error. - opacity: video.hasVideo && video.playbackState === MediaPlayer.PlayingState && video.error === MediaPlayer.NoError ? 1 : 0 - visible: opacity > 0 - - Behavior on opacity { - NumberAnimation { - duration: 300 - easing.type: Easing.InOutQuad - } - } - - Video { - id: video - anchors.fill: parent - source: AppleMusicArtService.animatedArtUrl - fillMode: VideoOutput.PreserveAspectCrop - loops: MediaPlayer.Infinite - muted: true - onSourceChanged: { - if (source != "") - play(); - } - Component.onCompleted: { - if (source != "") - play(); - } - } +DAnimatedAlbumArt { + id: shim + Component.onCompleted: Deprecation.type(shim, "DankAnimatedAlbumArt", "DAnimatedAlbumArt", "qs.Widgets") } diff --git a/quickshell/Widgets/DankBackdrop.qml b/quickshell/Widgets/DankBackdrop.qml index 9a3e544d4..f4b13b9d7 100644 --- a/quickshell/Widgets/DankBackdrop.qml +++ b/quickshell/Widgets/DankBackdrop.qml @@ -1,114 +1,7 @@ import QtQuick -import QtQuick.Effects -import Quickshell import qs.Common -Item { - id: root - - property string screenName: "" - property real blur: 0 - property int blurMax: Theme.wallpaperBlurMax - readonly property string source: SessionData.getMonitorWallpaper(screenName) - readonly property bool isColorWallpaper: source.startsWith("#") - readonly property var composition: SessionData.getMonitorMaterialWallpaper(screenName) - readonly property var palette: Theme.wallpaperPalette() - readonly property real pixelRatio: Window.window?.devicePixelRatio ?? Screen.devicePixelRatio - readonly property string renderKey: JSON.stringify([source, composition, palette, width, height, pixelRatio, blur, blurMax]) - readonly property bool ready: isColorWallpaper || frozenValid - readonly property bool liveReady: liveActive && (wallpaper.item?.ready ?? false) - property bool liveActive: false - property bool frozenValid: false - property bool snapshotEnabled: true - property bool capturePending: false - property string capturedKey: "" - - signal invalidated - - anchors.fill: parent - onRenderKeyChanged: refresh() - onReadyChanged: invalidated() - onLiveReadyChanged: capture() - - function capture() { - if (!liveReady || capturePending || !frozen.item) - return; - capturedKey = renderKey; - capturePending = true; - frozen.item.scheduleUpdate(); - invalidated(); - } - - function refresh() { - frozenValid = false; - liveActive = !isColorWallpaper; - capture(); - invalidated(); - } - - Connections { - target: root.QsWindow.window - function onResourcesLost() { - root.snapshotEnabled = false; - root.refresh(); - root.snapshotEnabled = true; - } - } - - Rectangle { - anchors.fill: parent - color: root.isColorWallpaper ? root.source : root.palette.surface - } - - Loader { - id: frozen - anchors.fill: parent - active: !root.isColorWallpaper && root.snapshotEnabled - visible: root.liveActive || root.frozenValid - onLoaded: root.capture() - onActiveChanged: { - if (!active) - root.capturePending = false; - } - sourceComponent: ShaderEffectSource { - sourceItem: liveContainer - live: false - hideSource: true - smooth: true - onScheduledUpdateCompleted: { - root.capturePending = false; - if (root.capturedKey !== root.renderKey || !root.liveReady) { - root.capture(); - return; - } - root.frozenValid = true; - root.liveActive = false; - root.invalidated(); - } - } - } - - Item { - id: liveContainer - anchors.fill: parent - visible: root.liveActive - layer.enabled: root.liveActive && root.blur > 0 - layer.effect: MultiEffect { - autoPaddingEnabled: false - blurEnabled: true - blur: root.blur - blurMax: root.blurMax - } - - Loader { - id: wallpaper - anchors.fill: parent - active: root.liveActive - sourceComponent: MaterialWallpaper { - composition: root.composition - palette: root.palette - onInvalidated: root.invalidated() - } - } - } +DBackdrop { + id: shim + Component.onCompleted: Deprecation.type(shim, "DankBackdrop", "DBackdrop", "qs.Widgets") } diff --git a/quickshell/Widgets/DankDropdown.qml b/quickshell/Widgets/DankDropdown.qml index 30a97eca8..ea17aebc2 100644 --- a/quickshell/Widgets/DankDropdown.qml +++ b/quickshell/Widgets/DankDropdown.qml @@ -1,7 +1,8 @@ +import QtQuick +import qs.Common import qs.DCommon.Widgets as DCommon -import qs.Services DCommon.DDropdown { - // Hyprland drops a focus grab when a whitelisted popup takes its own xdg grab - popupGrabsFocus: !(CompositorService.useHyprlandFocusGrab && transientSurfaceTracker) + id: shim + Component.onCompleted: Deprecation.type(shim, "DankDropdown", "DDropdown", "qs.DCommon.Widgets") } diff --git a/quickshell/Widgets/DankFloatingWindow.qml b/quickshell/Widgets/DankFloatingWindow.qml index 6e4ce43f4..64d362f3e 100644 --- a/quickshell/Widgets/DankFloatingWindow.qml +++ b/quickshell/Widgets/DankFloatingWindow.qml @@ -1,44 +1,7 @@ -pragma ComponentBehavior: Bound - import QtQuick -import Quickshell import qs.Common -FloatingWindow { - id: root - - readonly property bool isFloatingWindowSurface: true - - default property alias content: contentItem.data - - property color surfaceColor: Theme.floatingWindowSurface - property bool contentVisible: true - - color: "transparent" - - Rectangle { - anchors.fill: parent - color: root.surfaceColor - visible: root.contentVisible - } - - // No surfaceColor gate: compositor window rules can make this window translucent. - WindowBlur { - targetWindow: root - blurEnabled: root.contentVisible && Theme.connectedSurfaceBlurEnabled - blurX: 0 - blurY: 0 - blurWidth: root.visible ? root.width : 0 - blurHeight: root.visible ? root.height : 0 - } - - Item { - id: contentItem - - readonly property bool isFloatingWindowSurface: true - property bool disablePopupTransparency: true - - anchors.fill: parent - visible: root.contentVisible - } +DFloatingWindow { + id: shim + Component.onCompleted: Deprecation.type(shim, "DankFloatingWindow", "DFloatingWindow", "qs.Widgets") } diff --git a/quickshell/Widgets/DankFocusGrab.qml b/quickshell/Widgets/DankFocusGrab.qml index df8a3181a..85d1a5f5d 100644 --- a/quickshell/Widgets/DankFocusGrab.qml +++ b/quickshell/Widgets/DankFocusGrab.qml @@ -1,46 +1,7 @@ import QtQuick -import Quickshell.Hyprland import qs.Common -// Delays grab release so keyboardFocus=None commits before the grab dies, -// keeping Hyprland from handing focus back to the closing surface (#2577) -HyprlandFocusGrab { - id: root - - property bool wanted: false - property bool _held: false - property bool _compositorCleared: false - property var _restoreToplevel: null - property int _restoreWorkspaceId: -1 - - property Timer _releaseTimer: Timer { - interval: 50 - onTriggered: { - root._held = false; - root.active = false; - // Restoring a toplevel from another workspace would drag the user back - // to the workspace they just navigated away from (#2963) - const workspaceChanged = (Hyprland.focusedWorkspace?.id ?? -1) !== root._restoreWorkspaceId; - root._restoreToplevel = (root._compositorCleared || workspaceChanged) ? null : KeyboardFocus.restoreToplevel(root._restoreToplevel); - } - } - - onWantedChanged: _sync() - Component.onCompleted: _sync() - - function _sync() { - if (!wanted) { - if (_held) - _releaseTimer.restart(); - return; - } - _releaseTimer.stop(); - _held = true; - _compositorCleared = false; - _restoreToplevel = KeyboardFocus.captureActiveToplevel(); - _restoreWorkspaceId = Hyprland.focusedWorkspace?.id ?? -1; - active = true; - } - - onCleared: _compositorCleared = true +DFocusGrab { + id: shim + Component.onCompleted: Deprecation.type(shim, "DankFocusGrab", "DFocusGrab", "qs.Widgets") } diff --git a/quickshell/Widgets/DankOSD.qml b/quickshell/Widgets/DankOSD.qml index faa06411a..05bf3b478 100644 --- a/quickshell/Widgets/DankOSD.qml +++ b/quickshell/Widgets/DankOSD.qml @@ -1,397 +1,7 @@ import QtQuick -import Quickshell -import Quickshell.Wayland import qs.Common -import qs.Services -PanelWindow { - id: root - readonly property var log: Log.scoped("DankOSD") - - property string blurNamespace: "dms:osd" - WlrLayershell.namespace: blurNamespace - - property alias content: contentLoader.sourceComponent - property alias contentLoader: contentLoader - property var modelData - property string osdKind: "" - readonly property int osdPosition: SettingsData.osdPositionFor(osdKind) - property bool shouldBeVisible: false - property bool _surfaceFrameReady: false - readonly property bool presented: shouldBeVisible && _surfaceFrameReady - property int autoHideInterval: 2000 - property bool enableMouseInteraction: false - property real osdWidth: Theme.osdHeight - property real osdHeight: Theme.osdHeight - property color surfaceColor: Theme.hostSurface - property real surfaceRadius: Theme.fullRadius(alignedWidth, alignedHeight) - property int animationDuration: Theme.mediumDuration - property var animationEasing: Theme.emphasizedEasing - property Component sheet: null - property real sheetWidth: 0 - property bool expanded: false - - signal osdShown - signal osdHidden - - function show() { - if (SessionData.suppressOSD || expanded) - return; - if (shouldBeVisible) { - hideTimer.restart(); - return; - } - OSDManager.showOSD(root); - closeTimer.stop(); - shouldBeVisible = true; - visible = true; - hideTimer.restart(); - osdShown(); - } - - function hide() { - if (expanded) { - closeSheet(); - return; - } - shouldBeVisible = false; - closeTimer.restart(); - } - - function expand() { - if (!sheet || !shouldBeVisible || expanded) - return; - hideTimer.stop(); - expanded = true; - } - - function closeSheet() { - if (sheetLoader.item) { - sheetLoader.item.close(); - return; - } - finishSheet(); - } - - function finishSheet() { - expanded = false; - shouldBeVisible = false; - hideTimer.stop(); - closeTimer.stop(); - visible = false; - osdHidden(); - } - - function resetHideTimer() { - if (shouldBeVisible) { - hideTimer.restart(); - } - } - - function updateHoverState() { - let isHovered = (enableMouseInteraction && mouseArea.containsMouse) || osdContainer.childHovered; - if (enableMouseInteraction) { - if (isHovered) { - hideTimer.stop(); - } else if (shouldBeVisible) { - hideTimer.restart(); - } - } - } - - function setChildHovered(hovered) { - osdContainer.childHovered = hovered; - updateHoverState(); - } - - screen: modelData - visible: false - onVisibleChanged: { - if (!visible) - _surfaceFrameReady = false; - } - - Connections { - target: osdContainer.Window.window - enabled: root.visible && !root._surfaceFrameReady - - function onFrameSwapped() { - root._surfaceFrameReady = true; - } - } - - readonly property var quickshellScreens: Quickshell.screens - - onQuickshellScreensChanged: { - if (!visible && !shouldBeVisible) - return; - const currentScreenName = screen?.name; - if (!currentScreenName) { - hide(); - return; - } - for (let i = 0; i < Quickshell.screens.length; i++) { - if (Quickshell.screens[i].name === currentScreenName) - return; - } - expanded = false; - shouldBeVisible = false; - visible = false; - hideTimer.stop(); - closeTimer.stop(); - osdHidden(); - } - - WlrLayershell.layer: LayerShell.fromEnv("DMS_OSD_LAYER", WlrLayer.Overlay, { - "allow": ["top", "overlay"], - "invalidLayer": WlrLayer.Overlay, - "label": "OSDs" - }) - WlrLayershell.exclusiveZone: -1 - WlrLayershell.keyboardFocus: WlrKeyboardFocus.None - - WindowBlur { - targetWindow: root - surfaceColor: Theme.withAlpha(root.surfaceColor, osdContainer.popupSurfaceAlpha) - blurX: shadowBuffer - blurY: shadowBuffer - blurWidth: presented ? alignedWidth : 0 - blurHeight: presented ? alignedHeight : 0 - blurRadius: root.surfaceRadius - } - - color: "transparent" - - readonly property real dpr: CompositorService.getScreenScale(screen) - readonly property real screenWidth: screen.width - readonly property real screenHeight: screen.height - readonly property real shadowBuffer: Theme.elevationRenderPadding(Theme.elevationLevel2, Theme.elevationLightDirection, Theme.spacingXS, Theme.spacingS, Theme.spacingL) - readonly property real alignedWidth: Theme.px(osdWidth, dpr) - readonly property real alignedHeight: Theme.px(osdHeight, dpr) - - readonly property bool isVerticalLayout: osdPosition === SettingsData.Position.LeftCenter || osdPosition === SettingsData.Position.RightCenter - - readonly property var barEdgeOffsets: { - const offsets = { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }; - const configs = SettingsData.barConfigs; - if (!screen || !configs) - return offsets; - const defaultBar = SettingsData.getPrimaryBarConfig(); - for (var i = 0; i < configs.length; i++) { - const bc = configs[i]; - if (!bc || !(bc.enabled ?? true) || !(bc.visible ?? true)) - continue; - if (SettingsData.isIslandBarConfig(bc)) - continue; - if (!SettingsData.barConfigCoversScreen(bc, screen)) - continue; - const innerPadding = bc.innerPadding ?? (defaultBar?.innerPadding ?? 4); - const thickness = Theme.barThickness(innerPadding, dpr); - const spacing = bc.spacing ?? (defaultBar?.spacing ?? 4); - const bottomGap = bc.bottomGap ?? (defaultBar?.bottomGap ?? 0); - const offset = thickness + spacing + bottomGap; - switch (bc.position ?? SettingsData.Position.Top) { - case SettingsData.Position.Top: - offsets.top = Math.max(offsets.top, offset); - break; - case SettingsData.Position.Bottom: - offsets.bottom = Math.max(offsets.bottom, offset); - break; - case SettingsData.Position.Left: - offsets.left = Math.max(offsets.left, offset); - break; - case SettingsData.Position.Right: - offsets.right = Math.max(offsets.right, offset); - break; - } - } - offsets.top = Math.max(offsets.top, SettingsData.dankIslandEdgeOffset(screen, "top")); - offsets.bottom = Math.max(offsets.bottom, SettingsData.dankIslandEdgeOffset(screen, "bottom")); - offsets.left = Math.max(offsets.left, SettingsData.dankIslandEdgeOffset(screen, "left")); - offsets.right = Math.max(offsets.right, SettingsData.dankIslandEdgeOffset(screen, "right")); - return offsets; - } - - function dockOffsetForEdge(side) { - return SettingsData.dockReservationForEdge(screen, side); - } - - function edgeInset(side) { - return Theme.spacingM + Math.max(barEdgeOffsets[side], dockOffsetForEdge(side)); - } - - function placeAlong(align, extent, size, startSide, endSide) { - switch (align) { - case -1: - return Theme.snap(edgeInset(startSide), dpr); - case 1: - return Theme.snap(extent - size - edgeInset(endSide), dpr); - default: - return Theme.snap((extent - size) / 2, dpr); - } - } - - readonly property int alignX: { - switch (osdPosition) { - case SettingsData.Position.Left: - case SettingsData.Position.Bottom: - case SettingsData.Position.LeftCenter: - return -1; - case SettingsData.Position.Top: - case SettingsData.Position.Right: - case SettingsData.Position.RightCenter: - return 1; - default: - return 0; - } - } - - readonly property int alignY: { - switch (osdPosition) { - case SettingsData.Position.Top: - case SettingsData.Position.Left: - case SettingsData.Position.TopCenter: - return -1; - case SettingsData.Position.Right: - case SettingsData.Position.Bottom: - case SettingsData.Position.BottomCenter: - return 1; - default: - return 0; - } - } - - readonly property real alignedX: placeAlong(alignX, screenWidth, alignedWidth, "left", "right") - readonly property real alignedY: placeAlong(alignY, screenHeight, alignedHeight, "top", "bottom") - - anchors { - top: true - left: true - } - - readonly property real windowX: Math.max(0, Theme.snap(alignedX - shadowBuffer, dpr)) - readonly property real windowY: Math.max(0, Theme.snap(alignedY - shadowBuffer, dpr)) - - WlrLayershell.margins { - left: root.windowX - top: root.windowY - } - - implicitWidth: alignedWidth + (shadowBuffer * 2) - implicitHeight: alignedHeight + (shadowBuffer * 2) - - readonly property var scaleSpringParams: Theme.springPreset("default", animationDuration) - - SpringMotion { - id: osdScaleSpring - reducedMotion: root.animationDuration <= 0 - positionEpsilon: 0.001 - velocityEpsilon: positionEpsilon * damping / Math.max(0.001, 2 * mass) - stiffness: root.scaleSpringParams.stiffness - damping: root.scaleSpringParams.damping - value: root.presented ? 1 : Theme.popupEnterScale - - Component.onCompleted: snapTo(root.presented ? 1 : Theme.popupEnterScale) - } - - onPresentedChanged: osdScaleSpring.retarget(root.presented ? 1 : Theme.popupEnterScale) - - Timer { - id: hideTimer - - interval: autoHideInterval - repeat: false - onTriggered: { - if (expanded) - return; - if (!enableMouseInteraction || !mouseArea.containsMouse) { - hide(); - } else { - hideTimer.restart(); - } - } - } - - Timer { - id: closeTimer - interval: Math.max(animationDuration + 50, Math.round(osdScaleSpring.settleDurationMs) + 50) - onTriggered: { - if (!shouldBeVisible) { - visible = false; - osdHidden(); - } - } - } - - Item { - id: osdContainer - x: shadowBuffer - y: shadowBuffer - width: alignedWidth - height: alignedHeight - opacity: presented ? 1 : 0 - scale: osdScaleSpring.value - - property bool childHovered: false - readonly property real popupSurfaceAlpha: Theme.popupTransparency - - ElevationShadow { - id: bgShadowLayer - anchors.fill: parent - z: -2 - level: Theme.elevationLevel2 - fallbackOffset: Theme.spacingXS - targetRadius: root.surfaceRadius - targetColor: Theme.withAlpha(root.surfaceColor, osdContainer.popupSurfaceAlpha) - borderColor: Theme.outlineVariant - borderWidth: 0 - shadowEnabled: Theme.elevationEnabled && SettingsData.popoutElevationEnabled && Quickshell.env("DMS_DISABLE_LAYER") !== "true" && Quickshell.env("DMS_DISABLE_LAYER") !== "1" - } - - MouseArea { - id: mouseArea - anchors.fill: parent - hoverEnabled: enableMouseInteraction - acceptedButtons: Qt.NoButton - propagateComposedEvents: true - z: -1 - onContainsMouseChanged: updateHoverState() - } - - onChildHoveredChanged: updateHoverState() - - Loader { - id: contentLoader - anchors.fill: parent - active: root.visible - asynchronous: false - } - - Behavior on opacity { - NumberAnimation { - duration: animationDuration - easing.type: animationEasing - } - } - } - - mask: Region { - item: bgShadowLayer - } - - LazyLoader { - id: sheetLoader - active: root.expanded - - DankOSDSheet { - host: root - onPresented: root.visible = false - onDismissed: root.finishSheet() - } - } +DOSD { + id: shim + Component.onCompleted: Deprecation.type(shim, "DankOSD", "DOSD", "qs.Widgets") } diff --git a/quickshell/Widgets/DankPopout.qml b/quickshell/Widgets/DankPopout.qml index 1a8142ab5..5108fd890 100644 --- a/quickshell/Widgets/DankPopout.qml +++ b/quickshell/Widgets/DankPopout.qml @@ -1,435 +1,7 @@ import QtQuick import qs.Common -import qs.Services -Item { - id: root - readonly property var log: Log.scoped("DankPopout") - - property string layerNamespace: "dms:popout" - property Component content: null - property Component overlayContent: null - property real popupWidth: 400 - property real popupHeight: 300 - property real triggerX: 0 - property real triggerY: 0 - property real triggerWidth: 40 - property string triggerSection: "" - property string positioning: "center" - property int animationDuration: Theme.popoutAnimationDuration - property real animationScaleCollapsed: Theme.effectScaleCollapsed - property real animationOffset: Theme.effectAnimOffset - property list animationEnterCurve: Theme.variantPopoutEnterCurve - property list animationExitCurve: Theme.variantPopoutExitCurve - property list resizeCurve: Theme.variantPopoutResizeCurve - property int resizeDuration: animationDuration - property bool resizeMotion: false - property bool resizing: false - property real surfacePadding: 0 - property real inputMargin: 0 - property bool suspendShadowWhileResizing: false - property bool shouldBeVisible: false - property bool hoverDismissEnabled: false - property bool hoverDismissSuspended: false - property var customKeyboardFocus: null - readonly property alias transientSurfaceTracker: _transientSurfaceTracker - readonly property bool effectiveHoverDismissSuspended: hoverDismissSuspended || (transientSurfaceTracker?.active ?? false) - property bool backgroundInteractive: true - property bool contentHandlesKeys: false - property bool fullHeightSurface: false - property real minimumSurfaceWidth: 0 - property bool _primeContent: false - property bool _warmContent: false - - property real storedBarThickness: Theme.barThickness(SettingsData.getPrimaryBarConfig()?.innerPadding ?? 4, 1) - property real storedBarSpacing: 4 - property var storedBarConfig: null - property var sourceRegistration: null - property bool closesWithSource: true - readonly property bool sourceActive: !sourceRegistration || BarWidgetService.registrationActive(sourceRegistration) - onSourceActiveChanged: if (!sourceActive && closesWithSource) - close() - property var sourceDock: null - readonly property var inlineDockBounds: storedBarConfig?.widgetExpansion === "inline" ? sourceDock?.surfaceBounds ?? null : null - property bool triggerUsesOverlayLayer: false - property var adjacentBarInfo: ({ - "topBar": 0, - "bottomBar": 0, - "leftBar": 0, - "rightBar": 0 - }) - property var screen: null - property int effectiveBarPosition: 0 - property real effectiveBarBottomGap: 0 - - signal opened - signal popoutClosed - signal closeAnimationFinished - signal backgroundClicked - - readonly property var contentLoader: impl.item ? impl.item.contentLoader : _fallbackContentLoader - readonly property var overlayLoader: impl.item ? impl.item.overlayLoader : _fallbackOverlayLoader - readonly property var backgroundWindow: impl.item ? impl.item.backgroundWindow : null - readonly property var contentWindow: impl.item ? impl.item.contentWindow : null - - TransientSurfaceTracker { - id: _transientSurfaceTracker - } - - // Hyprland OnDemand grab: whitelist popout surfaces and bars so dismiss clicks still land. - DankFocusGrab { - windows: { - const list = []; - if (root.contentWindow) - list.push(root.contentWindow); - if (root.backgroundWindow && root.backgroundWindow !== root.contentWindow) - list.push(root.backgroundWindow); - const transientWindows = root.transientSurfaceTracker?.focusWindows ?? []; - return list.concat(transientWindows).concat(KeyboardFocus.barWindows); - } - wanted: KeyboardFocus.wantsGrab(root.shouldBeVisible, root.customKeyboardFocus) - } - - Loader { - id: _fallbackContentLoader - active: false - } - Loader { - id: _fallbackOverlayLoader - active: false - } - readonly property bool isClosing: impl.item ? (impl.item.isClosing ?? false) : false - readonly property real dpr: impl.item ? impl.item.dpr : 1 - readonly property real screenWidth: impl.item ? impl.item.screenWidth : 0 - readonly property real screenHeight: impl.item ? impl.item.screenHeight : 0 - readonly property real alignedX: impl.item ? impl.item.alignedX : 0 - readonly property real alignedY: impl.item ? impl.item.alignedY : 0 - readonly property real alignedWidth: impl.item ? impl.item.alignedWidth : 0 - readonly property real alignedHeight: impl.item ? impl.item.alignedHeight : 0 - readonly property real renderedAlignedX: impl.item ? (impl.item.renderedAlignedX ?? impl.item.alignedX) : 0 - readonly property real renderedAlignedY: impl.item ? (impl.item.renderedAlignedY ?? impl.item.alignedY) : 0 - readonly property real renderedAlignedWidth: impl.item ? (impl.item.renderedAlignedWidth ?? impl.item.alignedWidth) : 0 - readonly property real renderedAlignedHeight: impl.item ? (impl.item.renderedAlignedHeight ?? impl.item.alignedHeight) : 0 - readonly property real maxBodyWidth: impl.item ? impl.item.maxBodyWidth : 0 - readonly property real maxBodyHeight: impl.item ? impl.item.maxBodyHeight : 0 - - function alignedXFor(width) { - return impl.item?.alignedXFor(width) ?? 0; - } - readonly property vector4d surfaceCornerRadii: impl.item?.surfaceCornerRadii ?? Qt.vector4d(Theme.windowRadius, Theme.windowRadius, Theme.windowRadius, Theme.windowRadius) - readonly property real maskX: impl.item ? impl.item.maskX : 0 - readonly property real maskY: impl.item ? impl.item.maskY : 0 - readonly property real maskWidth: impl.item ? impl.item.maskWidth : 0 - readonly property real maskHeight: impl.item ? impl.item.maskHeight : 0 - readonly property real barX: impl.item ? impl.item.barX : 0 - readonly property real barY: impl.item ? impl.item.barY : 0 - readonly property real barWidth: impl.item ? impl.item.barWidth : 0 - readonly property real barHeight: impl.item ? impl.item.barHeight : 0 - readonly property bool useConnectedBackend: _usesConnectedBackendForScreen(screen) - property bool _resolvedConnected: false - property bool _pendingOpen: false - - Timer { - id: _pendingOpenTimer - interval: 0 - onTriggered: { - if (!root._pendingOpen || !impl.item) - return; - root._pendingOpen = false; - impl.item.open(); - } - } - - onUseConnectedBackendChanged: _maybeResolveBackend() - Component.onCompleted: _loadHost(_usesConnectedBackendForScreen(screen)) - - Connections { - target: SettingsData - function onConnectedFrameModeActiveChanged() { - root._maybeResolveBackend(); - } - function onFrameEnabledChanged() { - root._maybeResolveBackend(); - } - function onFrameScreenPreferencesChanged() { - root._maybeResolveBackend(); - } - function onDockConfigsChanged() { - root._maybeResolveBackend(); - } - function onBarConfigsChanged() { - root._maybeResolveBackend(); - } - } - - function _usesConnectedBackendForScreen(targetScreen) { - return CompositorService.usesConnectedFrameChromeForScreen(targetScreen); - } - - function _maybeResolveBackend() { - _resolveBackendForScreen(screen); - } - - function _resolveBackendForScreen(targetScreen) { - const connected = _usesConnectedBackendForScreen(targetScreen); - if (_resolvedConnected === connected) - return; - if (impl.item && (impl.item.shouldBeVisible || impl.item.isClosing)) - return; - _loadHost(connected); - } - - function _loadHost(connected) { - impl.sourceComponent = null; - _resolvedConnected = connected; - impl.sourceComponent = hostComponent; - } - - function open() { - _maybeResolveBackend(); - if (impl.item) { - _pendingOpen = false; - impl.item.open(); - return; - } - _pendingOpen = true; - } - - function close() { - _close(false); - } - - function instantClose() { - _close(true); - } - - function _close(instant) { - _pendingOpen = false; - _pendingOpenTimer.stop(); - transientSurfaceTracker?.closeAll?.(); - if (impl.item) { - instant ? impl.item.instantClose() : impl.item.close(); - return; - } - PopoutManager.hidePopout(root); - if (!shouldBeVisible) - return; - shouldBeVisible = false; - popoutClosed(); - } - - function cancelHoverDismiss() { - if (impl.item?.cancelHoverDismiss) - impl.item.cancelHoverDismiss(); - } - - // Fade out in place during morph switch transitions. - function beginSupersededClose() { - if (impl.item) - impl.item.beginSupersededClose(); - } - - function closeFromHoverDismiss() { - if (effectiveHoverDismissSuspended) - return; - transientSurfaceTracker?.closeAll?.(); - hoverDismissEnabled = false; - // Enable animations using standard Theme-bound popout motion to preserve bindings. - if (impl.item) - impl.item.animationsEnabled = true; - for (const prop of ["dashVisible", "notificationHistoryVisible"]) { - if (root[prop] !== undefined) { - root[prop] = false; - return; - } - } - if (impl.item) - impl.item.close(); - else - close(); - } - - function toggle() { - (shouldBeVisible || _pendingOpen) ? close() : open(); - } - - function setBarContext(position, bottomGap) { - effectiveBarPosition = position !== undefined ? position : 0; - effectiveBarBottomGap = bottomGap !== undefined ? bottomGap : 0; - } - - function _triggerBarUsesOverlayLayer(targetScreen, barConfig) { - const frameHostsBar = CompositorService.frameHostsBarForConfig(targetScreen, barConfig); - const frameRequiresOverlay = CompositorService.framePeerSurfacesUseOverlayForScreen(targetScreen) && !frameHostsBar; - return LayerShell.envUsesOverlay("DMS_DANKBAR_LAYER", (barConfig?.useOverlayLayer ?? false) || frameRequiresOverlay); - } - - function dockClearance(side, popupGap) { - if (!screen) - return 0; - const reserved = SettingsData.dockReservationForEdge(screen, side); - const frameInset = CompositorService.frameWindowVisibleForScreen(screen) ? SettingsData.frameEdgeInsetForSide(screen, side) : 0; - let clearance = reserved > 0 ? reserved + frameInset : 0; - if (sourceDock?.config?.enabled && sourceDock.reveal && sourceDock.connectedBarSide === side) { - const bounds = sourceDock.surfaceBounds; - switch (side) { - case "top": - clearance = Math.max(clearance, bounds.y + bounds.height); - break; - case "bottom": - clearance = Math.max(clearance, screen.height - bounds.y); - break; - case "left": - clearance = Math.max(clearance, bounds.x + bounds.width); - break; - case "right": - clearance = Math.max(clearance, screen.width - bounds.x); - break; - } - } - return clearance > 0 ? clearance + popupGap : 0; - } - - function setTriggerPosition(x, y, width, section, targetScreen, barPosition, barThickness, barSpacing, barConfig, sourceItem) { - sourceRegistration = BarWidgetService.registrationForItem(sourceItem); - sourceDock = null; - for (let item = sourceItem; item; item = item.parent) { - if (item.surfaceContext?.kind !== "dock") - continue; - sourceDock = item.surfaceContext.host; - break; - } - if (barConfig?.widgetExpansion === "inline" && sourceDock) { - const bounds = sourceDock.surfaceBounds; - const gap = CompositorService.usesConnectedFrameChromeForScreen(targetScreen) && !barConfig.useOverlayLayer ? 0 : (barConfig.popupGapsAuto !== false ? Math.max(4, barSpacing) : barConfig.popupGapsManual ?? 4); - switch (barPosition) { - case SettingsData.Position.Top: - y = bounds.y + bounds.height + gap; - break; - case SettingsData.Position.Bottom: - y = bounds.y - gap; - break; - case SettingsData.Position.Left: - x = bounds.x + bounds.width + gap; - break; - case SettingsData.Position.Right: - x = bounds.x - gap; - break; - } - } - if (barConfig?.widgetExpansion === "popout" && targetScreen) { - const anchor = BarWidgetService.naturalPopoutAnchor(targetScreen, sourceItem, section); - if (!anchor) - return; - x = anchor.trigger.x; - y = anchor.trigger.y; - width = anchor.trigger.width; - section = anchor.section; - barPosition = anchor.position; - barThickness = anchor.thickness; - barSpacing = anchor.spacing; - barConfig = anchor.config; - } - triggerX = x; - triggerY = y; - triggerWidth = width; - triggerSection = section; - screen = targetScreen; - - storedBarThickness = barThickness !== undefined ? barThickness : Theme.barThickness(SettingsData.getPrimaryBarConfig()?.innerPadding ?? 4, 1); - storedBarSpacing = barSpacing !== undefined ? barSpacing : 4; - storedBarConfig = barConfig; - triggerUsesOverlayLayer = _triggerBarUsesOverlayLayer(targetScreen, barConfig); - - const pos = barPosition !== undefined ? barPosition : 0; - const bottomGap = barConfig ? (barConfig.bottomGap !== undefined ? barConfig.bottomGap : 0) : 0; - - adjacentBarInfo = SettingsData.getAdjacentBarInfo(targetScreen, pos, barConfig); - setBarContext(pos, bottomGap); - _resolveBackendForScreen(targetScreen); - } - - function updateSurfacePosition() { - if (impl.item) - impl.item.updateSurfacePosition(); - } - - function containsGlobalPoint(gx, gy) { - if (!screen) - return false; - const presented = shouldBeVisible || (impl.item?.isClosing ?? false); - if (!presented) - return false; - const padding = 24; - const x = renderedAlignedX - padding; - const y = renderedAlignedY - padding; - const w = renderedAlignedWidth + padding * 2; - const h = renderedAlignedHeight + padding * 2; - return gx >= x && gx <= x + w && gy >= y && gy <= y + h; - } - - Loader { - id: impl - active: root.screen !== null - onItemChanged: if (item) - root._wireBackend(item) - } - - Component { - id: hostComponent - DankPopoutHost { - id: host - - popoutHandle: root - connected: root._resolvedConnected - - onShouldBeVisibleChanged: { - if (root.shouldBeVisible !== host.shouldBeVisible) - root.shouldBeVisible = host.shouldBeVisible; - } - onOpened: root.opened() - onCloseAnimationFinished: root.closeAnimationFinished() - onPopoutClosed: { - root.popoutClosed(); - root._maybeResolveBackend(); - } - onBackgroundClicked: root.backgroundClicked() - } - } - - function _wireBackend(it) { - if (root.shouldBeVisible && !_pendingOpen) - root.shouldBeVisible = false; - if (root._primeContent) - it.primeContent(); - if (root._warmContent) - it.warmContent(); - if (_pendingOpen) - _pendingOpenTimer.restart(); - } - - function primeContent() { - _primeContent = true; - if (impl.item) - impl.item.primeContent(); - } - - function clearPrimedContent() { - _primeContent = false; - if (impl.item) - impl.item.clearPrimedContent(); - } - - function warmContent() { - _warmContent = true; - if (impl.item) - impl.item.warmContent(); - } - - onShouldBeVisibleChanged: { - if (!shouldBeVisible) - transientSurfaceTracker?.closeAll?.(); - if (impl.item && impl.item.shouldBeVisible !== shouldBeVisible) - impl.item.shouldBeVisible = shouldBeVisible; - } +DPopout { + id: shim + Component.onCompleted: Deprecation.type(shim, "DankPopout", "DPopout", "qs.Widgets") } diff --git a/quickshell/Widgets/DankSeekbar.qml b/quickshell/Widgets/DankSeekbar.qml index 7d4cf4b3f..0851c299e 100644 --- a/quickshell/Widgets/DankSeekbar.qml +++ b/quickshell/Widgets/DankSeekbar.qml @@ -1,322 +1,7 @@ import QtQuick -import Quickshell.Services.Mpris import qs.Common -import qs.DCommon.Widgets -import qs.Widgets -Item { - id: root - - LayoutMirroring.enabled: false - LayoutMirroring.childrenInherit: true - - property MprisPlayer activePlayer - property real stableLength: 0 - readonly property bool canSeek: enabled && (activePlayer?.canSeek ?? false) && stableLength > 0 - readonly property real minimumValue: 0 - readonly property real maximumValue: 1 - readonly property real stepSize: stableLength > 0 ? 5 / stableLength : 0 - activeFocusOnTab: canSeek - Accessible.role: Accessible.Slider - Accessible.name: I18n.tr("Playback position", "media seekbar accessible name") - Accessible.focusable: canSeek - Accessible.onIncreaseAction: seekBy(5) - Accessible.onDecreaseAction: seekBy(-5) - - function seekTo(position) { - if (!canSeek) - return; - const clamped = Math.max(0.1, Math.min(position, stableLength * 0.99)); - activePlayer.position = clamped; - beginCommittedSeekPreview(clamped); - } - - function seekBy(seconds) { - seekTo(value * stableLength + seconds); - } - - Keys.onPressed: event => { - if (!canSeek) - return; - switch (event.key) { - case Qt.Key_Left: - seekBy(-5); - break; - case Qt.Key_Right: - seekBy(5); - break; - case Qt.Key_PageUp: - seekBy(stableLength / 10); - break; - case Qt.Key_PageDown: - seekBy(-stableLength / 10); - break; - case Qt.Key_Home: - seekTo(0); - break; - case Qt.Key_End: - seekTo(stableLength); - break; - default: - return; - } - event.accepted = true; - } - - FocusRing { - radius: Theme.cornerRadiusXS + Theme.focusRingOffset - visible: root.activeFocus - } - property color accentColor: Theme.primary - property color accentTrackColor: Theme.withAlpha(accentColor, 0.28) - property color accentSubtleColor: Theme.withAlpha(accentColor, 0.55) - - property real seekPreviewRatio: -1 - readonly property real playerValue: { - if (!activePlayer || stableLength <= 0) - return 0; - const pos = activePlayer.position || 0; - const calculatedRatio = pos / stableLength; - return Math.max(0, Math.min(1, calculatedRatio)); - } - property real value: seekPreviewRatio >= 0 ? seekPreviewRatio : playerValue - property bool isSeeking: false - property bool isDraggingSeek: false - property real committedSeekRatio: -1 - property int previewSettleChecksRemaining: 0 - property real dragThreshold: 4 - property int holdIndicatorDelay: 180 - - function clampRatio(ratio) { - return Math.max(0, Math.min(1, ratio)); - } - - function ratioForPosition(position) { - if (!activePlayer || stableLength <= 0) - return 0; - return clampRatio(position / stableLength); - } - - function positionForRatio(ratio) { - if (!activePlayer || stableLength <= 0) - return 0; - const rawPosition = clampRatio(ratio) * stableLength; - return Math.min(rawPosition, stableLength * 0.99); - } - - function updatePreviewFromMouse(mouseX, width) { - if (!activePlayer || stableLength <= 0 || width <= 0) - return; - seekPreviewRatio = clampRatio(mouseX / width); - } - - function clearCommittedSeekPreview() { - previewSettleTimer.stop(); - committedSeekRatio = -1; - previewSettleChecksRemaining = 0; - if (!isSeeking) - seekPreviewRatio = -1; - } - - function beginCommittedSeekPreview(position) { - seekPreviewRatio = ratioForPosition(position); - committedSeekRatio = seekPreviewRatio; - previewSettleChecksRemaining = 15; - previewSettleTimer.restart(); - } - - function handleSeekPressed(mouse, width, mouseArea, holdTimer) { - isSeeking = true; - isDraggingSeek = false; - mouseArea.pressX = mouse.x; - clearCommittedSeekPreview(); - holdTimer.restart(); - if (activePlayer && stableLength > 0 && activePlayer.canSeek) { - updatePreviewFromMouse(mouse.x, width); - mouseArea.pendingSeekPosition = positionForRatio(seekPreviewRatio); - } - } - - function handleSeekReleased(mouseArea, holdTimer) { - holdTimer.stop(); - isSeeking = false; - isDraggingSeek = false; - if (mouseArea.pendingSeekPosition >= 0 && activePlayer && activePlayer.canSeek && stableLength > 0) { - const clamped = Math.min(mouseArea.pendingSeekPosition, stableLength * 0.99); - activePlayer.position = Math.max(0.1, clamped); - mouseArea.pendingSeekPosition = -1; - beginCommittedSeekPreview(clamped); - } else { - seekPreviewRatio = -1; - } - } - - function handleSeekPositionChanged(mouse, width, mouseArea) { - if (mouseArea.pressed && isSeeking && activePlayer && stableLength > 0 && activePlayer.canSeek) { - if (!isDraggingSeek && Math.abs(mouse.x - mouseArea.pressX) >= dragThreshold) - isDraggingSeek = true; - updatePreviewFromMouse(mouse.x, width); - mouseArea.pendingSeekPosition = positionForRatio(seekPreviewRatio); - } - } - - function handleSeekCanceled(mouseArea, holdTimer) { - holdTimer.stop(); - isSeeking = false; - isDraggingSeek = false; - mouseArea.pendingSeekPosition = -1; - clearCommittedSeekPreview(); - } - - Timer { - id: previewSettleTimer - interval: 80 - repeat: true - onTriggered: { - if (root.isSeeking || root.committedSeekRatio < 0) { - stop(); - return; - } - - const previewSettled = Math.abs(root.playerValue - root.committedSeekRatio) <= 0.0015; - if (previewSettled || root.previewSettleChecksRemaining <= 0) { - root.clearCommittedSeekPreview(); - return; - } - - root.previewSettleChecksRemaining -= 1; - } - } - - implicitHeight: 20 - - Loader { - anchors.fill: parent - visible: activePlayer && stableLength > 0 - sourceComponent: MediaOptions.waveProgress ? waveProgressComponent : flatProgressComponent - z: 1 - - Component { - id: waveProgressComponent - - M3WaveProgress { - value: root.value - actualValue: root.playerValue - showActualPlaybackState: root.isSeeking - fillColor: root.accentColor - playheadColor: root.accentColor - trackColor: root.accentTrackColor - actualProgressColor: root.accentSubtleColor - isPlaying: activePlayer && activePlayer.playbackState === MprisPlaybackState.Playing - onFrameTicked: { - if (!root.isSeeking) - activePlayer.positionChanged(); - } - - MouseArea { - id: waveMouseArea - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - enabled: activePlayer && activePlayer.canSeek && stableLength > 0 - - property real pendingSeekPosition: -1 - property real pressX: 0 - - Timer { - id: waveHoldIndicatorTimer - interval: root.holdIndicatorDelay - repeat: false - onTriggered: { - if (parent.pressed && root.isSeeking) - root.isDraggingSeek = true; - } - } - - onPressed: mouse => root.handleSeekPressed(mouse, parent.width, waveMouseArea, waveHoldIndicatorTimer) - onReleased: root.handleSeekReleased(waveMouseArea, waveHoldIndicatorTimer) - onPositionChanged: mouse => root.handleSeekPositionChanged(mouse, parent.width, waveMouseArea) - onCanceled: root.handleSeekCanceled(waveMouseArea, waveHoldIndicatorTimer) - } - } - } - - Component { - id: flatProgressComponent - - Item { - property real lineWidth: 3 - property color trackColor: Theme.withAlpha(Theme.surfaceVariant, 0.40) - property color fillColor: root.accentColor - property color playheadColor: root.accentColor - property color actualProgressColor: Theme.onSurface_38 - readonly property real midY: height / 2 - - Rectangle { - width: parent.width - height: parent.lineWidth - anchors.verticalCenter: parent.verticalCenter - color: parent.trackColor - radius: Theme.fullRadius(width, height) - } - - Rectangle { - width: Math.max(0, Math.min(parent.width, parent.width * root.value)) - height: parent.lineWidth - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - color: parent.fillColor - radius: Theme.fullRadius(width, height) - } - - Rectangle { - visible: root.isDraggingSeek - width: 2 - height: Math.max(parent.lineWidth + 4, 10) - radius: Theme.fullRadius(width, height) - color: parent.actualProgressColor - x: Math.max(0, Math.min(parent.width, parent.width * root.playerValue)) - width / 2 - y: parent.midY - height / 2 - z: 2 - } - - Rectangle { - id: playhead - width: 3 - height: Math.max(parent.lineWidth + 8, 14) - radius: Theme.fullRadius(width, height) - color: parent.playheadColor - x: Math.max(0, Math.min(parent.width, parent.width * root.value)) - width / 2 - y: parent.midY - height / 2 - z: 3 - } - - MouseArea { - id: flatMouseArea - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - enabled: activePlayer && activePlayer.canSeek && stableLength > 0 - - property real pendingSeekPosition: -1 - property real pressX: 0 - - Timer { - id: flatHoldIndicatorTimer - interval: root.holdIndicatorDelay - repeat: false - onTriggered: { - if (parent.pressed && root.isSeeking) - root.isDraggingSeek = true; - } - } - - onPressed: mouse => root.handleSeekPressed(mouse, parent.width, flatMouseArea, flatHoldIndicatorTimer) - onReleased: root.handleSeekReleased(flatMouseArea, flatHoldIndicatorTimer) - onPositionChanged: mouse => root.handleSeekPositionChanged(mouse, parent.width, flatMouseArea) - onCanceled: root.handleSeekCanceled(flatMouseArea, flatHoldIndicatorTimer) - } - } - } - } +DSeekbar { + id: shim + Component.onCompleted: Deprecation.type(shim, "DankSeekbar", "DSeekbar", "qs.Widgets") } diff --git a/quickshell/Widgets/DankSlideout.qml b/quickshell/Widgets/DankSlideout.qml index beeaa6626..5c7b29898 100644 --- a/quickshell/Widgets/DankSlideout.qml +++ b/quickshell/Widgets/DankSlideout.qml @@ -1,324 +1,7 @@ -pragma ComponentBehavior: Bound import QtQuick -import Quickshell -import Quickshell.Wayland import qs.Common -import qs.Services -import qs.DCommon.Widgets -import qs.Widgets -PanelWindow { - id: root - - property string layerNamespace: "dms:slideout" - WlrLayershell.namespace: layerNamespace - - property bool isVisible: false - property bool hoverDismissEnabled: false - property bool hoverDismissSuspended: false - property var targetScreen: null - property var modelData: null - property bool triggerUsesOverlayLayer: false - // Drop off the Overlay layer (back to Top) while an overlay modal - property bool suppressOverlayLayer: false - property real slideoutWidth: 480 - property bool expandable: false - property bool expandedWidth: false - property real expandedWidthValue: 960 - property real edgeGap: 0 - property string slideEdge: "right" - readonly property bool slideFromLeft: slideEdge === "left" - readonly property real surfaceOriginX: slideFromLeft ? 0 : Math.max(0, (modelData?.width ?? width) - width) - property Component content: null - property bool contentRequested: false - property string title: "" - property alias container: contentContainer - property alias loadedItem: contentLoader.item - property real customTransparency: -1 - property bool mappedVisible: false - signal aboutToHide - signal revealed - - function show() { - contentRequested = true; - mappedVisible = true; - Qt.callLater(() => { - isVisible = true; - revealed(); - }); - } - - function hide() { - aboutToHide(); - isVisible = false; - } - - function hideFromHoverDismiss() { - if (hoverDismissSuspended) - return; - hoverDismissEnabled = false; - slideContainer.slideSlowExit = true; - hide(); - } - - function cancelHoverDismiss() { - hoverDismissTracker.cancelPending(); - } - - function containsGlobalPoint(gx, gy) { - if (!isVisible || !modelData) - return false; - const padding = 24; - const topLeft = slideContainer.mapToItem(null, 0, 0); - const globalX = surfaceOriginX + topLeft.x; - return gx >= globalX - padding && gx < globalX + slideContainer.width + padding && gy >= topLeft.y - padding && gy < topLeft.y + slideContainer.height + padding; - } - - function toggle() { - if (isVisible) { - hide(); - } else { - show(); - } - } - - visible: root.mappedVisible - screen: modelData - - anchors.top: true - anchors.bottom: true - anchors.right: !root.slideFromLeft - anchors.left: root.slideFromLeft - - implicitWidth: expandable ? expandedWidthValue : slideoutWidth - implicitHeight: modelData ? modelData.height : 800 - - color: "transparent" - - HoverDismissTracker { - id: hoverDismissTracker - parent: root.contentItem - enabled: root.hoverDismissEnabled && !root.hoverDismissSuspended && root.isVisible - shouldDismiss: function () { - return !PopoutManager.cursorOverBar(PopoutManager.hoverCursorGlobalX, PopoutManager.hoverCursorGlobalY); - } - onDismissRequested: root.hideFromHoverDismiss() - onHoverMoved: (sceneX, sceneY) => PopoutManager.updateHoverCursor(root.surfaceOriginX + sceneX, sceneY) - } - - readonly property bool slideoutBlurActive: root.visible && BlurService.enabled && Theme.connectedSurfaceBlurEnabled - - readonly property string _slideoutScreenName: modelData?.name ?? "" - - WlrLayershell.layer: (!suppressOverlayLayer && (triggerUsesOverlayLayer || CompositorService.framePeerSurfacesUseOverlayForScreen(modelData))) ? WlrLayershell.Overlay : WlrLayershell.Top - WlrLayershell.exclusiveZone: 0 - WlrLayershell.keyboardFocus: isVisible && !ModalManager.currentModalsByScreen[_slideoutScreenName] ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None - - readonly property real dpr: CompositorService.getScreenScale(root.screen) - readonly property real alignedWidth: Theme.px(expandable && expandedWidth ? expandedWidthValue : slideoutWidth, dpr) - onAlignedWidthChanged: widthSpring.retarget(alignedWidth) - readonly property real alignedHeight: Theme.px(modelData ? modelData.height : 800, dpr) - readonly property real alignedEdgeGap: Theme.px(edgeGap, dpr) - readonly property real slideoutSlideSnapX: Theme.snap(slideContainer.slideOffset, dpr) - - onIsVisibleChanged: { - slideSpring.retarget(isVisible ? 0 : (slideFromLeft ? -slideContainer.width : slideContainer.width)); - if (isVisible || slideSpring.running) - return; - mappedVisible = false; - } - - mask: Region { - item: Rectangle { - x: root.slideFromLeft ? root.alignedEdgeGap : (root.width - slideContainer.width - root.alignedEdgeGap) - y: root.alignedEdgeGap - width: root.isVisible ? slideContainer.width : 0 - height: root.isVisible ? root.height - root.alignedEdgeGap * 2 : 0 - } - } - - Item { - id: slideContainer - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.right: root.slideFromLeft ? undefined : parent.right - anchors.left: root.slideFromLeft ? parent.left : undefined - anchors.topMargin: root.alignedEdgeGap - anchors.bottomMargin: root.alignedEdgeGap - anchors.rightMargin: root.alignedEdgeGap - anchors.leftMargin: root.alignedEdgeGap - - property bool slideSlowExit: false - readonly property var slideSpringParams: Theme.springPreset("default", slideSlowExit ? Math.round(Theme.expressiveDurations.expressiveDefaultSpatial) : Theme.expressiveDurations.expressiveDefaultSpatial) - readonly property var widthSpringParams: Theme.springPreset("default", Theme.popoutAnimationDuration) - - SpringMotion { - id: slideSpring - reducedMotion: false - positionEpsilon: 0.05 - velocityEpsilon: 0.05 - stiffness: slideContainer.slideSpringParams.stiffness - damping: slideContainer.slideSpringParams.damping - value: root.slideFromLeft ? -root.alignedWidth : root.alignedWidth - - Component.onCompleted: snapTo(root.slideFromLeft ? -root.alignedWidth : root.alignedWidth) - - onRunningChanged: { - if (running) - return; - if (!root.isVisible) - root.mappedVisible = false; - slideContainer.slideSlowExit = false; - } - } - - SpringMotion { - id: widthSpring - enabled: root.expandable - reducedMotion: Theme.popoutAnimationDuration <= 0 - positionEpsilon: 0.05 - velocityEpsilon: 0.05 - stiffness: slideContainer.widthSpringParams.stiffness - damping: slideContainer.widthSpringParams.damping - value: root.alignedWidth - - Component.onCompleted: snapTo(root.alignedWidth) - } - - property real slideOffset: slideSpring.value - - width: widthSpring.value - height: root.alignedHeight - root.alignedEdgeGap * 2 - - Item { - id: contentRect - clip: true - - readonly property color slideoutSurfaceColor: { - if (root.customTransparency >= 0) - return Theme.withAlpha(Theme.hostSurface, root.customTransparency); - if (Theme.isConnectedEffect) - return Theme.connectedSurfaceColor; - return Theme.readableSurface; - } - - anchors.top: parent.top - anchors.bottom: parent.bottom - width: parent.width - x: root.slideoutSlideSnapX - - ElevationShadow { - anchors.fill: parent - visible: !Theme.isConnectedEffect - level: Theme.elevationLevel2 - targetRadius: Theme.windowRadius - targetColor: contentRect.slideoutSurfaceColor - shadowEnabled: Theme.elevationEnabled && SettingsData.popoutElevationEnabled - } - - Rectangle { - anchors.fill: parent - color: Theme.isConnectedEffect ? contentRect.slideoutSurfaceColor : "transparent" - radius: Theme.isConnectedEffect ? Theme.connectedSurfaceRadius : Theme.windowRadius - border.color: Theme.isConnectedEffect ? Theme.withAlpha(BlurService.borderColor, 0) : BlurService.borderColor - border.width: Theme.isConnectedEffect ? 0 : BlurService.borderWidth - } - - Item { - id: contentBody - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.right: root.slideFromLeft ? undefined : parent.right - anchors.left: root.slideFromLeft ? parent.left : undefined - width: root.alignedWidth - - Column { - id: headerColumn - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Theme.spacingL - spacing: Theme.spacingM - visible: root.title !== "" - - Row { - width: parent.width - height: 32 - - Column { - width: parent.width - buttonRow.width - spacing: Theme.spacingXS - anchors.verticalCenter: parent.verticalCenter - - StyledText { - text: root.title - font.pixelSize: Theme.fontSizeLarge - color: Theme.surfaceText - font.weight: Theme.fontWeightMedium - } - } - - Row { - id: buttonRow - spacing: Theme.spacingXS - - DActionButton { - id: expandButton - iconName: root.expandedWidth ? "unfold_less" : "unfold_more" - tooltipText: root.expandedWidth ? I18n.tr("Collapse") : I18n.tr("Expand") - iconSize: Theme.iconSize - 4 - iconColor: Theme.surfaceText - visible: root.expandable - onClicked: root.expandedWidth = !root.expandedWidth - - transform: Rotation { - angle: 90 - origin.x: expandButton.width / 2 - origin.y: expandButton.height / 2 - } - } - - DActionButton { - id: closeButton - iconName: "close" - Accessible.name: I18n.tr("Close") - iconSize: Theme.iconSize - 4 - iconColor: Theme.surfaceText - onClicked: root.hide() - } - } - } - } - - Item { - id: contentContainer - anchors.top: root.title !== "" ? headerColumn.bottom : parent.top - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - anchors.topMargin: root.title !== "" ? 0 : Theme.spacingL - anchors.leftMargin: Theme.spacingL - anchors.rightMargin: Theme.spacingL - anchors.bottomMargin: Theme.spacingL - - Loader { - id: contentLoader - anchors.fill: parent - active: root.contentRequested - sourceComponent: root.content - } - } - } - } - } - - WindowBlur { - targetWindow: root - surfaceColor: contentRect.slideoutSurfaceColor - blurX: root.slideoutBlurActive ? slideContainer.x + root.slideoutSlideSnapX : 0 - blurY: root.slideoutBlurActive ? slideContainer.y : 0 - blurWidth: root.slideoutBlurActive ? slideContainer.width : 0 - blurHeight: root.slideoutBlurActive ? slideContainer.height : 0 - blurRadius: Theme.isConnectedEffect ? Theme.connectedSurfaceRadius : Theme.windowRadius - } +DSlideout { + id: shim + Component.onCompleted: Deprecation.type(shim, "DankSlideout", "DSlideout", "qs.Widgets") } diff --git a/quickshell/Widgets/DankTooltip.qml b/quickshell/Widgets/DankTooltip.qml index 477c86768..c2feb1aff 100644 --- a/quickshell/Widgets/DankTooltip.qml +++ b/quickshell/Widgets/DankTooltip.qml @@ -1,87 +1,7 @@ import QtQuick -import Quickshell -import Quickshell.Wayland import qs.Common -import qs.DCommon.Widgets -import qs.Widgets -PanelWindow { - id: root - - WlrLayershell.namespace: "dms:tooltip" - - property string text: "" - property real targetX: 0 - property real targetY: 0 - property var targetScreen: null - property bool alignLeft: false - property bool alignRight: false - - function show(text, x, y, screen, leftAlign, rightAlign) { - root.text = text; - targetScreen = screen ?? null; - targetX = x; - targetY = y; - alignLeft = leftAlign ?? false; - alignRight = rightAlign ?? false; - visible = true; - } - - function hide() { - visible = false; - } - - screen: targetScreen - implicitWidth: Math.min(Theme.tooltipMaxWidth, textContent.implicitWidth) + Theme.spacingM * 2 - implicitHeight: textContent.implicitHeight + Theme.spacingS * 2 - color: "transparent" - mask: Region {} - visible: false - WlrLayershell.layer: WlrLayershell.Overlay - WlrLayershell.exclusiveZone: -1 - - anchors { - top: true - left: true - } - - margins { - left: { - const screenWidth = targetScreen?.width ?? Screen.width; - if (alignLeft) { - return Math.round(Math.max(Theme.spacingS, Math.min(screenWidth - implicitWidth - Theme.spacingS, targetX))); - } else if (alignRight) { - return Math.round(Math.max(Theme.spacingS, Math.min(screenWidth - implicitWidth - Theme.spacingS, targetX - implicitWidth))); - } else { - return Math.round(Math.max(Theme.spacingS, Math.min(screenWidth - implicitWidth - Theme.spacingS, targetX - implicitWidth / 2))); - } - } - top: { - const screenHeight = targetScreen?.height ?? Screen.height; - if (alignLeft || alignRight) { - return Math.round(Math.max(Theme.spacingS, Math.min(screenHeight - implicitHeight - Theme.spacingS, targetY - implicitHeight / 2))); - } else { - return Math.round(Math.max(Theme.spacingS, Math.min(screenHeight - implicitHeight - Theme.spacingS, targetY))); - } - } - } - - Rectangle { - anchors.fill: parent - color: Theme.inverseSurface - radius: Theme.cornerRadiusXS - - StyledText { - id: textContent - - anchors.centerIn: parent - text: root.text - font.pixelSize: Theme.fontSizeSmall - color: Theme.inverseOnSurface - wrapMode: Text.NoWrap - maximumLineCount: 1 - elide: Text.ElideRight - width: Math.min(implicitWidth, Theme.tooltipMaxWidth) - } - } +DTooltip { + id: shim + Component.onCompleted: Deprecation.type(shim, "DankTooltip", "DTooltip", "qs.Widgets") } diff --git a/quickshell/shell.qml b/quickshell/shell.qml index 4be23a8ce..540f4e368 100644 --- a/quickshell/shell.qml +++ b/quickshell/shell.qml @@ -36,6 +36,7 @@ ShellRoot { DC.Host.session = SessionService; DC.Host.cache = CacheData; DC.Host.files = FilesService; + DC.Host.hyprlandFocusGrab = Qt.binding(() => CompositorService.useHyprlandFocusGrab); void IconThemeService.ready; if (entrypoint.runGreeter) return; diff --git a/quickshell/tests/bar-content.test.mjs b/quickshell/tests/bar-content.test.mjs index bd3ce0d08..e823d3e75 100644 --- a/quickshell/tests/bar-content.test.mjs +++ b/quickshell/tests/bar-content.test.mjs @@ -5,7 +5,7 @@ import test from "node:test"; const read = path => readFileSync(new URL("../" + path, import.meta.url), "utf8"); const model = vm.createContext({}); -vm.runInContext(read("Modules/DankBar/WidgetModel.js").replace(/^\.pragma.*$/m, ""), model); +vm.runInContext(read("Modules/DBar/WidgetModel.js").replace(/^\.pragma.*$/m, ""), model); const plain = value => JSON.parse(JSON.stringify(value)); function method(source, name) { @@ -59,7 +59,7 @@ test("focus discovery keeps compositor names separate from first-screen fallback test("center placement preserves configured anchors, visible fallbacks and geometric extents", () => { const layout = vm.createContext({}); - vm.runInContext(read("Modules/DankBar/CenterLayout.js").replace(/^\.pragma.*$/m, ""), layout); + vm.runInContext(read("Modules/DBar/CenterLayout.js").replace(/^\.pragma.*$/m, ""), layout); const cases = [ [[], 600, 4, "index", [], 0], [[null, null], 600, 4, "geometric", [null, null], 0], @@ -81,7 +81,7 @@ test("center placement preserves configured anchors, visible fallbacks and geome test("center placement yields to side sections without overlapping them", () => { const layout = vm.createContext({}); - vm.runInContext(read("Modules/DankBar/CenterLayout.js").replace(/^\.pragma.*$/m, ""), layout); + vm.runInContext(read("Modules/DBar/CenterLayout.js").replace(/^\.pragma.*$/m, ""), layout); const cases = [ [{ min: 250 }, [250, 284, 368]], [{ max: 300 }, [122, 156, 240]], diff --git a/quickshell/tests/bar-overflow.test.mjs b/quickshell/tests/bar-overflow.test.mjs index 224ca18a9..f3ca22054 100644 --- a/quickshell/tests/bar-overflow.test.mjs +++ b/quickshell/tests/bar-overflow.test.mjs @@ -2,7 +2,7 @@ import assert from "node:assert/strict"; import test from "node:test"; import { loadScript } from "./qml-script.mjs"; -const layout = loadScript(new URL("../Modules/DankBar/OverflowLayout.js", import.meta.url)); +const layout = loadScript(new URL("../Modules/DBar/OverflowLayout.js", import.meta.url)); const entry = (size, mode = "bar") => ({ size, mode }); const options = { length: 400, spacing: 4, triggerSize: 30, restoreMargin: 8 }; const plain = value => JSON.parse(JSON.stringify(value)); diff --git a/quickshell/tests/battery-history.test.mjs b/quickshell/tests/battery-history.test.mjs index e38be6ec3..187943f39 100644 --- a/quickshell/tests/battery-history.test.mjs +++ b/quickshell/tests/battery-history.test.mjs @@ -4,7 +4,7 @@ import vm from "node:vm"; import test from "node:test"; const history = vm.createContext({}); -vm.runInContext(readFileSync(new URL("../Modules/DankBar/Popouts/BatteryHistory.js", import.meta.url), "utf8"), history); +vm.runInContext(readFileSync(new URL("../Modules/DBar/Popouts/BatteryHistory.js", import.meta.url), "utf8"), history); const plain = value => JSON.parse(JSON.stringify(value)); test("history rejects missing, malformed, and out-of-range readings", () => { diff --git a/quickshell/tests/segment-roles.test.mjs b/quickshell/tests/segment-roles.test.mjs index 7064b7311..69660a928 100644 --- a/quickshell/tests/segment-roles.test.mjs +++ b/quickshell/tests/segment-roles.test.mjs @@ -3,7 +3,7 @@ import { readFileSync } from "node:fs"; import vm from "node:vm"; import test from "node:test"; -const source = readFileSync(new URL("../Modules/DankBar/SegmentRoles.js", import.meta.url), "utf8"); +const source = readFileSync(new URL("../Modules/DBar/SegmentRoles.js", import.meta.url), "utf8"); const context = vm.createContext({}); vm.runInContext(source.replace(/^\.pragma.*$/m, ""), context); const plain = value => JSON.parse(JSON.stringify(value)); diff --git a/quickshell/tests/unit/tst_KeyboardLayoutLabels.qml b/quickshell/tests/unit/tst_KeyboardLayoutLabels.qml index 5cfae8c7f..aa7abba0d 100644 --- a/quickshell/tests/unit/tst_KeyboardLayoutLabels.qml +++ b/quickshell/tests/unit/tst_KeyboardLayoutLabels.qml @@ -1,6 +1,6 @@ import QtQuick import QtTest -import "../../Modules/DankBar/Widgets/KeyboardLayoutLabels.js" as KeyboardLayoutLabels +import "../../Modules/DBar/Widgets/KeyboardLayoutLabels.js" as KeyboardLayoutLabels TestCase { name: "KeyboardLayoutLabels" diff --git a/quickshell/tests/wellbeing-model.test.mjs b/quickshell/tests/wellbeing-model.test.mjs index 84effb1b3..7035b8378 100644 --- a/quickshell/tests/wellbeing-model.test.mjs +++ b/quickshell/tests/wellbeing-model.test.mjs @@ -2,7 +2,7 @@ import assert from "node:assert/strict"; import test from "node:test"; import { loadScript } from "./qml-script.mjs"; -const model = loadScript(new URL("../Modules/DankDash/Wellbeing/Wellbeing.js", import.meta.url)); +const model = loadScript(new URL("../Modules/DDash/Wellbeing/Wellbeing.js", import.meta.url)); const plain = value => JSON.parse(JSON.stringify(value)); const days = [ diff --git a/quickshell/translations/extract_settings_index.py b/quickshell/translations/extract_settings_index.py index 0f44b68bb..0c8faeb78 100644 --- a/quickshell/translations/extract_settings_index.py +++ b/quickshell/translations/extract_settings_index.py @@ -99,8 +99,8 @@ TAB_INDEX_MAP = { "TimeWeatherTab.qml": 1, "WeatherSettingsTab.qml": 56, "KeybindsTab.qml": 2, - "DankBarTab.qml": 3, - "DankDashTab.qml": 43, + "DBarTab.qml": 3, + "DDashTab.qml": 43, "DigitalWellbeingTab.qml": 67, "CompositorLayoutTab.qml": 37, "WindowRulesTab.qml": 38, @@ -108,8 +108,8 @@ TAB_INDEX_MAP = { "DockWidgetsTab.qml": 57, "DockAppearanceTab.qml": 58, "DockAdvancedTab.qml": 59, - "DankBarAppearanceTab.qml": 6, - "DankDotTab.qml": 65, + "DBarAppearanceTab.qml": 6, + "DDotTab.qml": 65, "NetworkStatusTab.qml": 7, "NetworkEthernetTab.qml": 39, "NetworkWifiTab.qml": 40, @@ -186,7 +186,7 @@ FILE_PAGE_MAP = { TAB_META_DEFAULT = ("Settings", None, None) # Frame and island rows live on the bar pages; ungated ones still need their feature on. -BAR_TAB_FILES = {"DankBarTab.qml", "DankBarAppearanceTab.qml"} +BAR_TAB_FILES = {"DBarTab.qml", "DBarAppearanceTab.qml"} SEARCHABLE_COMPONENTS = [ "SettingsCard", @@ -506,7 +506,7 @@ def find_settings_components(content, filename, wrappers, tab_meta, hub_meta): condition_key = "frameEnabled" elif setting_key.startswith("island"): condition_key = "islandEnabled" - if filename == "DankDotTab.qml" and not condition_key and setting_key != "dotEnabled": + if filename == "DDotTab.qml" and not condition_key and setting_key != "dotEnabled": condition_key = "dotEnabled" category, parent_label, _ = page_meta if page_meta else tab_meta.get(tab_index, TAB_META_DEFAULT)