diff --git a/EXAMPLE.md b/EXAMPLE.md index 70f5c4d..8a47f3f 100644 --- a/EXAMPLE.md +++ b/EXAMPLE.md @@ -41,6 +41,14 @@ Path: `~/.config/overzicht/settings.json` "elementMoveFast": 200 } }, + "rounding": { + // Radius for overview panel, workspace tiles, wallpaper masks, and active workspace indicator. + // Set to 0 for a fully square UI. + "screenRounding": 23, + // Radius for individual window preview masks and overlays. + // Set to 0 for square window previews. + "windowRounding": 18 + }, "sizes": { // Extra outer margin used to make room for the overview shadow/elevation effect. "elevationMargin": 10 diff --git a/README.md b/README.md index 83e1798..736ef58 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # overzicht - A standalone Quickshell workspace overview for Hyprland. + A personal-use fork of `quickshell-overview`, a Quickshell workspace overview for Hyprland. [![Repo Size](https://img.shields.io/github/repo-size/adam01110/overzicht?style=flat-square&label=repo%20size&labelColor=504945&color=3c3836)](https://github.com/adam01110/overzicht)
@@ -41,7 +41,6 @@ What I removed from upstream: - Matugen and Caelestia color-source handling. - Dynamic color template generation. - Glass mode and the related tint/border/shine settings. -- Configurable rounding. This version is square by design. ## Usage @@ -51,12 +50,6 @@ Run it directly: nix run github:adam01110/overzicht ``` -Or build it from a checkout: - -```bash -nix build .#overzicht -``` - The wrapper exposes Quickshell IPC: ```bash @@ -160,5 +153,10 @@ Useful settings: - `overview.closeOnFocusLoss` closes the overlay after outside clicks or focus loss. - `overview.workspaceMap` lets different monitors start at different workspace offsets. - `overview.previewMode` can be `live` or event-driven values like `event` / `snapshot`. +- `appearance.rounding.screenRounding` and `appearance.rounding.windowRounding` control overview corner radius. Set them to `0` for a square UI. - `windowPreview.showIcons` controls centered app icons on previews. - `windowPreview.cropToFill` controls whether full-screen previews crop into the tile. + +## Credits + +- [Original project (`Shanu-Kumawat/quickshell-overview`)](https://github.com/Shanu-Kumawat/quickshell-overview) diff --git a/common/Appearance.qml b/common/Appearance.qml index 2b03dc8..eb71f5f 100644 --- a/common/Appearance.qml +++ b/common/Appearance.qml @@ -114,14 +114,14 @@ Singleton { } rounding: QtObject { - property int unsharpen: 0 - property int verysmall: 0 - property int small: 0 - property int normal: 0 - property int large: 0 - property int full: 0 - property int screenRounding: 0 - property int windowRounding: 0 + property int unsharpen: Config.options.appearance.rounding.unsharpen + property int verysmall: Config.options.appearance.rounding.verysmall + property int small: Config.options.appearance.rounding.small + property int normal: Config.options.appearance.rounding.normal + property int large: Config.options.appearance.rounding.large + property int full: Config.options.appearance.rounding.full + property int screenRounding: Config.options.appearance.rounding.screenRounding + property int windowRounding: Config.options.appearance.rounding.windowRounding } font: QtObject { diff --git a/common/Config.qml b/common/Config.qml index 6f42986..ff6629f 100644 --- a/common/Config.qml +++ b/common/Config.qml @@ -56,6 +56,17 @@ Singleton { property QtObject options: QtObject { property QtObject appearance: QtObject { + property QtObject rounding: QtObject { + property int unsharpen: root.optionValue(["appearance", "rounding", "unsharpen"], 2) + property int verysmall: root.optionValue(["appearance", "rounding", "verysmall"], 8) + property int small: root.optionValue(["appearance", "rounding", "small"], 12) + property int normal: root.optionValue(["appearance", "rounding", "normal"], 17) + property int large: root.optionValue(["appearance", "rounding", "large"], 23) + property int full: root.optionValue(["appearance", "rounding", "full"], 9999) + property int screenRounding: root.optionValue(["appearance", "rounding", "screenRounding"], large) + property int windowRounding: root.optionValue(["appearance", "rounding", "windowRounding"], 18) + } + property QtObject font: QtObject { property QtObject family: QtObject { property string main: root.optionValue(["appearance", "font", "family", "main"], "sans-serif") diff --git a/common/widgets/StyledRectangularShadow.qml b/common/widgets/StyledRectangularShadow.qml index ccdff1a..b5080a2 100644 --- a/common/widgets/StyledRectangularShadow.qml +++ b/common/widgets/StyledRectangularShadow.qml @@ -5,7 +5,7 @@ import ".." RectangularShadow { required property var target anchors.fill: target - radius: 20 + radius: target.radius ?? 0 blur: 0.9 * Appearance.sizes.elevationMargin offset: Qt.vector2d(0.0, 1.0) spread: 1 diff --git a/modules/overview/OverviewWidget.qml b/modules/overview/OverviewWidget.qml index b73516e..ebf71ed 100644 --- a/modules/overview/OverviewWidget.qml +++ b/modules/overview/OverviewWidget.qml @@ -41,6 +41,7 @@ Item { property real panelOpacity: Math.max(0, Math.min(1, Config.options.overview.effects.panelOpacity)) property real workspaceOpacity: Math.max(0, Math.min(1, Config.options.overview.effects.workspaceOpacity)) property real emptyWorkspaceWallpaperOverlayOpacity: Math.max(0, Math.min(1, Config.options.overview.effects.emptyWorkspaceWallpaperOverlayOpacity)) + readonly property real screenRounding: Math.max(0, Appearance.rounding.screenRounding * root.scale) property int draggingFromWorkspace: -1 property int draggingTargetWorkspace: -1 @@ -136,7 +137,7 @@ Item { implicitWidth: workspaceColumnLayout.implicitWidth + padding * 2 implicitHeight: workspaceColumnLayout.implicitHeight + padding * 2 - radius: 0 + radius: root.screenRounding clip: true color: ColorUtils.applyAlpha(Appearance.colors.colLayer0, root.panelOpacity) border.width: 1 @@ -179,7 +180,7 @@ Item { implicitHeight: root.workspaceImplicitHeight clip: showWallpaper color: showWallpaper ? "transparent" : ColorUtils.applyAlpha(hoveredWhileDragging ? hoveredWorkspaceColor : defaultWorkspaceColor, root.workspaceOpacity) - radius: 0 + radius: root.screenRounding border.width: 2 border.color: hoveredWhileDragging ? hoveredBorderColor : "transparent" @@ -193,10 +194,10 @@ Item { cache: true smooth: true mipmap: true - layer.enabled: workspace.showWallpaper + layer.enabled: workspace.showWallpaper && workspace.radius > 0 layer.smooth: true layer.effect: MultiEffect { - maskEnabled: true + maskEnabled: workspace.radius > 0 maskSource: workspaceWallpaperMask maskThresholdMin: 0.5 maskSpreadAtMin: 1.0 @@ -207,7 +208,7 @@ Item { id: workspaceWallpaperMask anchors.fill: parent visible: false - layer.enabled: true + layer.enabled: workspace.radius > 0 layer.smooth: true Rectangle { anchors.fill: parent @@ -414,7 +415,7 @@ Item { width: root.workspaceImplicitWidth height: root.workspaceImplicitHeight color: "transparent" - radius: 0 + radius: root.screenRounding border.width: 2 border.color: root.activeBorderColor Behavior on x { diff --git a/modules/overview/OverviewWindow.qml b/modules/overview/OverviewWindow.qml index 52894f5..17c40b4 100644 --- a/modules/overview/OverviewWindow.qml +++ b/modules/overview/OverviewWindow.qml @@ -66,6 +66,7 @@ Item { // Window property bool indicateXWayland: windowData?.xwayland ?? false property bool previewCaptureEnabled: true property bool initialized: false + readonly property real windowRounding: Math.max(0, Appearance.rounding.windowRounding * root.scale) x: initX y: initY @@ -106,7 +107,7 @@ Item { // Window Rectangle { visible: (root.windowData?.monitor ?? -1) === root.widgetMonitorId anchors.fill: parent - radius: Appearance.rounding.windowRounding * root.scale + radius: root.windowRounding color: Appearance.colors.colLayer1 } @@ -122,10 +123,10 @@ Item { // Window height: root.cropToFill ? Math.max(parent.height, parent.width / srcAspect) : Math.min(parent.height, parent.width / srcAspect) captureSource: shouldCapturePreview ? root.toplevel : null live: livePreviewEnabled - layer.enabled: true + layer.enabled: root.windowRounding > 0 layer.smooth: true layer.effect: MultiEffect { - maskEnabled: true + maskEnabled: root.windowRounding > 0 maskSource: previewMask maskThresholdMin: 0.5 maskSpreadAtMin: 1.0 @@ -134,7 +135,7 @@ Item { // Window Rectangle { anchors.fill: parent - radius: Appearance.rounding.windowRounding * root.scale + radius: root.windowRounding color: pressed ? ColorUtils.applyAlpha(Appearance.colors.colLayer2Active, Math.min(1, root.windowOverlayOpacity + 0.30)) : hovered ? ColorUtils.applyAlpha(Appearance.colors.colLayer2Hover, Math.min(1, root.windowOverlayOpacity + 0.20)) : ColorUtils.transparentize(Appearance.colors.colLayer2) border.color: ColorUtils.transparentize(Appearance.palette.outline, 0.7) border.width: 1 @@ -173,13 +174,13 @@ Item { // Window height: windowPreview.height anchors.centerIn: parent visible: false - layer.enabled: true + layer.enabled: root.windowRounding > 0 layer.smooth: true Rectangle { anchors.centerIn: parent width: root.width height: root.height - radius: Appearance.rounding.windowRounding * root.scale + radius: root.windowRounding } }