chore: misc

This commit is contained in:
Nydragon 2024-11-17 17:23:44 +01:00
parent f4fa7deadf
commit a57cc7c1d2
Signed by: nydragon
SSH key fingerprint: SHA256:WcjW5NJPQ8Dx4uQDmoIlVPLWE27Od3fxoe0IUvuoPHE
5 changed files with 14 additions and 48 deletions

View file

@ -2,13 +2,11 @@ import "widgets/systray"
import "widgets/workspaces"
import "widgets/battery"
import "widgets/network"
import "widgets/notifcenter"
import "widgets/caffeine"
import "windows/notificationtoast"
import "windows/workspace-view"
import "base"
import "provider"
import Quickshell // for ShellRoot and PanelWindow
import Quickshell
import QtQuick
import QtQuick.Layouts
@ -33,8 +31,6 @@ PanelWindow {
win: lbar
}
WorkspaceView {}
Rectangle {
color: "transparent"
anchors.margins: 5
@ -57,12 +53,8 @@ PanelWindow {
Battery {}
//Privacy {}
Network {}
Notifcenter {}
Caffeine {}
Item {

View file

@ -13,17 +13,17 @@ ShellRoot {
}
}
Component.onCompleted: {
Quickshell.reloadCompleted.connect(() => loader.active = false);
Quickshell.reloadFailed.connect(e => {
loader.active = true;
loader.message = e;
});
}
LazyLoader {
id: loader
Component.onCompleted: {
Quickshell.reloadCompleted.connect(() => loader.active = false);
Quickshell.reloadFailed.connect(e => {
loader.active = true;
loader.message = e;
});
}
property string message: ""
PanelWindow {

View file

@ -26,17 +26,19 @@ BRectangle {
orientation: Qt.Horizontal
snapMode: ListView.SnapOneItem
spacing: 10
delegate: Item {
delegate: BRectangle {
id: card
required property var modelData
property MprisPlayer player: modelData
width: mprisSmall.width
height: mprisSmall.height
radius: 15
BlurredImage {
source: card.player?.trackArtUrl ?? ""
anchors.fill: parent
radius: 15
radius: parent.radius
}
RowLayout {
@ -104,7 +106,7 @@ BRectangle {
size: 20
}
BIconButton {
source: Quickshell.iconPath(card.player.playbackState === MprisPlaybackState.Playing ? "media-playback-pause" : "media-playback-start")
source: Quickshell.iconPath(card.player?.playbackState === MprisPlaybackState.Playing ? "media-playback-pause" : "media-playback-start")
onClicked: card.player?.togglePlaying()
size: 20
}

View file

@ -1,27 +0,0 @@
import "../../base"
import Quickshell
import Quickshell.Widgets
import Quickshell.Io
import QtQuick
BRectangle {
MouseArea {
anchors.fill: parent
IconImage {
anchors.fill: parent
anchors.margins: 2
source: Quickshell.iconPath("notification-active")
}
onClicked: () => {
gui.running = true;
}
Process {
id: gui
running: false
command: ["swaync-client", "-t"]
}
}
}

View file

@ -1,6 +1,5 @@
import QtQuick
import Quickshell
import Quickshell.Io
import Quickshell.Hyprland
import Quickshell.I3