Introduced Notification server, and added background thorugh quickshell
This commit is contained in:
@@ -40,11 +40,13 @@ Singleton {
|
||||
}
|
||||
|
||||
property JsonObject background: JsonObject {
|
||||
property string wallpaperPath: ""
|
||||
property bool enabled: true
|
||||
property string wallpaperPath: "/usr/share/hydro-os/DefaultBackground.png"
|
||||
property string thumbnailPath: ""
|
||||
}
|
||||
|
||||
property JsonObject bar: JsonObject {
|
||||
property int height: 45
|
||||
property bool bottom: false // Instead of top
|
||||
property int cornerStyle: 0 // 0: Hug | 1: Float | 2: Plain rectangle
|
||||
property bool borderless: false // true for no grouping of items
|
||||
|
||||
@@ -7,7 +7,7 @@ import Quickshell.Services.Mpris
|
||||
Singleton {
|
||||
readonly property list<MprisPlayer> activePlayers: Mpris.players.values
|
||||
readonly property var meaningfulPlayers: filterDuplicatePlayers(activePlayers)
|
||||
readonly property bool hasPlayers: meaningfulPlayers.length > 0
|
||||
readonly property bool hasPlayers: activePlayers.length > 0
|
||||
property int playerIndex: 0
|
||||
|
||||
function activePlayer() {
|
||||
@@ -15,7 +15,7 @@ Singleton {
|
||||
return null;
|
||||
}
|
||||
assertIndex();
|
||||
return meaningfulPlayers[playerIndex];
|
||||
return activePlayers[playerIndex];
|
||||
}
|
||||
|
||||
function shiftPlayer(shift) {
|
||||
@@ -23,7 +23,7 @@ Singleton {
|
||||
}
|
||||
|
||||
function assertIndex() {
|
||||
if (playerIndex < 0 || playerIndex >= meaningfulPlayers.length) {
|
||||
if (playerIndex < 0 || playerIndex >= activePlayers.length) {
|
||||
playerIndex = (playerIndex + activePlayers.length) % activePlayers.length
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ Singleton {
|
||||
|
||||
NotificationServer {
|
||||
id: server
|
||||
actionsSupported: true
|
||||
|
||||
onNotification: notif => {
|
||||
notif.tracked = true;
|
||||
@@ -22,6 +22,7 @@ Button {
|
||||
property var releaseAction // When left clicking (release)
|
||||
property var altAction // When right clicking
|
||||
property var middleClickAction // When middle clicking
|
||||
property color buttonTextColor: Appearance?.m3colors.m3onBackground ?? "black"
|
||||
|
||||
property color colBackground: ColorUtils.transparentize(Appearance?.colors.colLayer1Hover, 1) || "transparent"
|
||||
property color colBackgroundHover: Appearance?.colors.colLayer1Hover ?? "#E5DFED"
|
||||
@@ -197,5 +198,6 @@ Button {
|
||||
|
||||
contentItem: StyledText {
|
||||
text: root.buttonText
|
||||
color: root.buttonTextColor
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user