bluetooth and wifi

This commit is contained in:
end-4
2025-04-15 20:10:52 +02:00
parent ff8cee9dde
commit 62ef2fc421
13 changed files with 373 additions and 42 deletions
+21 -2
View File
@@ -136,9 +136,27 @@ Scope {
spacing: 20
layoutDirection: Qt.RightToLeft
Item { // TODO make this wifi & bluetooth
Layout.leftMargin: Appearance.rounding.screenRounding
RowLayout { // TODO make this wifi & bluetooth
Layout.rightMargin: Appearance.rounding.screenRounding
Layout.fillWidth: false
spacing: 15
MaterialSymbol {
text: (Network.networkName.length > 0 && Network.networkName != "lo") ? (
Network.networkStrength > 80 ? "signal_wifi_4_bar" :
Network.networkStrength > 60 ? "network_wifi_3_bar" :
Network.networkStrength > 40 ? "network_wifi_2_bar" :
Network.networkStrength > 20 ? "network_wifi_1_bar" :
"signal_wifi_0_bar"
) : "signal_wifi_off"
font.pointSize: Appearance.font.pointSize.larger
color: Appearance.colors.colOnLayer0
}
MaterialSymbol {
text: Bluetooth.bluetoothConnected ? "bluetooth_connected" : Bluetooth.bluetoothEnabled ? "bluetooth" : "bluetooth_disabled"
font.pointSize: Appearance.font.pointSize.larger
color: Appearance.colors.colOnLayer0
}
}
SysTray {
@@ -155,6 +173,7 @@ Scope {
MouseArea {
anchors.fill: rightSection
acceptedButtons: Qt.LeftButton
propagateComposedEvents: true
onPressed: (event) => {
if (event.button === Qt.LeftButton) {
toggleSidebarRight.running = true
@@ -7,6 +7,7 @@ import Quickshell.Services.SystemTray
import Quickshell.Wayland
import Quickshell.Widgets
// TODO: More fancy animation
Item {
id: root
@@ -34,6 +35,17 @@ Item {
}
StyledText {
Layout.alignment: Qt.AlignVCenter
font.pointSize: Appearance.font.pointSize.larger
color: Appearance.colors.colSubtext
text: "•"
visible: {
console.log("SystemTray.values.length", SystemTray.items.values.length)
SystemTray.items.values.length > 0
}
}
}
}
@@ -12,6 +12,7 @@ Item {
required property var bar
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(bar.screen)
readonly property Toplevel activeWindow: ToplevelManager.activeToplevel
readonly property int workspaceGroup: Math.floor((monitor.activeWorkspace?.id - 1) / ConfigOptions.bar.workspacesShown)
property list<bool> workspaceOccupied: []
property int widgetPadding: 4
@@ -70,6 +71,16 @@ Item {
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
}
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.BackButton
onPressed: (event) => {
if (event.button === Qt.BackButton) {
Hyprland.dispatch(`togglespecialworkspace`);
}
}
}
// Workspaces - background
RowLayout {
id: rowLayout