aboutsummaryrefslogtreecommitdiffstats
path: root/config/quickshell/qs-hyprview-trixie/layouts/SatelliteLayout.qml
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmail.com>2026-07-13 15:58:40 -0400
committerPinapelz <yukais@pinapelz.com>2026-08-29 21:40:34 -0700
commit292b6daf5c56ff60a6263ff4945e74e5ca4372e7 (patch)
tree0c01784cf05adc8deec5a8a50fa71e1db294c96e /config/quickshell/qs-hyprview-trixie/layouts/SatelliteLayout.qml
parent54b56290253719aa71d8ccfddff6fa0424e22804 (diff)
Creating an overview version that works with all branches
Signed-off-by: Don Williams <don.e.williams@gmail.com> On branch development Your branch is up to date with 'origin/development'. Changes to be committed: new file: config/quickshell/overview-unified/README.md new file: config/quickshell/overview-unified/assets/image.png new file: config/quickshell/overview-unified/common/Appearance.qml new file: config/quickshell/overview-unified/common/Config.qml new file: config/quickshell/overview-unified/common/functions/ColorUtils.qml new file: config/quickshell/overview-unified/common/functions/qmldir new file: config/quickshell/overview-unified/common/qmldir new file: config/quickshell/overview-unified/common/widgets/RectangularShadow.qml new file: config/quickshell/overview-unified/common/widgets/StyledRectangularShadow.qml new file: config/quickshell/overview-unified/common/widgets/StyledText.qml new file: config/quickshell/overview-unified/common/widgets/StyledToolTip.qml new file: config/quickshell/overview-unified/common/widgets/StyledToolTipContent.qml new file: config/quickshell/overview-unified/common/widgets/qmldir new file: config/quickshell/overview-unified/modules/overview/Overview.qml new file: config/quickshell/overview-unified/modules/overview/OverviewWidget.qml new file: config/quickshell/overview-unified/modules/overview/OverviewWindow.qml new file: config/quickshell/overview-unified/modules/overview/qmldir new file: config/quickshell/overview-unified/services/GlobalStates.qml new file: config/quickshell/overview-unified/services/HyprlandData.qml new file: config/quickshell/overview-unified/services/qmldir new file: config/quickshell/overview-unified/shell.qml new file: config/quickshell/qs-hyprview-trixie/LICENSE new file: config/quickshell/qs-hyprview-trixie/README.md new file: config/quickshell/qs-hyprview-trixie/common/Appearance.qml new file: config/quickshell/qs-hyprview-trixie/layouts/BandsLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/ColumnarLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/HeroLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/JustifiedLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/LayoutsManager.qml new file: config/quickshell/qs-hyprview-trixie/layouts/MasonryLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/SatelliteLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/SmartGridLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/SpiralLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/StarggeredLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/VortexLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/qmldir new file: config/quickshell/qs-hyprview-trixie/modules/Hyprview.qml new file: config/quickshell/qs-hyprview-trixie/modules/SearchBox.qml new file: config/quickshell/qs-hyprview-trixie/modules/WindowThumbnail.qml new file: config/quickshell/qs-hyprview-trixie/modules/qmldir new file: config/quickshell/qs-hyprview-trixie/qs-hyprview-template.qml new file: config/quickshell/qs-hyprview-trixie/screenshots/bands.jpeg new file: config/quickshell/qs-hyprview-trixie/screenshots/hero.jpeg new file: config/quickshell/qs-hyprview-trixie/screenshots/masonry.jpeg new file: config/quickshell/qs-hyprview-trixie/screenshots/satellite.jpeg new file: config/quickshell/qs-hyprview-trixie/screenshots/smartgrid.jpeg new file: config/quickshell/qs-hyprview-trixie/screenshots/spiral.jpeg new file: config/quickshell/qs-hyprview-trixie/screenshots/staggered.jpeg new file: config/quickshell/qs-hyprview-trixie/screenshots/vortex.jpeg new file: config/quickshell/qs-hyprview-trixie/shell.qml
Diffstat (limited to 'config/quickshell/qs-hyprview-trixie/layouts/SatelliteLayout.qml')
-rw-r--r--config/quickshell/qs-hyprview-trixie/layouts/SatelliteLayout.qml98
1 files changed, 98 insertions, 0 deletions
diff --git a/config/quickshell/qs-hyprview-trixie/layouts/SatelliteLayout.qml b/config/quickshell/qs-hyprview-trixie/layouts/SatelliteLayout.qml
new file mode 100644
index 00000000..2efb703b
--- /dev/null
+++ b/config/quickshell/qs-hyprview-trixie/layouts/SatelliteLayout.qml
@@ -0,0 +1,98 @@
+pragma Singleton
+import Quickshell
+import Quickshell.Hyprland
+
+Singleton {
+ id: root
+
+ function doLayout(windowList, outerWidth, outerHeight) {
+ var N = windowList.length
+ if (N === 0) return []
+
+ // Move active window to the start of the list (Center Item)
+ var activeAddr = Hyprland.activeToplevel?.lastIpcObject?.address
+ if (activeAddr) {
+ var activeIdx = windowList.findIndex(it => it.lastIpcObject.address === activeAddr)
+ if (activeIdx !== -1) {
+ windowList = [windowList[activeIdx], ...windowList.filter(it => it !== windowList[activeIdx])]
+ }
+ }
+
+ // Safe Area definition (90%)
+ var useW = outerWidth * 0.90
+ var useH = outerHeight * 0.90
+ var offX = (outerWidth - useW) / 2
+ var offY = (outerHeight - useH) / 2
+
+ var result = []
+
+ // Center item (hero)
+ var centerItem = windowList[0]
+
+ // The center item takes up roughly 35% of the screen dimensions
+ var centerW = useW * 0.35
+ var centerH = useH * 0.35
+
+ // Aspect Fit for the center item
+ var w0 = (centerItem.width > 0) ? centerItem.width : 100
+ var h0 = (centerItem.height > 0) ? centerItem.height : 100
+ var sc0 = Math.min(centerW / w0, centerH / h0)
+ var finalCenterW = w0 * sc0
+ var finalCenterH = h0 * sc0
+
+ result.push({
+ win: centerItem.win,
+ x: offX + (useW - finalCenterW) / 2,
+ y: offY + (useH - finalCenterH) / 2,
+ width: finalCenterW,
+ height: finalCenterH,
+ isSatellite: false
+ })
+
+ // Orbit items (satellites)
+ var satellites = windowList.slice(1)
+ var numSat = satellites.length
+
+ if (numSat > 0) {
+ // Orbit Radius (distance from center)
+ var radiusX = useW * 0.4
+ var radiusY = useH * 0.4
+
+ // Max size for satellites.
+ // As the number of satellites increases, we shrink them to avoid overlap.
+ var maxSatW = (useW * 0.25) / Math.max(1, (numSat / 6))
+ var maxSatH = (useH * 0.25) / Math.max(1, (numSat / 6))
+
+ // Start angle (-90 degrees = Top)
+ var startAngle = -Math.PI / 2
+ var stepAngle = (2 * Math.PI) / numSat
+
+ for (var i = 0; i < numSat; i++) {
+ var item = satellites[i]
+ var angle = startAngle + (i * stepAngle)
+
+ // Calculate satellite center coordinates
+ var cx = (useW / 2) + radiusX * Math.cos(angle)
+ var cy = (useH / 2) + radiusY * Math.sin(angle)
+
+ // Aspect Fit satellite
+ var ws = (item.width > 0) ? item.width : 100
+ var hs = (item.height > 0) ? item.height : 100
+ var scS = Math.min(maxSatW / ws, maxSatH / hs)
+ var finalSatW = ws * scS
+ var finalSatH = hs * scS
+
+ result.push({
+ win: item.win,
+ x: offX + cx - (finalSatW / 2),
+ y: offY + cy - (finalSatH / 2),
+ width: finalSatW,
+ height: finalSatH,
+ isSatellite: true
+ })
+ }
+ }
+
+ return result
+ }
+}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage