forked from Shinonome/dots-hyprland
sidebar calendar thingie: navrail
This commit is contained in:
@@ -23,7 +23,7 @@ Item {
|
||||
spacing: -4
|
||||
|
||||
StyledText {
|
||||
font.pointSize: Appearance.font.pointSize.smaller
|
||||
font.pixelSize: Appearance.font.pixelSize.smaller
|
||||
color: Appearance.colors.colSubtext
|
||||
Layout.preferredWidth: preferredWidth
|
||||
elide: Text.ElideRight
|
||||
@@ -31,7 +31,7 @@ Item {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
font.pointSize: Appearance.font.pointSize.small
|
||||
font.pixelSize: Appearance.font.pixelSize.small
|
||||
color: Appearance.colors.colOnLayer0
|
||||
Layout.preferredWidth: preferredWidth
|
||||
elide: Text.ElideRight
|
||||
|
||||
@@ -13,12 +13,12 @@ Scope {
|
||||
readonly property int barCenterSideModuleWidth: Appearance.sizes.barCenterSideModuleWidth
|
||||
|
||||
Process {
|
||||
id: toggleSidebarRight
|
||||
command: ["qs", "ipc", "call", "sidebarRight", "toggle"]
|
||||
id: openSidebarRight
|
||||
command: ["qs", "ipc", "call", "sidebarRight", "open"]
|
||||
}
|
||||
Process {
|
||||
id: toggleSidebarLeft
|
||||
command: ["qs", "ipc", "call", "sidebarLeft", "toggle"]
|
||||
id: openSidebarLeft
|
||||
command: ["qs", "ipc", "call", "sidebarLeft", "open"]
|
||||
}
|
||||
|
||||
Variants {
|
||||
@@ -135,27 +135,35 @@ Scope {
|
||||
width: Appearance.sizes.barPreferredSideSectionWidth
|
||||
spacing: 20
|
||||
layoutDirection: Qt.RightToLeft
|
||||
|
||||
RowLayout { // TODO make this wifi & bluetooth
|
||||
|
||||
Rectangle {
|
||||
Layout.margins: 4
|
||||
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
|
||||
Layout.fillHeight: true
|
||||
implicitWidth: rowLayout.implicitWidth + 10*2
|
||||
radius: Appearance.rounding.full
|
||||
color: barRightSideMouseArea.pressed ? Appearance.colors.colLayer1Active : barRightSideMouseArea.hovered ? Appearance.colors.colLayer1Hover : "transparent"
|
||||
RowLayout {
|
||||
id: rowLayout
|
||||
anchors.centerIn: parent
|
||||
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.pixelSize: Appearance.font.pixelSize.larger
|
||||
color: Appearance.colors.colOnLayer0
|
||||
}
|
||||
MaterialSymbol {
|
||||
text: Bluetooth.bluetoothConnected ? "bluetooth_connected" : Bluetooth.bluetoothEnabled ? "bluetooth" : "bluetooth_disabled"
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
color: Appearance.colors.colOnLayer0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,12 +179,21 @@ Scope {
|
||||
|
||||
}
|
||||
MouseArea {
|
||||
id: barRightSideMouseArea
|
||||
property bool hovered: false
|
||||
anchors.fill: rightSection
|
||||
acceptedButtons: Qt.LeftButton
|
||||
hoverEnabled: true
|
||||
propagateComposedEvents: true
|
||||
onEntered: (event) => {
|
||||
barRightSideMouseArea.hovered = true
|
||||
}
|
||||
onExited: (event) => {
|
||||
barRightSideMouseArea.hovered = false
|
||||
}
|
||||
onPressed: (event) => {
|
||||
if (event.button === Qt.LeftButton) {
|
||||
toggleSidebarRight.running = true
|
||||
openSidebarRight.running = true
|
||||
}
|
||||
}
|
||||
// Scroll to change volume
|
||||
|
||||
@@ -57,7 +57,7 @@ Rectangle {
|
||||
MaterialSymbol {
|
||||
anchors.centerIn: parent
|
||||
text: "battery_full"
|
||||
font.pointSize: Appearance.font.pointSize.normal
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
color: (isLow && !isCharging) ? batteryLowOnBackground : Appearance.m3colors.m3onSecondaryContainer
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ Rectangle {
|
||||
anchors.left: rowLayout.left
|
||||
anchors.verticalCenter: rowLayout.verticalCenter
|
||||
text: "bolt"
|
||||
font.pointSize: Appearance.font.pointSize.large
|
||||
font.pixelSize: Appearance.font.pixelSize.large
|
||||
color: Appearance.m3colors.m3onSecondaryContainer
|
||||
visible: opacity !== 0 // Only show when charging
|
||||
opacity: isCharging ? 1 : 0 // Keep opacity for visibility
|
||||
|
||||
@@ -16,19 +16,19 @@ Rectangle {
|
||||
anchors.centerIn: parent
|
||||
|
||||
StyledText {
|
||||
font.pointSize: Appearance.font.pointSize.large
|
||||
font.pixelSize: Appearance.font.pixelSize.large
|
||||
color: Appearance.colors.colOnLayer1
|
||||
text: DateTime.time
|
||||
}
|
||||
|
||||
StyledText {
|
||||
font.pointSize: Appearance.font.pointSize.small
|
||||
font.pixelSize: Appearance.font.pixelSize.small
|
||||
color: Appearance.colors.colOnLayer1
|
||||
text: "•"
|
||||
}
|
||||
|
||||
StyledText {
|
||||
font.pointSize: Appearance.font.pointSize.small
|
||||
font.pixelSize: Appearance.font.pixelSize.small
|
||||
color: Appearance.colors.colOnLayer1
|
||||
text: DateTime.date
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ Item {
|
||||
MaterialSymbol {
|
||||
anchors.centerIn: parent
|
||||
text: activePlayer?.isPlaying ? "pause" : "play_arrow"
|
||||
font.pointSize: Appearance.font.pointSize.normal
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.m3colors.m3onSecondaryContainer
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ Item {
|
||||
MaterialSymbol {
|
||||
anchors.centerIn: parent
|
||||
text: iconName
|
||||
font.pointSize: Appearance.font.pointSize.normal
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.m3colors.m3onSecondaryContainer
|
||||
}
|
||||
|
||||
|
||||
@@ -37,11 +37,10 @@ Item {
|
||||
|
||||
StyledText {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
font.pointSize: Appearance.font.pointSize.larger
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
color: Appearance.colors.colSubtext
|
||||
text: "•"
|
||||
visible: {
|
||||
console.log("SystemTray.values.length", SystemTray.items.values.length)
|
||||
SystemTray.items.values.length > 0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ Rectangle {
|
||||
MaterialSymbol {
|
||||
anchors.centerIn: parent
|
||||
text: "screenshot_region"
|
||||
font.pointSize: Appearance.font.pointSize.normal
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.colors.colOnLayer2
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ Rectangle {
|
||||
MaterialSymbol {
|
||||
anchors.centerIn: parent
|
||||
text: "colorize"
|
||||
font.pointSize: Appearance.font.pointSize.normal
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.colors.colOnLayer2
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ Item {
|
||||
anchors.fill: parent
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pointSize: Appearance.font.pointSize.small
|
||||
font.pixelSize: Appearance.font.pixelSize.small
|
||||
text: `${workspaceValue}`
|
||||
elide: Text.ElideRight
|
||||
color: (monitor.activeWorkspace?.id == workspaceValue) ? Appearance.m3colors.m3onPrimary : (workspaceOccupied[index] ? Appearance.colors.colOnLayer1 : Appearance.colors.colOnLayer1Inactive)
|
||||
|
||||
Reference in New Issue
Block a user