mirror of
https://github.com/belsabbagh/dotfiles.git
synced 2026-04-11 17:47:09 +00:00
quickshell and hyprland additions
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.components.effects
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.utils
|
||||
import Quickshell.Services.SystemTray
|
||||
import QtQuick
|
||||
|
||||
MouseArea {
|
||||
id: root
|
||||
|
||||
required property SystemTrayItem modelData
|
||||
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
implicitWidth: Appearance.font.size.small * 2
|
||||
implicitHeight: Appearance.font.size.small * 2
|
||||
|
||||
onClicked: event => {
|
||||
if (event.button === Qt.LeftButton)
|
||||
modelData.activate();
|
||||
else
|
||||
modelData.secondaryActivate();
|
||||
}
|
||||
|
||||
ColouredIcon {
|
||||
id: icon
|
||||
|
||||
anchors.fill: parent
|
||||
source: Icons.getTrayIcon(root.modelData.id, root.modelData.icon)
|
||||
colour: Colours.palette.m3secondary
|
||||
layer.enabled: Config.bar.tray.recolour
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user