aboutsummaryrefslogtreecommitdiffstats
path: root/config/quickshell/qs-hyprview-unified/layouts/HeroLayout.qml
diff options
context:
space:
mode:
authorDon Williams <Don.e.williams@gmail.com>2026-07-13 16:15:49 -0400
committerPinapelz <yukais@pinapelz.com>2026-08-29 21:40:35 -0700
commitc8b343b98c203ac13d4b28bb269a735cf4c03475 (patch)
treec76921ca2309c9595fdd02045f33fe9f1684176b /config/quickshell/qs-hyprview-unified/layouts/HeroLayout.qml
parentdcc2b56bd34846c5e8562bdb33ea63f3734d5ec0 (diff)
Cleaning up quickshell builds
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: deleted: overview-trixie/README.md deleted: overview-trixie/assets/Workspace_Wallpaper.png deleted: overview-trixie/assets/image.png deleted: overview-trixie/common/Appearance.qml deleted: overview-trixie/common/Config.qml deleted: overview-trixie/common/functions/ColorUtils.qml deleted: overview-trixie/common/functions/qmldir deleted: overview-trixie/common/qmldir deleted: overview-trixie/common/widgets/StyledRectangularShadow.qml deleted: overview-trixie/common/widgets/StyledText.qml deleted: overview-trixie/common/widgets/StyledToolTip.qml deleted: overview-trixie/common/widgets/StyledToolTipContent.qml deleted: overview-trixie/common/widgets/qmldir deleted: overview-trixie/config.example.json deleted: overview-trixie/config.json deleted: overview-trixie/modules/overview/Overview.qml deleted: overview-trixie/modules/overview/OverviewWidget.qml deleted: overview-trixie/modules/overview/OverviewWindow.qml deleted: overview-trixie/modules/overview/qmldir deleted: overview-trixie/quickshell-overview.qml deleted: overview-trixie/services/GlobalStates.qml deleted: overview-trixie/services/HyprlandData.qml deleted: overview-trixie/services/qmldir deleted: overview-trixie/shell.qml deleted: overview-unified/README.md deleted: overview-unified/assets/image.png deleted: overview-unified/common/Appearance.qml deleted: overview-unified/common/Config.qml deleted: overview-unified/common/functions/ColorUtils.qml deleted: overview-unified/common/functions/qmldir deleted: overview-unified/common/qmldir deleted: overview-unified/common/widgets/RectangularShadow.qml deleted: overview-unified/common/widgets/StyledRectangularShadow.qml deleted: overview-unified/common/widgets/StyledText.qml deleted: overview-unified/common/widgets/StyledToolTip.qml deleted: overview-unified/common/widgets/StyledToolTipContent.qml deleted: overview-unified/common/widgets/qmldir deleted: overview-unified/modules/overview/Overview.qml deleted: overview-unified/modules/overview/OverviewWidget.qml deleted: overview-unified/modules/overview/OverviewWindow.qml deleted: overview-unified/modules/overview/qmldir deleted: overview-unified/services/GlobalStates.qml deleted: overview-unified/services/HyprlandData.qml deleted: overview-unified/services/qmldir deleted: overview-unified/shell.qml renamed: overview-trixie/common/widgets/RectangularShadow.qml -> overview/common/widgets/RectangularShadow.qml modified: overview/common/widgets/qmldir deleted: qs-hyprview-unified/LICENSE deleted: qs-hyprview-unified/README.md deleted: qs-hyprview-unified/common/Appearance.qml deleted: qs-hyprview-unified/layouts/BandsLayout.qml deleted: qs-hyprview-unified/layouts/ColumnarLayout.qml deleted: qs-hyprview-unified/layouts/HeroLayout.qml deleted: qs-hyprview-unified/layouts/JustifiedLayout.qml deleted: qs-hyprview-unified/layouts/LayoutsManager.qml deleted: qs-hyprview-unified/layouts/MasonryLayout.qml deleted: qs-hyprview-unified/layouts/SatelliteLayout.qml deleted: qs-hyprview-unified/layouts/SmartGridLayout.qml deleted: qs-hyprview-unified/layouts/SpiralLayout.qml deleted: qs-hyprview-unified/layouts/StarggeredLayout.qml deleted: qs-hyprview-unified/layouts/VortexLayout.qml deleted: qs-hyprview-unified/layouts/qmldir deleted: qs-hyprview-unified/modules/Hyprview.qml deleted: qs-hyprview-unified/modules/SearchBox.qml deleted: qs-hyprview-unified/modules/WindowThumbnail.qml deleted: qs-hyprview-unified/modules/qmldir deleted: qs-hyprview-unified/qs-hyprview-template.qml deleted: qs-hyprview-unified/screenshots/bands.jpeg deleted: qs-hyprview-unified/screenshots/hero.jpeg deleted: qs-hyprview-unified/screenshots/masonry.jpeg deleted: qs-hyprview-unified/screenshots/satellite.jpeg deleted: qs-hyprview-unified/screenshots/smartgrid.jpeg deleted: qs-hyprview-unified/screenshots/spiral.jpeg deleted: qs-hyprview-unified/screenshots/staggered.jpeg deleted: qs-hyprview-unified/screenshots/vortex.jpeg deleted: qs-hyprview-unified/shell.qml modified: qs-hyprview/modules/WindowThumbnail.qml
Diffstat (limited to 'config/quickshell/qs-hyprview-unified/layouts/HeroLayout.qml')
-rw-r--r--config/quickshell/qs-hyprview-unified/layouts/HeroLayout.qml144
1 files changed, 0 insertions, 144 deletions
diff --git a/config/quickshell/qs-hyprview-unified/layouts/HeroLayout.qml b/config/quickshell/qs-hyprview-unified/layouts/HeroLayout.qml
deleted file mode 100644
index e45ecf2c..00000000
--- a/config/quickshell/qs-hyprview-unified/layouts/HeroLayout.qml
+++ /dev/null
@@ -1,144 +0,0 @@
-pragma Singleton
-import Quickshell
-import Quickshell.Hyprland
-
-Singleton {
- id: root
-
- function doLayout(windowList, outerWidth, outerHeight) {
- if (windowList.length === 0) return []
-
- // Gap: 0.8% of screen, clamped between 12px and 32px
- var rawGap = Math.min(outerWidth * 0.08, outerHeight * 0.08)
- var gap = Math.max(12, Math.min(32, rawGap))
-
- // Move active window to the head of windowList
- 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 contentScale = 0.90
- var useW = outerWidth * contentScale
- var useH = outerHeight * contentScale
-
- // Global offset - center Safe area
- var offX = (outerWidth - useW) / 2
- var offY = (outerHeight - useH) / 2
-
- var result = []
-
- // Screen zones (Hero/Stack)
- var heroRatio = 0.40 // 40% Hero
- var heroAreaW = useW * heroRatio
- var stackAreaW = useW - heroAreaW - gap // 60% Stack
-
- var heroItem = windowList[0]
-
- // Aspect Fit
- var hScale = Math.min(heroAreaW / heroItem.width, useH / heroItem.height)
- var hW = heroItem.width * hScale
- var hH = heroItem.height * hScale
-
- result.push({
- win: heroItem.win,
- x: offX + (heroAreaW - hW) / 2,
- y: offY + (useH - hH) / 2,
- width: hW,
- height: hH,
- isHero: true
- })
-
- var others = windowList.slice(1)
- var N = others.length
-
- if (N > 0) {
- var stackStartX = offX + heroAreaW + gap
-
- // Evaluate col number
- var bestCols = 1
- var bestRows = N
-
- // Windows height on a single column
- var oneColH = (useH - (gap * (N - 1))) / N
-
- // TOLERANCE THRESHOLD (0.15 = 15% of screen height)
- // If the windows are at least 15% of the screen height, we stay on 1 column.
- // With 4 windows we are at ~25% -> OK (1 Column)
- // With 7 windows we are at ~14% -> NO (Go to grid calculation)
- var useSingleCol = oneColH > (useH * 0.15)
-
- if (!useSingleCol) {
- // If space is limited, we look for the optimal grid starting with 2 columns.
- var bestScale = 0
- var TARGET_ASPECT = 16.0 / 9.0
-
- for (var cols = 2; cols <= N; cols++) {
- var rows = Math.ceil(N / cols)
- var availW = stackAreaW - (gap * (cols - 1))
- var availH = useH - (gap * (rows - 1))
-
- if (availW <= 0 || availH <= 0) continue
-
- var cellW = availW / cols
- var cellH = availH / rows
-
- // Size score
- var sW = cellW / TARGET_ASPECT
- var sH = cellH / 1.0
- var currentScale = Math.min(sW, sH)
-
- if (currentScale > bestScale) {
- bestScale = currentScale
- bestCols = cols
- bestRows = rows
- }
- }
- }
-
- // Evaluation of the final dimensions of the selected grid
- var finalAvailW = stackAreaW - (gap * (bestCols - 1))
- var finalAvailH = useH - (gap * (bestRows - 1))
-
- var finalCellW = finalAvailW / bestCols
- var finalCellH = finalAvailH / bestRows
-
- // Vertical centering of the total stack
- var totalGridH = bestRows * finalCellH + (bestRows - 1) * gap
- var stackStartY = offY + (useH - totalGridH) / 2
-
- // Items positioning
- for (var i = 0; i < N; ++i) {
- var item = others[i]
-
- var row = Math.floor(i / bestCols)
- var col = i % bestCols
-
- // Cell coords (Standard Grid Alignment)
- // No “rowOffsetX”, cell 0 always starts on the left
- var cellAbsX = stackStartX + col * (finalCellW + gap)
- var cellAbsY = stackStartY + row * (finalCellH + gap)
-
- // Thumb aspect Fit
- var sc = Math.min(finalCellW / item.width, finalCellH / item.height)
- var w = item.width * sc
- var h = item.height * sc
-
- result.push({
- win: item.win,
- x: cellAbsX + (finalCellW - w) / 2,
- y: cellAbsY + (finalCellH - h) / 2,
- width: w,
- height: h,
- isHero: false
- })
- }
- }
-
- return result
- }
-}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage