New update to current version

This commit is contained in:
2026-03-12 00:10:08 -04:00
parent fbd7836ffd
commit 79f8a99c86
8 changed files with 252 additions and 253 deletions

View File

@@ -6,93 +6,94 @@ import qs.common
import qs.common.widgets
Scope {
Variants {
model: Quickshell.screens;
PanelWindow {
required property var modelData
screen: modelData
WlrLayershell.layer: WlrLayer.Bottom
color: "transparent"
Rectangle {
id: barBackground
anchors {
fill: parent
margins: Config.options.bar.cornerStyle === 1 ? (Appearance.sizes.hyprlandGapsOut) : 0
}
color: Config.options.bar.showBackground ? Appearance.colors.colLayer1 : "transparent"
}
anchors {
top: true
left: true
right: true
}
Variants {
model: Quickshell.screens
PanelWindow {
required property var modelData
screen: modelData
WlrLayershell.layer: WlrLayer.Bottom
color: "transparent"
implicitHeight: Config.options.bar.height
Rectangle {
id: barBackground
anchors {
fill: parent
margins: Config.options.bar.cornerStyle === 1 ? (Appearance.sizes.hyprlandGapsOut) : 0
}
color: Config.options.bar.showBackground ? Appearance.colors.colLayer1 : "transparent"
}
RowLayout { // Left Section
id: leftSection
anchors {
verticalCenter: parent.verticalCenter
left: parent.left
leftMargin: 5
}
spacing: Config.options?.bar.borderless ? 4 : 8
Workspaces {}
}
anchors {
top: true
left: true
right: true
}
RowLayout { // Middle section
id: middleSection
anchors.centerIn: parent
spacing: Config.options?.bar.borderless ? 4 : 8
implicitHeight: Config.options.bar.height
Media {
visible: true
Layout.fillWidth: true
}
}
RowLayout { // Left Section
id: leftSection
anchors {
verticalCenter: parent.verticalCenter
left: parent.left
leftMargin: 5
}
spacing: Config.options?.bar.borderless ? 4 : 8
Workspaces {}
}
RowLayout { // Right Section
id: rightSection
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
rightMargin: 5
RowLayout { // Middle section
id: middleSection
anchors.centerIn: parent
spacing: Config.options?.bar.borderless ? 4 : 8
Media {
visible: true
Layout.fillWidth: true
}
}
RowLayout { // Right Section
id: rightSection
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
rightMargin: 5
}
spacing: Config.options?.bar.borderless ? 4 : 8
SysTray {
Layout.fillWidth: false
Layout.fillHeight: true
}
StyledText {
Layout.alignment: Qt.AlignVCenter
font.pixelSize: Appearance.font.pixelSize.larger
color: Appearance.colors.colSubtext
text: "•"
visible: true
}
NotificationIcon {
Layout.fillWidth: false
Layout.fillHeight: true
}
StyledText {
Layout.alignment: Qt.AlignVCenter
font.pixelSize: Appearance.font.pixelSize.larger
color: Appearance.colors.colSubtext
text: "•"
visible: true
}
ClockWidget {
id: clock
Layout.alignment: Qt.AlignVCenter
Layout.fillHeight: true
Layout.fillWidth: false
}
PowerButton {
Layout.fillWidth: false
Layout.fillHeight: true
}
}
}
spacing: Config.options?.bar.borderless ? 4 : 8
SysTray {
Layout.fillWidth: false
Layout.fillHeight: true
}
StyledText {
Layout.alignment: Qt.AlignVCenter
font.pixelSize: Appearance.font.pixelSize.larger
color: Appearance.colors.colSubtext
text: "•"
visible: true
}
NotificationIcon {
Layout.fillWidth: false
Layout.fillHeight: true
}
StyledText {
Layout.alignment: Qt.AlignVCenter
font.pixelSize: Appearance.font.pixelSize.larger
color: Appearance.colors.colSubtext
text: "•"
visible: true
}
ClockWidget {
id: clock
Layout.fillHeight: true
Layout.fillWidth: false
}
PowerButton {
Layout.fillWidth: false
Layout.fillHeight: true
}
}
}
}
}
}

View File

@@ -1,4 +1,4 @@
import qs.modules.common
import qs.common
import QtQuick
import QtQuick.Layouts
@@ -6,4 +6,4 @@ Item {
id: root
property real padding: 5
implicitHeight: Appearance.sizes.baseBarHeight
}
}

View File

@@ -4,5 +4,5 @@ import qs.common
import qs.common.widgets
StyledText {
text: Time.time
}
text: Time.time
}

View File

@@ -8,74 +8,74 @@ import qs.common
import qs.common.widgets
Item {
id: root
property bool borderless: Config.options.bar.borderless
Layout.fillHeight: true
implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 2
implicitHeight: Appearance.sizes.barHeight
id: root
property bool borderless: Config.options.bar.borderless
Timer {
running: MprisController.hasPlayers && MprisController.activePlayer().isPlaying && MprisController.activePlayer().lengthSupported
interval: 1000
repeat: true
onTriggered: MprisController.activePlayer().positionChanged()
}
Layout.fillHeight: true
implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 2
implicitHeight: Appearance.sizes.barHeight
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.MiddleButton | Qt.BackButton | Qt.ForwardButton | Qt.RightButton | Qt.LeftButton
onPressed: (event) => {
if (event.button === Qt.MiddleButton) {
MprisController.activePlayer().togglePlaying();
} else if (event.button === Qt.BackButton) {
MprisController.shiftPlayer(-1);
} else if (event.button === Qt.ForwardButton) {
MprisController.shiftPlayer(1);
} else if (event.button === Qt.LeftButton) {
GlobalStates.mediaControlsOpen = !GlobalStates.mediaControlsOpen;
}
}
}
RowLayout {
id: rowLayout
spacing: 4
anchors.fill: parent
visible: MprisController.hasPlayers
CircularProgress {
id: circularProgress
visible: MprisController.hasPlayers && MprisController.activePlayer().lengthSupported
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: rowLayout.spacing
lineWidth: 2
value: MprisController.activePlayer().lengthSupported ? MprisController.activePlayer()?.position / MprisController.activePlayer()?.length : 0
implicitSize: 26
colSecondary: Appearance.colors.colSecondaryContainer
colPrimary: Appearance.m3colors.m3onSecondaryContainer
enableAnimation: false
MaterialSymbol {
visible: MprisController.hasPlayers && MprisController.activePlayer().lengthSupported
anchors.centerIn: parent
fill: 1
text: MprisController.activePlayer()?.isPlaying ? "music_note" : "pause"
iconSize: Appearance.font.pixelSize.normal
color: Appearance.m3colors.m3onSecondaryContainer
}
Timer {
running: MprisController.hasPlayers && MprisController.activePlayer().isPlaying && MprisController.activePlayer().lengthSupported
interval: 1000
repeat: true
onTriggered: MprisController.activePlayer().positionChanged()
}
StyledText {
visible: Config.options.bar.verbose
width: rowLayout.width - (circularProgress.size + rowLayout.spacing * 2)
Layout.alignment: Qt.AlignCenter
Layout.fillWidth: true
Layout.rightMargin: rowLayout.spacing
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
color: Appearance.colors.colOnLayer1
text: `${MprisController.activePlayer()?.trackTitle}${MprisController.activePlayer()?.trackArtist ? ' • ' + MprisController.activePlayer().trackArtist : ''}`
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.MiddleButton | Qt.BackButton | Qt.ForwardButton | Qt.RightButton | Qt.LeftButton
onPressed: event => {
if (event.button === Qt.MiddleButton) {
MprisController.activePlayer().togglePlaying();
} else if (event.button === Qt.BackButton) {
MprisController.shiftPlayer(-1);
} else if (event.button === Qt.ForwardButton) {
MprisController.shiftPlayer(1);
} else if (event.button === Qt.LeftButton) {
GlobalStates.mediaControlsOpen = !GlobalStates.mediaControlsOpen;
}
}
}
}
}
RowLayout {
id: rowLayout
spacing: 4
anchors.fill: parent
visible: MprisController.hasPlayers
CircularProgress {
id: circularProgress
visible: false && MprisController.hasPlayers && MprisController.activePlayer().lengthSupported
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: rowLayout.spacing
lineWidth: 2
value: MprisController.activePlayer().lengthSupported ? MprisController.activePlayer()?.position / MprisController.activePlayer()?.length : 0
implicitSize: 26
colSecondary: Appearance.colors.colSecondaryContainer
colPrimary: Appearance.m3colors.m3onSecondaryContainer
enableAnimation: false
MaterialSymbol {
visible: MprisController.hasPlayers && MprisController.activePlayer().lengthSupported
anchors.centerIn: parent
fill: 1
text: MprisController.activePlayer()?.isPlaying ? "music_note" : "pause"
iconSize: Appearance.font.pixelSize.normal
color: Appearance.m3colors.m3onSecondaryContainer
}
}
StyledText {
visible: Config.options.bar.verbose
width: rowLayout.width - (circularProgress.size + rowLayout.spacing * 2)
Layout.alignment: Qt.AlignCenter
Layout.fillWidth: true
Layout.rightMargin: rowLayout.spacing
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
color: Appearance.colors.colOnLayer1
text: `${MprisController.activePlayer()?.trackTitle}${MprisController.activePlayer()?.trackArtist ? ' • ' + MprisController.activePlayer().trackArtist : ''}`
}
}
}

View File

@@ -14,7 +14,7 @@ Item {
anchors.fill: parent
acceptedButtons: Qt.LeftButton
onPressed: (event) => {
GlobalStates.notificationPanelOpen = !GlobalStates.notificationPanelOpen;
GlobalStates.notificationPanelOpen = !GlobalStates.notificationPanelOpen && NotificationService.amountNotifications > 0;
}
}
@@ -43,4 +43,4 @@ Item {
color: NotificationService.amountNotifications > 0 ? Appearance.m3colors.m3error : Appearance.m3colors.m3onSecondaryContainer
}
}
}
}

View File

@@ -4,13 +4,13 @@ import Quickshell
import QtQuick
Singleton {
id: root
readonly property string time: {
Qt.formatDateTime(clock.date, "ddd, MMM dd hh:mm:ss AP")
}
id: root
readonly property string time: {
Qt.formatDateTime(clock.date, "ddd, MMM dd hh:mm AP");
}
SystemClock {
id: clock
precision: SystemClock.Seconds
}
}
SystemClock {
id: clock
precision: SystemClock.Minutes
}
}