quickshell lets gooo
This commit is contained in:
43
dots/quickshell/modules/osd/Content.qml
Normal file
43
dots/quickshell/modules/osd/Content.qml
Normal file
@@ -0,0 +1,43 @@
|
||||
import "root:/widgets"
|
||||
import "root:/services"
|
||||
import "root:/config"
|
||||
import QtQuick
|
||||
|
||||
Column {
|
||||
id: root
|
||||
|
||||
required property Brightness.Monitor monitor
|
||||
|
||||
padding: Appearance.padding.large
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
VerticalSlider {
|
||||
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
|
||||
}
|
||||
|
||||
VerticalSlider {
|
||||
icon: `brightness_${(Math.round(value * 6) + 1)}`
|
||||
value: root.monitor?.brightness ?? 0
|
||||
onMoved: root.monitor?.setBrightness(value)
|
||||
|
||||
implicitWidth: Config.osd.sizes.sliderWidth
|
||||
implicitHeight: Config.osd.sizes.sliderHeight
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user