diff --git a/config/modules/quickshell/quickshell/Audio.qml b/config/modules/quickshell/quickshell/Audio.qml index e69de29..ede7aa7 100644 --- a/config/modules/quickshell/quickshell/Audio.qml +++ b/config/modules/quickshell/quickshell/Audio.qml @@ -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 + } + } +} diff --git a/config/modules/quickshell/quickshell/Bar.qml b/config/modules/quickshell/quickshell/Bar.qml index e2cdde0..7d31b42 100644 --- a/config/modules/quickshell/quickshell/Bar.qml +++ b/config/modules/quickshell/quickshell/Bar.qml @@ -50,6 +50,7 @@ Scope { Layout.preferredHeight: 20 // spacing: 100 spacing: 10 + Audio {} BatteryWidget {} Rectangle { implicitWidth: clockText.width diff --git a/config/modules/quickshell/quickshell/HyprlandHelpers.qml b/config/modules/quickshell/quickshell/HyprlandHelpers.qml index 8376444..3d65028 100644 --- a/config/modules/quickshell/quickshell/HyprlandHelpers.qml +++ b/config/modules/quickshell/quickshell/HyprlandHelpers.qml @@ -13,7 +13,6 @@ Singleton { if (x.id == id) { return x; } - print(x); } return null; } diff --git a/flake.lock b/flake.lock index 511e900..cbfd817 100644 --- a/flake.lock +++ b/flake.lock @@ -103,11 +103,11 @@ }, "den": { "locked": { - "lastModified": 1773020651, - "narHash": "sha256-DlRAoa+Zr4GpdleJe2VO7MjZ4968ZinX/rxmR/w3cZo=", + "lastModified": 1773446380, + "narHash": "sha256-Bm+V/HP3OGdmG+NnsgQTi5SEpmouJBVaZESUjBBFEc0=", "owner": "vic", "repo": "den", - "rev": "0b1d99f746da5d7128e2bea5c1b9a88b9ea7b441", + "rev": "ae6a59acba4e3729dc5055e12003b533aee12aae", "type": "github" }, "original": { @@ -152,11 +152,11 @@ }, "flake-aspects": { "locked": { - "lastModified": 1772999207, - "narHash": "sha256-dzZpKU1wS/9oMsgK9dqCD+wblBMj1EAhInQtvY2dLUI=", + "lastModified": 1773339018, + "narHash": "sha256-sPPriYJpLmukixc6/KBzeOhw83OSodco5YbeayHzAgo=", "owner": "vic", "repo": "flake-aspects", - "rev": "778d8d7c1352c3b173cdcb9fd0f65acbaf4744a6", + "rev": "b51a00bc0140e7708e421a64f20170a2e8ccae93", "type": "github" }, "original": { @@ -183,11 +183,11 @@ }, "flake-file": { "locked": { - "lastModified": 1772999280, - "narHash": "sha256-XX60YlqSKa/QNIJVnLeEXNDQPwrQucMuITef6rEJqIs=", + "lastModified": 1773224147, + "narHash": "sha256-w9RQyKZSTfqoZPRzIf7H4qVHy2N6uFk1MUU+c1K4c40=", "owner": "vic", "repo": "flake-file", - "rev": "e2a19eb539fa7be4537f6e73e7556edf031eed7f", + "rev": "97bd69ff570dddccd704077830446ec1ca3a6988", "type": "github" }, "original": { @@ -341,11 +341,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1772003810, - "narHash": "sha256-FfaHvYDfcWZ+0ZPkWDVywkglmQjBq0DoIqzl7TH2hXc=", + "lastModified": 1773486299, + "narHash": "sha256-9ZepWlWg9Z//OaR8QUh5C4khxOSaBaDix80wb5r43dg=", "owner": "vikingnope", "repo": "helium-browser-nix-flake", - "rev": "9001c8ec8bb3a4b9103eca2f2fc707bda1401977", + "rev": "c08f75eae80de20fa540b4ea12a64e255e7b3532", "type": "github" }, "original": { @@ -361,11 +361,11 @@ ] }, "locked": { - "lastModified": 1772985285, - "narHash": "sha256-wEEmvfqJcl9J0wyMgMrj1TixOgInBW/6tLPhWGoZE3s=", + "lastModified": 1773422513, + "narHash": "sha256-MPjR48roW7CUMU6lu0+qQGqj92Kuh3paIulMWFZy+NQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "5be5d8245cbc7bc0c09fbb5f38f23f223c543f85", + "rev": "ef12a9a2b0f77c8fa3dda1e7e494fca668909056", "type": "github" }, "original": { @@ -449,11 +449,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1773054659, - "narHash": "sha256-0B7oWd6vfp2gWYzZxCZocVKlzlHul8KrJLapPra6x2o=", + "lastModified": 1773439168, + "narHash": "sha256-BP8JCxijLBf5Qk83lEN/9qAOeDuAnftfmr92KQM1QOI=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "5cf53f581b8b383fe7b1bf9bb9e28c72394e2e16", + "rev": "9bf8fe7a5278b5f366384d73d87844a165c16b7a", "type": "github" }, "original": { @@ -789,11 +789,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1772927210, - "narHash": "sha256-9LHFK9vVbEZjy0cHr1Ijb9Gh1bpfKw2wF4r8DiKusS0=", - "rev": "0e6cdd5be64608ef630c2e41f8d51d484468492f", + "lastModified": 1773385838, + "narHash": "sha256-XEe12xo1wSLWCBDcQxAdg97W32GilGHRaf57HGWS2WU=", + "rev": "fef542e7a88eec2b698389e6279464fd479926b6", "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": { "type": "tarball", @@ -1062,11 +1062,11 @@ ] }, "locked": { - "lastModified": 1772944399, - "narHash": "sha256-xTzsSd3r5HBeufSZ3fszAn0ldfKctvsYG7tT2YJg5gY=", + "lastModified": 1773096132, + "narHash": "sha256-M3zEnq9OElB7zqc+mjgPlByPm1O5t2fbUrH3t/Hm5Ag=", "owner": "Mic92", "repo": "sops-nix", - "rev": "c8e69670b316d6788e435a3aa0bda74eb1b82cc0", + "rev": "d1ff3b1034d5bab5d7d8086a7803c5a5968cd784", "type": "github" }, "original": { @@ -1316,11 +1316,11 @@ ] }, "locked": { - "lastModified": 1772685307, - "narHash": "sha256-5xthZHeqwBeXNhnRIlxnCuaZLky0SZ6vQsxtd+eqhTU=", + "lastModified": 1773290160, + "narHash": "sha256-u09eF4Oafi+OIbTtKe/EWil26q1glcTATiSA7dF1oCI=", "owner": "youwen5", "repo": "zen-browser-flake", - "rev": "dc92d88524ee83308795bc90f6a9f1d965265aaa", + "rev": "c7cb51b30960757ed9fb8eb28567b32585d0a688", "type": "github" }, "original": {