diff options
| author | Kaj <kajgiesbers@hotmail.com> | 2025-07-26 06:16:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-26 14:16:52 +1000 |
| commit | 81b8ff31d845d31bc8116c6a3cb3702c8a85be70 (patch) | |
| tree | f627a90f016cfb5af80e8d385ced6d4376842a69 /modules/bar/popouts/Audio.qml | |
| parent | feat: improve network popout (#268) (diff) | |
| download | caelestia-shell-81b8ff31d845d31bc8116c6a3cb3702c8a85be70.tar.gz caelestia-shell-81b8ff31d845d31bc8116c6a3cb3702c8a85be70.tar.bz2 caelestia-shell-81b8ff31d845d31bc8116c6a3cb3702c8a85be70.zip | |
config: enable/disable status icons (#243)
* Adds ability to disable/enable status icons
Improves the hover calculations so that it's not hardcoded. This should make it easier to add/remove status icons.
Also adds an optional audio status icon.
* status: move config to barconfig
* fixes
* fix merge
* loader icons
* fix audio popout
---------
Co-authored-by: Kaj Giesbers <kajgiesbers@gmail.com>
Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Diffstat (limited to 'modules/bar/popouts/Audio.qml')
| -rw-r--r-- | modules/bar/popouts/Audio.qml | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/modules/bar/popouts/Audio.qml b/modules/bar/popouts/Audio.qml new file mode 100644 index 0000000..28667ec --- /dev/null +++ b/modules/bar/popouts/Audio.qml @@ -0,0 +1,57 @@ +import qs.widgets +import qs.services +import qs.config +import QtQuick.Layouts +import Quickshell + +ColumnLayout { + id: root + + required property var wrapper + + spacing: Appearance.spacing.normal + + VerticalSlider { + id: volumeSlider + + icon: { + if (Audio.muted) + return "no_sound"; + if (value >= 0.5) + return "volume_up"; + if (value > 0) + return "volume_down"; + return "volume_mute"; + } + + value: Audio.volume + onMoved: Audio.setVolume(value) + + implicitWidth: Config.osd.sizes.sliderWidth + implicitHeight: Config.osd.sizes.sliderHeight + } + + StyledRect { + id: pavuButton + + implicitWidth: implicitHeight + implicitHeight: icon.implicitHeight + Appearance.padding.small * 2 + + radius: Appearance.rounding.normal + color: Colours.palette.m3surfaceContainer + + StateLayer { + function onClicked(): void { + root.wrapper.hasCurrent = false; + Quickshell.execDetached(["pavucontrol"]); + } + } + + MaterialIcon { + id: icon + + anchors.centerIn: parent + text: "settings" + } + } +} |