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

View file

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

View file

@ -26,17 +26,19 @@ BRectangle {
orientation: Qt.Horizontal orientation: Qt.Horizontal
snapMode: ListView.SnapOneItem snapMode: ListView.SnapOneItem
spacing: 10 spacing: 10
delegate: Item { delegate: BRectangle {
id: card id: card
required property var modelData required property var modelData
property MprisPlayer player: modelData property MprisPlayer player: modelData
width: mprisSmall.width width: mprisSmall.width
height: mprisSmall.height height: mprisSmall.height
radius: 15
BlurredImage { BlurredImage {
source: card.player?.trackArtUrl ?? "" source: card.player?.trackArtUrl ?? ""
anchors.fill: parent anchors.fill: parent
radius: 15 radius: parent.radius
} }
RowLayout { RowLayout {
@ -104,7 +106,7 @@ BRectangle {
size: 20 size: 20
} }
BIconButton { 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() onClicked: card.player?.togglePlaying()
size: 20 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 QtQuick
import Quickshell import Quickshell
import Quickshell.Io
import Quickshell.Hyprland import Quickshell.Hyprland
import Quickshell.I3 import Quickshell.I3