bar: allow hiding tray icons (#1227)
* First pass at hiding systray icons Signed-off-by: Dan Griffiths <dgriffiths@widgitlabs.com> * Don't dump all IDs for no reason >_< Signed-off-by: Dan Griffiths <dgriffiths@widgitlabs.com> * Better handling for hiding tray icons Signed-off-by: Dan Griffiths <dgriffiths@widgitlabs.com> * Re-add EOF newline Signed-off-by: Dan Griffiths <dgriffiths@widgitlabs.com> * Hide popouts too Signed-off-by: Dan Griffiths <dgriffiths@widgitlabs.com> * Hide the expand icon if no icons are visible Signed-off-by: Dan Griffiths <dgriffiths@widgitlabs.com> * Update modules/bar/components/Tray.qml Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> * Update modules/bar/components/Tray.qml Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> * Update modules/bar/components/Tray.qml Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> * That needs to be inverted * Clean up Signed-off-by: Dan Griffiths <dgriffiths@widgitlabs.com> * fix --------- Signed-off-by: Dan Griffiths <dgriffiths@widgitlabs.com> Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
This commit is contained in:
parent
2b73eac175
commit
5bde26496e
3 changed files with 7 additions and 3 deletions
|
|
@ -89,6 +89,7 @@ JsonObject {
|
|||
property bool recolour: false
|
||||
property bool compact: false
|
||||
property list<var> iconSubs: []
|
||||
property list<string> hiddenIcons: []
|
||||
}
|
||||
|
||||
component Status: JsonObject {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound
|
|||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
import Quickshell
|
||||
import Quickshell.Services.SystemTray
|
||||
import QtQuick
|
||||
|
||||
|
|
@ -66,7 +67,9 @@ StyledRect {
|
|||
Repeater {
|
||||
id: items
|
||||
|
||||
model: SystemTray.items
|
||||
model: ScriptModel {
|
||||
values: SystemTray.items.values.filter(i => !Config.bar.tray.hiddenIcons.includes(i.id))
|
||||
}
|
||||
|
||||
TrayItem {}
|
||||
}
|
||||
|
|
@ -82,7 +85,7 @@ StyledRect {
|
|||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
active: Config.bar.tray.compact
|
||||
active: Config.bar.tray.compact && items.count > 0
|
||||
|
||||
sourceComponent: Item {
|
||||
implicitWidth: expandIconInner.implicitWidth
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ Item {
|
|||
|
||||
Repeater {
|
||||
model: ScriptModel {
|
||||
values: [...SystemTray.items.values]
|
||||
values: SystemTray.items.values.filter(i => !Config.bar.tray.hiddenIcons.includes(i.id))
|
||||
}
|
||||
|
||||
Popout {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue