dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Reviews Compare Notes Search Review guide feat(nuguland): vertical popout geometry — open beside the left bar 8e336af0a681b761c90294ea04d7ec0b9041c2b1
Oliver Jan Krylow <oliver@bugabinga.net > · 28 Jun 2026
unsigned
Browse files Compare with HEAD
Phase 2 of vertical/horizontal orientation. SurfaceManager emits
left-edge popout geometry in vertical mode (anchor at bar thickness,
full screen height, card slides rightward, clamp on the y-axis);
setPopoutScreen now carries orientation. PopoutHost moves its input and
dismiss region beside the bar and subtracts the bar on the correct axis.
OSD/toast untouched (top-right, bar-independent).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Changed files (2) quickshell/nuguland/PopoutHost.qml Modified 45 45 readonly property var currentRect: cardFrame.currentRect
46 46 readonly property string activeName: surfaces
? surfaces.popoutName
: "" 47 47 readonly property string removingName: surfaces
? surfaces.removingLoaderName
: "" 48 - readonly property int surfaceWidth: surfaces
&& surfaces.screenWidth
> 0 ? surfaces.screenWidth
: contentSize.width
49 - readonly property int surfaceHeight: surfaces
&& surfaces.screenHeight
> 0 ? Math .
max (
1 , surfaces.screenHeight
- surfaces.barHeight)
: contentSize.height
48 + readonly property bool vertical: surfaces
&& surfaces.orientation
=== "vertical" 51 + readonly property int surfaceWidth: surfaces
&& surfaces.screenWidth
> 0 ? (root.vertical
? Math .
max (
1 , surfaces.screenWidth
- surfaces.barHeight)
: surfaces.screenWidth)
: contentSize.width
52 + readonly property int surfaceHeight: surfaces
&& surfaces.screenHeight
> 0 ? (root.vertical
? surfaces.screenHeight
: Math .
max (
1 , surfaces.screenHeight
- surfaces.barHeight))
: contentSize.height
51 54 function contentComponent (name) {
52 55 switch (
String (name)) {
118 121 id : popoutInputRegion
121 - y : root.surfaces
? root.surfaces.barHeight
: 0 122 - width : parent.width
125 + x : root.vertical
&& root.surfaces
? root.surfaces.barHeight
: 0 126 + y : root.vertical
|| ! root.surfaces
? 0 : root.surfaces.barHeight
127 + width :
Math .
max (
1 , parent.width
- x)
123 128 height :
Math .
max (
1 , parent.height
- y)
quickshell/nuguland/SurfaceManager.qml Modified 19 19 property int screenWidth:
0 20 20 property int screenHeight:
0 21 21 property int barHeight:
34 22 + property string orientation:
"horizontal" 23 + readonly property bool vertical: orientation
=== "vertical" 22 24 property
var anchorRegistry: ({
24 26 readonly property int closeRetentionMs:
0 48 50 function popoutWidth () {
49 - if (screenWidth
<= 0 )
51 + const along
= vertical
? Math .
max (
0 , screenWidth
- barHeight)
: screenWidth;
52 - return Math .
max (
520 ,
Math .
min (
920 ,
Math .
round (screenWidth
/ goldenRatio)));
55 + return Math .
max (
520 ,
Math .
min (
920 ,
Math .
round (along
/ goldenRatio)));
55 58 function heightBudget (wanted) {
56 - const maxHeight
= screenHeight
> 0 ? Math .
max (
260 , screenHeight
- barHeight
- 48 )
: 680 ;
59 + const reserve
= vertical
? 48 : barHeight
+ 48 ;
60 + const maxHeight
= screenHeight
> 0 ? Math .
max (
260 , screenHeight
- reserve)
: 680 ;
57 61 return Math .
min (maxHeight,
Math .
max (
220 ,
Number (wanted)));
126 130 function popupWindowAnchorRect () {
133 + "x" :
Math .
max (
1 ,
Math .
round (barHeight)),
136 + "height" : screenHeight
> 0 ? screenHeight
: popoutContentSize(popoutName).height
129 141 "y" :
Math .
max (
1 ,
Math .
round (barHeight)),
135 147 function popupCardFrame (progress) {
136 148 const t
= Math .
max (
0 ,
Math .
min (
1 ,
Number (progress)));
137 149 const contentSize
= popoutContentSize(popoutName);
151 + const surfaceHeight
= screenHeight
> 0 ? screenHeight
: contentSize.height;
153 + "source" :
"left-bar-slide-fade" ,
156 + "x" :
Math .
round (barHeight
- 18 + 26 * t),
157 + "y" :
Math .
max (
8 ,
Math .
round ((surfaceHeight
- contentSize.height)
/ 2 )
+ 8 ),
158 + "width" :
Math .
max (
1 ,
Math .
round (contentSize.width
- 16 )),
159 + "height" :
Math .
max (
1 ,
Math .
round (contentSize.height
- 16 ))
138 164 const surfaceWidth
= screenWidth
> 0 ? screenWidth
: contentSize.width;
140 166 "source" :
"simple-center-slide-fade" ,
226 252 return JSON .stringify(anchorRegistry);
229 - function setPopoutScreen (width, height, topBarHeight) {
255 + function setPopoutScreen (width, height, topBarThickness, orient) {
230 256 screenWidth
= Math .
max (
0 ,
Number (width));
231 257 screenHeight
= Math .
max (
0 ,
Number (height));
232 - barHeight
= Math .
max (
1 ,
Number (topBarHeight
|| barHeight));
258 + barHeight
= Math .
max (
1 ,
Number (topBarThickness
|| barHeight));
259 + if (orient
=== "horizontal" || orient
=== "vertical" )
260 + orientation
= orient;
233 262 return popoutState();
236 265 function clampedTarget (origin, contentSize) {
237 - let x
= Math .
round (origin.x
- contentSize.width
/ 2 );
238 266 const edges
= [];
268 + let y
= Math .
round (origin.y
- contentSize.height
/ 2 );
273 + if (screenHeight
> 0 && y
+ contentSize.height
> screenHeight) {
274 + y
= Math .
max (
0 , screenHeight
- contentSize.height);
276 + edges.push(
"bottom" );
280 + "x" :
Math .
max (
0 ,
Math .
round (barHeight)),
282 + "width" : contentSize.width,
283 + "height" : contentSize.height
288 + let x
= Math .
round (origin.x
- contentSize.width
/ 2 );
241 291 edges.push(
"left" );
337 387 function popoutState () {
338 388 const contentSize
= popoutContentSize(popoutName);
389 + const origin
= vertical
? {
390 + "x" :
Math .
round (popoutAnchor.x
+ popoutAnchor.width),
391 + "y" :
Math .
round (popoutAnchor.y
+ popoutAnchor.height
/ 2 )
340 393 "x" :
Math .
round (popoutAnchor.x
+ popoutAnchor.width
/ 2 ),
341 394 "y" :
Math .
round (popoutAnchor.y
+ popoutAnchor.height)
365 418 "progress" : popoutProgress
, 368 - "animation" :
"simple-center-slide-fade" , 369 - "direction" : popoutClosing
? "up-out" : "down-in" , 421 + "animation" : vertical
? "left-bar-slide-fade" : "simple-center-slide-fade" , 422 + "direction" : vertical
? (popoutClosing
? "left-out" : "right-in" )
: (popoutClosing
? "up-out" : "down-in" )
, 370 423 "loaderActive" : popoutOpen
, 371 424 "targetRect" : popupWindowAnchorRect()