added audio to qs && nix flake update

This commit is contained in:
2026-03-14 15:36:48 +00:00
parent ccd6b38184
commit 7a1caeaaa3
4 changed files with 64 additions and 29 deletions

View File

@@ -0,0 +1,35 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Services.UPower
import Quickshell.Services.Pipewire
Rectangle {
id: root
property PwNode defaultSpeaker: Pipewire.preferredDefaultAudioSink
property PwNode defaultMic: Pipewire.defaultAudioSource
PwObjectTracker {
objects: [root.defaultSpeaker, root.defaultMic]
}
implicitHeight: 20
implicitWidth: content.width
color: Colors.backgroundAlt
Layout.alignment: Qt.AlignCenter
radius: 3.5
RowLayout {
id: content
height: 20
anchors.centerIn: parent
Text {
id: speaker
text: root.defaultSpeaker.audio.muted ? "muted" : "unmuted"
color: Colors.textPrimary
}
Text {
id: mic
text: root.defaultMic.audio.muted ? "muted" : "unmuted"
color: Colors.textPrimary
}
}
}

View File

@@ -50,6 +50,7 @@ Scope {
Layout.preferredHeight: 20 Layout.preferredHeight: 20
// spacing: 100 // spacing: 100
spacing: 10 spacing: 10
Audio {}
BatteryWidget {} BatteryWidget {}
Rectangle { Rectangle {
implicitWidth: clockText.width implicitWidth: clockText.width

View File

@@ -13,7 +13,6 @@ Singleton {
if (x.id == id) { if (x.id == id) {
return x; return x;
} }
print(x);
} }
return null; return null;
} }

56
flake.lock generated
View File

@@ -103,11 +103,11 @@
}, },
"den": { "den": {
"locked": { "locked": {
"lastModified": 1773020651, "lastModified": 1773446380,
"narHash": "sha256-DlRAoa+Zr4GpdleJe2VO7MjZ4968ZinX/rxmR/w3cZo=", "narHash": "sha256-Bm+V/HP3OGdmG+NnsgQTi5SEpmouJBVaZESUjBBFEc0=",
"owner": "vic", "owner": "vic",
"repo": "den", "repo": "den",
"rev": "0b1d99f746da5d7128e2bea5c1b9a88b9ea7b441", "rev": "ae6a59acba4e3729dc5055e12003b533aee12aae",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -152,11 +152,11 @@
}, },
"flake-aspects": { "flake-aspects": {
"locked": { "locked": {
"lastModified": 1772999207, "lastModified": 1773339018,
"narHash": "sha256-dzZpKU1wS/9oMsgK9dqCD+wblBMj1EAhInQtvY2dLUI=", "narHash": "sha256-sPPriYJpLmukixc6/KBzeOhw83OSodco5YbeayHzAgo=",
"owner": "vic", "owner": "vic",
"repo": "flake-aspects", "repo": "flake-aspects",
"rev": "778d8d7c1352c3b173cdcb9fd0f65acbaf4744a6", "rev": "b51a00bc0140e7708e421a64f20170a2e8ccae93",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -183,11 +183,11 @@
}, },
"flake-file": { "flake-file": {
"locked": { "locked": {
"lastModified": 1772999280, "lastModified": 1773224147,
"narHash": "sha256-XX60YlqSKa/QNIJVnLeEXNDQPwrQucMuITef6rEJqIs=", "narHash": "sha256-w9RQyKZSTfqoZPRzIf7H4qVHy2N6uFk1MUU+c1K4c40=",
"owner": "vic", "owner": "vic",
"repo": "flake-file", "repo": "flake-file",
"rev": "e2a19eb539fa7be4537f6e73e7556edf031eed7f", "rev": "97bd69ff570dddccd704077830446ec1ca3a6988",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -341,11 +341,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1772003810, "lastModified": 1773486299,
"narHash": "sha256-FfaHvYDfcWZ+0ZPkWDVywkglmQjBq0DoIqzl7TH2hXc=", "narHash": "sha256-9ZepWlWg9Z//OaR8QUh5C4khxOSaBaDix80wb5r43dg=",
"owner": "vikingnope", "owner": "vikingnope",
"repo": "helium-browser-nix-flake", "repo": "helium-browser-nix-flake",
"rev": "9001c8ec8bb3a4b9103eca2f2fc707bda1401977", "rev": "c08f75eae80de20fa540b4ea12a64e255e7b3532",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -361,11 +361,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772985285, "lastModified": 1773422513,
"narHash": "sha256-wEEmvfqJcl9J0wyMgMrj1TixOgInBW/6tLPhWGoZE3s=", "narHash": "sha256-MPjR48roW7CUMU6lu0+qQGqj92Kuh3paIulMWFZy+NQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "5be5d8245cbc7bc0c09fbb5f38f23f223c543f85", "rev": "ef12a9a2b0f77c8fa3dda1e7e494fca668909056",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -449,11 +449,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1773054659, "lastModified": 1773439168,
"narHash": "sha256-0B7oWd6vfp2gWYzZxCZocVKlzlHul8KrJLapPra6x2o=", "narHash": "sha256-BP8JCxijLBf5Qk83lEN/9qAOeDuAnftfmr92KQM1QOI=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "5cf53f581b8b383fe7b1bf9bb9e28c72394e2e16", "rev": "9bf8fe7a5278b5f366384d73d87844a165c16b7a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -789,11 +789,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1772927210, "lastModified": 1773385838,
"narHash": "sha256-9LHFK9vVbEZjy0cHr1Ijb9Gh1bpfKw2wF4r8DiKusS0=", "narHash": "sha256-XEe12xo1wSLWCBDcQxAdg97W32GilGHRaf57HGWS2WU=",
"rev": "0e6cdd5be64608ef630c2e41f8d51d484468492f", "rev": "fef542e7a88eec2b698389e6279464fd479926b6",
"type": "tarball", "type": "tarball",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre960151.0e6cdd5be646/nixexprs.tar.xz" "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre962785.fef542e7a88e/nixexprs.tar.xz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@@ -1062,11 +1062,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772944399, "lastModified": 1773096132,
"narHash": "sha256-xTzsSd3r5HBeufSZ3fszAn0ldfKctvsYG7tT2YJg5gY=", "narHash": "sha256-M3zEnq9OElB7zqc+mjgPlByPm1O5t2fbUrH3t/Hm5Ag=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "c8e69670b316d6788e435a3aa0bda74eb1b82cc0", "rev": "d1ff3b1034d5bab5d7d8086a7803c5a5968cd784",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1316,11 +1316,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772685307, "lastModified": 1773290160,
"narHash": "sha256-5xthZHeqwBeXNhnRIlxnCuaZLky0SZ6vQsxtd+eqhTU=", "narHash": "sha256-u09eF4Oafi+OIbTtKe/EWil26q1glcTATiSA7dF1oCI=",
"owner": "youwen5", "owner": "youwen5",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "dc92d88524ee83308795bc90f6a9f1d965265aaa", "rev": "c7cb51b30960757ed9fb8eb28567b32585d0a688",
"type": "github" "type": "github"
}, },
"original": { "original": {