summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Fischer <sven@leiderfischer.de>2025-11-24 09:52:09 +0100
committerGitHub <noreply@github.com>2025-11-24 19:52:09 +1100
commit11282f6abe32f9671dc0a7ce49d64bc4f2d79e6b (patch)
tree027c6af0fa7ed7bc616b97c86be9e069babb60d0
parent[CI] chore: update flake (diff)
downloadcaelestia-shell-11282f6abe32f9671dc0a7ce49d64bc4f2d79e6b.tar.gz
caelestia-shell-11282f6abe32f9671dc0a7ce49d64bc4f2d79e6b.tar.bz2
caelestia-shell-11282f6abe32f9671dc0a7ce49d64bc4f2d79e6b.zip
bar/activewindow: add option to invert rotate (#922)
* feat(activeWindow): Add rotation option to rotate counter-clockwise * feat(activeWindow): Change rotation to inverted boolean option * feat(activeWindow): Do not expose inverted property
-rw-r--r--README.md3
-rw-r--r--config/BarConfig.qml5
-rw-r--r--modules/bar/components/ActiveWindow.qml15
3 files changed, 18 insertions, 5 deletions
diff --git a/README.md b/README.md
index a2322eb..1647b81 100644
--- a/README.md
+++ b/README.md
@@ -399,6 +399,9 @@ default, you must create it manually.
"icon": "sports_esports"
}
]
+ },
+ "activeWindow": {
+ "inverted": false
}
},
"border": {
diff --git a/config/BarConfig.qml b/config/BarConfig.qml
index 34819b1..daa2b34 100644
--- a/config/BarConfig.qml
+++ b/config/BarConfig.qml
@@ -7,6 +7,7 @@ JsonObject {
property ScrollActions scrollActions: ScrollActions {}
property Popouts popouts: Popouts {}
property Workspaces workspaces: Workspaces {}
+ property ActiveWindow activeWindow: ActiveWindow {}
property Tray tray: Tray {}
property Status status: Status {}
property Clock clock: Clock {}
@@ -78,6 +79,10 @@ JsonObject {
property list<var> specialWorkspaceIcons: []
}
+ component ActiveWindow: JsonObject {
+ property bool inverted: false
+ }
+
component Tray: JsonObject {
property bool background: false
property bool recolour: false
diff --git a/modules/bar/components/ActiveWindow.qml b/modules/bar/components/ActiveWindow.qml
index 67e7c69..0c9b21e 100644
--- a/modules/bar/components/ActiveWindow.qml
+++ b/modules/bar/components/ActiveWindow.qml
@@ -79,11 +79,16 @@ Item {
color: root.colour
opacity: root.current === this ? 1 : 0
- transform: Rotation {
- angle: 90
- origin.x: text.implicitHeight / 2
- origin.y: text.implicitHeight / 2
- }
+ transform: [
+ Translate {
+ x: Config.bar.activeWindow.inverted ? -implicitWidth + text.implicitHeight : 0
+ },
+ Rotation {
+ angle: Config.bar.activeWindow.inverted ? 270 : 90
+ origin.x: text.implicitHeight / 2
+ origin.y: text.implicitHeight / 2
+ }
+ ]
width: implicitHeight
height: implicitWidth