mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-09 18:53:42 +02:00
feat(wm): add scrolling layout
This commit adds a new DefaultLayout::Scrolling variant, along with a new LayoutOptions configuration which will initially be used to allow the user to declaratively specify the number of visible columns for the Scrolling layout, and a new komorebic "scrolling-layout-columns" command to allow the user to modify this value for the focused workspace at runtime. The Scrolling layout is inspired by the Niri scrolling window manager, presenting a workspace as an infinite scrollable horizontal strip with a viewport which includes the focused window + N other windows in columns. There is no support for splitting columns into multiple rows. This layout can currently only be applied to single-monitor setups as the scrolling would result in layout calculations which push the windows in the columns moving out of the viewport onto adjacent monitors. This implementation in the current state is enough to be useable for me personally, but if others want to iterate on this, make it handle hiding/restoring windows correctly when scrolling the viewport so that adjacent monitors don't get impacted etc., patches are always welcome. resolve #1434
This commit is contained in:
326
schema.bar.json
326
schema.bar.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "KomobarConfig",
|
||||
"description": "The `komorebi.bar.json` configuration file reference for `v0.1.37`",
|
||||
"description": "The `komorebi.bar.json` configuration file reference for `v0.1.38`",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"left_widgets",
|
||||
@@ -616,7 +616,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -2259,7 +2260,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -4294,7 +4296,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
@@ -4327,6 +4330,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 1.0
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ScrollingLayoutColumns"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -5210,7 +5233,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -5248,7 +5272,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -5361,7 +5386,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -5404,7 +5430,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -10365,7 +10392,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
@@ -10398,6 +10426,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 1.0
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ScrollingLayoutColumns"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -11281,7 +11329,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -11319,7 +11368,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -11432,7 +11482,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -11475,7 +11526,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -16436,7 +16488,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
@@ -16469,6 +16522,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 1.0
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ScrollingLayoutColumns"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -17352,7 +17425,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -17390,7 +17464,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -17503,7 +17578,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -17546,7 +17622,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -22507,7 +22584,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
@@ -22540,6 +22618,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 1.0
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ScrollingLayoutColumns"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -23423,7 +23521,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -23461,7 +23560,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -23574,7 +23674,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -23617,7 +23718,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -28578,7 +28680,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
@@ -28611,6 +28714,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 1.0
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ScrollingLayoutColumns"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -29494,7 +29617,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -29532,7 +29656,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -29645,7 +29770,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -29688,7 +29814,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -34649,7 +34776,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
@@ -34682,6 +34810,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 1.0
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ScrollingLayoutColumns"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -35565,7 +35713,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -35603,7 +35752,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -35716,7 +35866,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -35759,7 +35910,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -40720,7 +40872,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
@@ -40753,6 +40906,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 1.0
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ScrollingLayoutColumns"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -41636,7 +41809,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -41674,7 +41848,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -41787,7 +41962,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -41830,7 +42006,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -46791,7 +46968,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
@@ -46824,6 +47002,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 1.0
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ScrollingLayoutColumns"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -47707,7 +47905,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -47745,7 +47944,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -47858,7 +48058,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -47901,7 +48102,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -52862,7 +53064,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
@@ -52895,6 +53098,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 1.0
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ScrollingLayoutColumns"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -53778,7 +54001,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -53816,7 +54040,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -53929,7 +54154,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -53972,7 +54198,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -58490,7 +58717,8 @@
|
||||
"HorizontalStack",
|
||||
"UltrawideVerticalStack",
|
||||
"Grid",
|
||||
"RightMainVerticalStack"
|
||||
"RightMainVerticalStack",
|
||||
"Scrolling"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user