diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
diff --git a/shell/bar/Bar.qml b/shell/bar/Bar.qml
index 9c8eb04..d30bdad 100644
--- a/shell/bar/Bar.qml
+++ b/shell/bar/Bar.qml
@@ -73,14 +73,11 @@ Variants {
Layout.fillHeight: true
}
- // VolumeIndicator {
- // id: volumeIndicator
- // popup: root.popup
- // Layout.preferredWidth: this.height
- // Layout.fillHeight: true
- // Layout.topMargin: 2
- // Layout.bottomMargin: 2
- // }
+ VolumeIndicator {
+ bar: root
+ Layout.preferredWidth: this.height
+ Layout.fillHeight: true
+ }
PowerMenu {
bar: root
diff --git a/shell/bar/systray/SysTray.qml b/shell/bar/systray/SysTray.qml
index 47dfbe2..a4ffc74 100644
--- a/shell/bar/systray/SysTray.qml
+++ b/shell/bar/systray/SysTray.qml
@@ -5,8 +5,8 @@ import QtQuick.Layouts
import Quickshell
import Quickshell.Widgets
import Quickshell.Services.SystemTray
-import "../../widgets"
-import ".."
+import qs.bar
+import qs.widgets
// TODO:
// 1. Get rid of leftItem/rightItem properties on menu
diff --git a/shell/bar/volume/DeviceMixer.qml b/shell/bar/volume/DeviceMixer.qml
index ed37a83..e7076dc 100644
--- a/shell/bar/volume/DeviceMixer.qml
+++ b/shell/bar/volume/DeviceMixer.qml
@@ -3,8 +3,9 @@ pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import Quickshell.Services.Pipewire
-import "../../widgets/" as Widgets
-import "../.."
+import Quickshell.Widgets
+import qs
+import qs.widgets
ColumnLayout {
id: root
@@ -13,7 +14,7 @@ ColumnLayout {
// don't load until the node is not null
Loader {
id: sinkLoader
- active: sink !== null
+ active: sink !== null
Layout.preferredWidth: 350
Layout.preferredHeight: 45
@@ -22,11 +23,11 @@ ColumnLayout {
sourceComponent: VolumeCard {
id: sinkCard
node: sinkLoader.sink
- button: Widgets.FontIconButton {
- hoverEnabled: false
- iconName: sinkCard.node.audio.muted ? "volume_off" : "volume_up"
- checked: !sinkCard.node.audio.muted
- inactiveColor: ShellSettings.colors["surface_container_highest"]
+ button: StyledMouseArea {
+ property bool checked: !sinkCard.node.audio.muted
+
+ // IconImage {}
+
onClicked: {
sinkCard.node.audio.muted = !sinkCard.node.audio.muted;
}
@@ -39,7 +40,7 @@ ColumnLayout {
// microphone, same as above
Loader {
id: sourceLoader
- active: source !== null
+ active: source !== null
Layout.preferredWidth: 350
Layout.preferredHeight: 45
@@ -48,11 +49,11 @@ ColumnLayout {
sourceComponent: VolumeCard {
id: sourceCard
node: sourceLoader.source
- button: Widgets.FontIconButton {
- hoverEnabled: false
- iconName: sourceCard.node.audio.muted ? "mic_off" : "mic"
- checked: !sourceCard.node.audio.muted
- inactiveColor: ShellSettings.colors["surface_container_highest"]
+ button: StyledMouseArea {
+ property bool checked: !sourceCard.node.audio.muted
+
+ // IconImage {}
+
onClicked: {
sourceCard.node.audio.muted = !sourceCard.node.audio.muted;
}
diff --git a/shell/bar/volume/VolumeCard.qml b/shell/bar/volume/VolumeCard.qml
index 32ff535..ea085de 100644
--- a/shell/bar/volume/VolumeCard.qml
+++ b/shell/bar/volume/VolumeCard.qml
@@ -1,50 +1,80 @@
+pragma ComponentBehavior: Bound
+
import QtQuick
import QtQuick.Layouts
+import QtQuick.Controls
import Quickshell.Widgets
import Quickshell.Services.Pipewire
-import "../../widgets/" as Widgets
-import "../.."
+import qs
+import qs.widgets
-WrapperRectangle {
+Loader {
id: root
- color: ShellSettings.colors["surface_container"]
- radius: width / 2
- margin: 6
+ active: node !== null
required property PwNode node
- property string text
- property Component button
- property Component icon
- PwObjectTracker {
- id: tracker
- objects: [root.node]
- }
+ sourceComponent: WrapperRectangle {
+ id: comp
+ color: ShellSettings.colors.surface_container_translucent
+ radius: 12
+ margin: 6
- RowLayout {
- Widgets.MaterialSlider {
- value: root.node.audio.volume ?? 0
- text: root.text
- icon: root.icon
+ border {
+ width: 1
+ color: ShellSettings.colors.active_translucent
+ }
- onValueChanged: {
- // only allow changes when the node is ready other wise you will combust
- if (!root.node.ready)
- return;
+ // property string text
+ // property Component button
+ // property Component icon
- root.node.audio.volume = value;
+ PwObjectTracker {
+ id: tracker
+ objects: [root.node]
+ }
+
+ RowLayout {
+ Slider {
+ value: root.node.audio.volume ?? 0
+ // text: root.text
+ // icon: root.icon
+
+ onValueChanged: {
+ // only allow changes when the node is ready other wise you will combust
+ if (!root.node.ready)
+ return;
+
+ root.node.audio.volume = value;
+ }
+
+ Layout.fillWidth: true
+ Layout.fillHeight: true
}
- Layout.fillWidth: true
- Layout.fillHeight: true
- }
-
- Loader {
- id: buttonLoader
- sourceComponent: root.button
-
- Layout.preferredWidth: this.height
- Layout.fillHeight: true
+ // Loader {
+ // id: buttonLoader
+ // sourceComponent: root.button
+ //
+ // Layout.preferredWidth: this.height
+ // Layout.fillHeight: true
+ // }
}
}
+
+ // sourceComponent: VolumeCard {
+ // id: sinkCard
+ // node: sinkLoader.sink
+ // button: StyledMouseArea {
+ // property bool checked: !sinkCard.node.audio.muted
+ //
+ // // IconImage {}
+ //
+ // onClicked: {
+ // sinkCard.node.audio.muted = !sinkCard.node.audio.muted;
+ // }
+ // }
+ //
+ // anchors.fill: parent
+ // }
}
diff --git a/shell/bar/volume/VolumeControl.qml b/shell/bar/volume/VolumeControl.qml
index 4423de1..bcb4f48 100644
--- a/shell/bar/volume/VolumeControl.qml
+++ b/shell/bar/volume/VolumeControl.qml
@@ -3,32 +3,34 @@ pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import Quickshell.Widgets
-import "../../widgets/" as Widgets
+import qs.widgets
-WrapperItem {
- id: root
- visible: false
+DeviceMixer {}
- ColumnLayout {
- spacing: 10
-
- Widgets.TabBar {
- id: tabBar
- model: ["headphones", "tune"]
- Layout.fillWidth: true
- Layout.preferredHeight: 35
- }
-
- StackLayout {
- id: page
- currentIndex: tabBar.currentIndex
- Layout.fillWidth: true
- Layout.preferredHeight: currentItem ? currentItem.implicitHeight : 0
-
- readonly property Item currentItem: children[currentIndex]
-
- DeviceMixer {}
- ApplicationMixer {}
- }
- }
-}
+// WrapperItem {
+// id: root
+//
+// ColumnLayout {
+// spacing: 10
+//
+// // TabBar {
+// // id: tabBar
+// // model: ["headphones", "tune"]
+// // Layout.fillWidth: true
+// // Layout.preferredHeight: 35
+// // }
+//
+//
+// // StackLayout {
+// // id: page
+// // currentIndex: tabBar.currentIndex
+// // Layout.fillWidth: true
+// // Layout.preferredHeight: currentItem ? currentItem.implicitHeight : 0
+// //
+// // readonly property Item currentItem: children[currentIndex]
+// //
+// // DeviceMixer {}
+// // ApplicationMixer {}
+// // }
+// }
+// }
diff --git a/shell/bar/volume/VolumeIndicator.qml b/shell/bar/volume/VolumeIndicator.qml
index 66f7a6e..c251c4e 100644
--- a/shell/bar/volume/VolumeIndicator.qml
+++ b/shell/bar/volume/VolumeIndicator.qml
@@ -1,27 +1,65 @@
+pragma ComponentBehavior: Bound
+
import QtQuick
-import "../../widgets/" as Widgets
+import QtQuick.Layouts
+import Quickshell.Widgets
+import Quickshell.Services.Pipewire
+import qs.widgets
+import qs.bar
-Item {
+StyledMouseArea {
id: root
+ onClicked: showMenu = !showMenu
- required property var popup
+ required property var bar
+ property bool showMenu: false
- Widgets.FontIconButton {
- id: button
- iconName: "volume_up"
- anchors.fill: parent
- onClicked: {
- if (root.popup.content == volumeMenu) {
- root.popup.hide();
- return;
- }
+ IconImage {
+ id: icon
+ source: "root:resources/volume/volume-full.svg"
- root.popup.set(this, volumeMenu);
- root.popup.show();
+ anchors {
+ fill: parent
+ margins: 2
}
}
- VolumeControl {
- id: volumeMenu
+ property PopupItem menu: PopupItem {
+ id: menu
+ owner: root
+ popup: root.bar.popup
+ show: root.showMenu
+ onClosed: root.showMenu = false
+
+ implicitWidth: 300
+ implicitHeight: container.implicitHeight + (2 * 8)
+
+ // implicitWidth: volumeMenu.implicitWidth
+ // implicitHeight: volumeMenu.implicitHeight
+
+ // VolumeControl {
+ // id: volumeMenu
+ // }
+
+ ColumnLayout {
+ id: container
+
+ anchors {
+ fill: parent
+ margins: 8
+ }
+
+ VolumeCard {
+ node: Pipewire.defaultAudioSink
+ Layout.fillWidth: true
+ Layout.preferredHeight: 45
+ }
+
+ VolumeCard {
+ node: Pipewire.defaultAudioSource
+ Layout.fillWidth: true
+ Layout.preferredHeight: 45
+ }
+ }
}
}
diff --git a/shell/launcher/Controller.qml b/shell/launcher/Controller.qml
index 3a24e00..180f26a 100644
--- a/shell/launcher/Controller.qml
+++ b/shell/launcher/Controller.qml
@@ -7,7 +7,8 @@ import Quickshell
import Quickshell.Io
import Quickshell.Wayland
import Quickshell.Widgets
-import ".."
+import qs
+import qs.widgets
Singleton {
PersistentProperties {
@@ -42,10 +43,9 @@ Singleton {
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
// WlrLayershell.namespace: "shell:launcher"
- Rectangle {
+ StyledRectangle {
id: container
color: ShellSettings.colors.surface_translucent
- radius: 12
anchors {
fill: parent
@@ -66,13 +66,11 @@ Singleton {
anchors.bottomMargin: 0
spacing: 0
- Rectangle {
+ StyledRectangle {
id: searchContainer
Layout.fillWidth: true
implicitHeight: searchbox.implicitHeight + 15
radius: 6
- color: ShellSettings.colors.surface_container_translucent
- border.color: ShellSettings.colors.border_translucent
RowLayout {
id: searchbox
diff --git a/shell/resources/volume/volume-full.svg b/shell/resources/volume/volume-full.svg
index 5126fca..2c24be5 100644
--- a/shell/resources/volume/volume-full.svg
+++ b/shell/resources/volume/volume-full.svg
@@ -1,15 +1,9 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/shell/resources/volume/volume-mute.svg b/shell/resources/volume/volume-mute.svg
index 3604983..4b67e0c 100644
--- a/shell/resources/volume/volume-mute.svg
+++ b/shell/resources/volume/volume-mute.svg
@@ -1,16 +1,9 @@
-
-
-
+
+
+
\ No newline at end of file