diff --git a/home/dot_config/quickshell/bar/Bar.qml b/home/dot_config/quickshell/bar/Bar.qml
index 756b6dd..968793d 100644
--- a/home/dot_config/quickshell/bar/Bar.qml
+++ b/home/dot_config/quickshell/bar/Bar.qml
@@ -122,15 +122,19 @@ PanelWindow {
interactive: true
text: {
if (!bar.sink || !bar.sink.audio)
- return "\uf6a9";
- const output = bar.sink.audio.muted
- ? "\uf6a9" : "\uf028 " + Math.round(bar.sink.audio.volume * 100) + "%";
- const input = bar.source && bar.source.audio
- ? (bar.source.audio.muted ? "\uf131"
- : "\uf130 " + Math.round(bar.source.audio.volume * 100) + "%")
- : "";
- return output + (input ? " " + input : "");
+ return "\uf026";
+ return bar.sink.audio.muted
+ ? "\uf026" : "\uf028 " + Math.round(bar.sink.audio.volume * 100) + "%";
}
+ secondaryIcon: bar.source && bar.source.audio
+ ? (bar.source.audio.muted
+ ? "file://" + Quickshell.shellPath("icons/microphone-muted.svg")
+ : "file://" + Quickshell.shellPath("icons/microphone.svg"))
+ : ""
+ secondaryText: bar.source && bar.source.audio
+ ? (bar.source.audio.muted ? "OFF"
+ : Math.round(bar.source.audio.volume * 100) + "%")
+ : ""
onClicked: mouse => {
if (mouse.button === Qt.MiddleButton && bar.sink && bar.sink.audio)
bar.sink.audio.muted = !bar.sink.audio.muted;
diff --git a/home/dot_config/quickshell/bar/Block.qml b/home/dot_config/quickshell/bar/Block.qml
index 222e00d..7dd8cc6 100644
--- a/home/dot_config/quickshell/bar/Block.qml
+++ b/home/dot_config/quickshell/bar/Block.qml
@@ -1,4 +1,5 @@
import QtQuick
+import Quickshell.Widgets
Rectangle {
id: root
@@ -7,20 +8,44 @@ Rectangle {
property color textColor: "#ffffff"
property bool interactive: false
property string text: ""
+ property string fontFamily: "SF Pro Display, Font Awesome 6 Free"
+ property string secondaryIcon: ""
+ property string secondaryText: ""
signal clicked(var mouse)
signal wheel(var wheel)
- implicitWidth: label.implicitWidth + 20
+ implicitWidth: content.implicitWidth + 20
implicitHeight: 32
color: blockColor
- Text {
- id: label
+ Row {
+ id: content
anchors.centerIn: parent
- text: root.text
- color: root.textColor
- font.family: "SF Pro Display, Font Awesome 6 Free"
- font.pixelSize: 18
+ spacing: 7
+
+ Text {
+ text: root.text
+ color: root.textColor
+ font.family: root.fontFamily
+ font.pixelSize: 18
+ }
+
+ IconImage {
+ width: 18
+ height: 18
+ anchors.verticalCenter: parent.verticalCenter
+ visible: root.secondaryIcon !== ""
+ source: root.secondaryIcon
+ }
+
+ Text {
+ anchors.verticalCenter: parent.verticalCenter
+ visible: root.secondaryText !== ""
+ text: root.secondaryText
+ color: root.textColor
+ font.family: root.fontFamily
+ font.pixelSize: 18
+ }
}
MouseArea {
diff --git a/home/dot_config/quickshell/bar/icons/microphone-muted.svg b/home/dot_config/quickshell/bar/icons/microphone-muted.svg
new file mode 100644
index 0000000..a9482f4
--- /dev/null
+++ b/home/dot_config/quickshell/bar/icons/microphone-muted.svg
@@ -0,0 +1,6 @@
+
diff --git a/home/dot_config/quickshell/bar/icons/microphone.svg b/home/dot_config/quickshell/bar/icons/microphone.svg
new file mode 100644
index 0000000..ba7a3c1
--- /dev/null
+++ b/home/dot_config/quickshell/bar/icons/microphone.svg
@@ -0,0 +1,3 @@
+