summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rw-r--r--config/BarConfig.qml7
-rw-r--r--modules/bar/Bar.qml6
-rw-r--r--modules/bar/popouts/Content.qml8
4 files changed, 19 insertions, 7 deletions
diff --git a/README.md b/README.md
index 738fea1..a2322eb 100644
--- a/README.md
+++ b/README.md
@@ -357,6 +357,11 @@ default, you must create it manually.
}
],
"persistent": true,
+ "popouts": {
+ "activeWindow": true,
+ "statusIcons": true,
+ "tray": true
+ },
"scrollActions": {
"brightness": true,
"workspaces": true,
diff --git a/config/BarConfig.qml b/config/BarConfig.qml
index 86c2a40..34819b1 100644
--- a/config/BarConfig.qml
+++ b/config/BarConfig.qml
@@ -5,6 +5,7 @@ JsonObject {
property bool showOnHover: true
property int dragThreshold: 20
property ScrollActions scrollActions: ScrollActions {}
+ property Popouts popouts: Popouts {}
property Workspaces workspaces: Workspaces {}
property Tray tray: Tray {}
property Status status: Status {}
@@ -56,6 +57,12 @@ JsonObject {
property bool brightness: true
}
+ component Popouts: JsonObject {
+ property bool activeWindow: true
+ property bool tray: true
+ property bool statusIcons: true
+ }
+
component Workspaces: JsonObject {
property int shown: 5
property bool activeIndicator: true
diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml
index 64b1d86..1dceea4 100644
--- a/modules/bar/Bar.qml
+++ b/modules/bar/Bar.qml
@@ -45,7 +45,7 @@ ColumnLayout {
const item = ch.item;
const itemHeight = item.implicitHeight;
- if (id === "statusIcons") {
+ if (id === "statusIcons" && Config.bar.popouts.statusIcons) {
const items = item.items;
const icon = items.childAt(items.width / 2, mapToItem(items, 0, y).y);
if (icon) {
@@ -53,7 +53,7 @@ ColumnLayout {
popouts.currentCenter = Qt.binding(() => icon.mapToItem(root, 0, icon.implicitHeight / 2).y);
popouts.hasCurrent = true;
}
- } else if (id === "tray") {
+ } else if (id === "tray" && Config.bar.popouts.tray) {
if (!Config.bar.tray.compact || (item.expanded && !item.expandIcon.contains(mapToItem(item.expandIcon, item.implicitWidth / 2, y)))) {
const index = Math.floor(((y - top - item.padding * 2 + item.spacing) / item.layout.implicitHeight) * item.items.count);
const trayItem = item.items.itemAt(index);
@@ -68,7 +68,7 @@ ColumnLayout {
popouts.hasCurrent = false;
item.expanded = true;
}
- } else if (id === "activeWindow") {
+ } else if (id === "activeWindow" && Config.bar.popouts.activeWindow) {
popouts.currentName = id.toLowerCase();
popouts.currentCenter = item.mapToItem(root, 0, itemHeight / 2).y;
popouts.hasCurrent = true;
diff --git a/modules/bar/popouts/Content.qml b/modules/bar/popouts/Content.qml
index 5c9fdf7..e3f569d 100644
--- a/modules/bar/popouts/Content.qml
+++ b/modules/bar/popouts/Content.qml
@@ -45,7 +45,7 @@ Item {
Popout {
name: "battery"
- source: "Battery.qml"
+ sourceComponent: Battery {}
}
Popout {
@@ -57,12 +57,12 @@ Item {
Popout {
name: "kblayout"
- source: "KbLayout.qml"
+ sourceComponent: KbLayout {}
}
Popout {
name: "lockstatus"
- source: "LockStatus.qml"
+ sourceComponent: LockStatus {}
}
Repeater {
@@ -106,7 +106,7 @@ Item {
id: popout
required property string name
- property bool shouldBeActive: root.wrapper.currentName === name
+ readonly property bool shouldBeActive: root.wrapper.currentName === name
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right