parent
04ce9ccbb4
commit
a02d774b0a
4 changed files with 26 additions and 8 deletions
|
|
@ -248,6 +248,10 @@ All configuration options are in `~/.config/caelestia/shell.json`.
|
||||||
"showKbLayout": false,
|
"showKbLayout": false,
|
||||||
"showNetwork": true
|
"showNetwork": true
|
||||||
},
|
},
|
||||||
|
"tray": {
|
||||||
|
"background": false,
|
||||||
|
"recolour": false
|
||||||
|
},
|
||||||
"workspaces": {
|
"workspaces": {
|
||||||
"activeIndicator": true,
|
"activeIndicator": true,
|
||||||
"activeLabel": " ",
|
"activeLabel": " ",
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ JsonObject {
|
||||||
property bool showOnHover: true
|
property bool showOnHover: true
|
||||||
property int dragThreshold: 20
|
property int dragThreshold: 20
|
||||||
property Workspaces workspaces: Workspaces {}
|
property Workspaces workspaces: Workspaces {}
|
||||||
|
property Tray tray: Tray {}
|
||||||
property Status status: Status {}
|
property Status status: Status {}
|
||||||
property Sizes sizes: Sizes {}
|
property Sizes sizes: Sizes {}
|
||||||
|
|
||||||
|
|
@ -60,6 +61,11 @@ JsonObject {
|
||||||
property string activeLabel: " "
|
property string activeLabel: " "
|
||||||
}
|
}
|
||||||
|
|
||||||
|
component Tray: JsonObject {
|
||||||
|
property bool background: false
|
||||||
|
property bool recolour: false
|
||||||
|
}
|
||||||
|
|
||||||
component Status: JsonObject {
|
component Status: JsonObject {
|
||||||
property bool showAudio: false
|
property bool showAudio: false
|
||||||
property bool showKbLayout: false
|
property bool showKbLayout: false
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,27 @@
|
||||||
|
import qs.components
|
||||||
|
import qs.services
|
||||||
import qs.config
|
import qs.config
|
||||||
import Quickshell.Services.SystemTray
|
import Quickshell.Services.SystemTray
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
Item {
|
StyledRect {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property Repeater items: items
|
readonly property alias items: items
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
visible: width > 0 && height > 0 // To avoid warnings about being visible with no size
|
visible: width > 0 && height > 0 // To avoid warnings about being visible with no size
|
||||||
|
|
||||||
implicitWidth: layout.implicitWidth
|
implicitWidth: layout.implicitWidth + Math.floor(Appearance.padding.normal * 1.8)
|
||||||
implicitHeight: layout.implicitHeight
|
implicitHeight: layout.implicitHeight + (Config.bar.tray.background ? Appearance.padding.normal : Appearance.padding.small) * 2
|
||||||
|
|
||||||
|
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, Config.bar.tray.background ? Colours.tPalette.m3surfaceContainer.a : 0)
|
||||||
|
radius: Appearance.rounding.full
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: layout
|
id: layout
|
||||||
|
|
||||||
|
anchors.centerIn: parent
|
||||||
spacing: Appearance.spacing.small
|
spacing: Appearance.spacing.small
|
||||||
|
|
||||||
add: Transition {
|
add: Transition {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
|
import qs.components.effects
|
||||||
|
import qs.services
|
||||||
import qs.config
|
import qs.config
|
||||||
import Quickshell.Widgets
|
|
||||||
import Quickshell.Services.SystemTray
|
import Quickshell.Services.SystemTray
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
|
|
@ -21,9 +22,10 @@ MouseArea {
|
||||||
modelData.secondaryActivate();
|
modelData.secondaryActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
IconImage {
|
ColouredIcon {
|
||||||
id: icon
|
id: icon
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
source: {
|
source: {
|
||||||
let icon = root.modelData.icon;
|
let icon = root.modelData.icon;
|
||||||
if (icon.includes("?path=")) {
|
if (icon.includes("?path=")) {
|
||||||
|
|
@ -32,7 +34,7 @@ MouseArea {
|
||||||
}
|
}
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
asynchronous: true
|
colour: Colours.palette.m3secondary
|
||||||
anchors.fill: parent
|
layer.enabled: Config.bar.tray.recolour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue