Initial commit

This commit is contained in:
kossLAN 2025-06-07 04:01:14 -04:00
commit 05cd51b54e
Signed by: kossLAN
SSH key fingerprint: SHA256:bdV0x+wdQHGJ6LgmstH3KV8OpWY+OOFmJcPcB0wQPV8
148 changed files with 10112 additions and 0 deletions

View file

@ -0,0 +1,35 @@
import QtQuick
import Quickshell
import "../../widgets/" as Widgets
import "../.."
Widgets.IconButton {
required property var bar;
id: iconButton
implicitSize: 20
source: "root:/resources/volume/volume-full.svg"
padding: 2
onClicked:{
if (volumeControl.visible) {
volumeControl.hide()
}
else {
volumeControl.show()
}
}
ControlPanel {
id: volumeControl
anchor {
window: bar
onAnchoring: {
anchor.rect = mapToItem(bar.contentItem, 0, bar.height, width , 0);
}
}
}
}

View file

@ -0,0 +1,76 @@
import QtQuick
import QtQuick.Layouts
import Quickshell.Services.Pipewire
import "../.."
import "../../widgets/" as Widgets
Rectangle {
id: root
required property PwNode node
color: ShellGlobals.colors.light
radius: 5
PwObjectTracker {
id: defaultSourceTracker
objects: [root.node]
}
RowLayout {
anchors.fill: parent
spacing: 8
Widgets.IconButton {
source: {
if (!node.properties["application.icon-name"]) {
return root.node.audio.muted ? "root:resources/volume/volume-mute.svg" : "root:resources/volume/volume-full.svg";
} else {
return `image://icon/${node.properties["application.icon-name"]}`;
}
}
implicitSize: 32
padding: 4
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: 5
onClicked: {
root.node.audio.muted = !root.node.audio.muted;
}
}
ColumnLayout {
spacing: 4
Layout.fillWidth: true
Layout.fillHeight: true
Text {
color: ShellGlobals.colors.text
text: {
// Taken from quickshell-examples
const app = node.properties["application.name"] ?? (node.description != "" ? node.description : node.name);
const media = node.properties["media.name"];
return media != undefined ? `${app} - ${media}` : app;
}
font.bold: true
elide: Text.ElideRight
Layout.fillWidth: true
Layout.topMargin: 5
Layout.rightMargin: 5
Layout.bottomMargin: 5
}
Widgets.RoundSlider {
implicitHeight: 7
from: 0
to: 1
value: root.node.audio.volume
onValueChanged: node.audio.volume = value
Layout.fillWidth: true
Layout.rightMargin: 10
Layout.bottomMargin: 5
}
}
}
}

View file

@ -0,0 +1,117 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import Quickshell
import Quickshell.Services.Pipewire
import "../.."
PopupWindow {
id: root
width: mainContainer.width + 10
height: mainContainer.height + 10
color: "transparent"
visible: mainContainer.opacity > 0
function show() {
mainContainer.opacity = 1;
}
function hide() {
mainContainer.opacity = 0;
}
HoverHandler {
id: hoverHandler
enabled: true
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
onHoveredChanged: {
if (hovered == false) {
hide();
}
}
}
Rectangle {
id: mainContainer
width: 400
height: 400
color: ShellGlobals.colors.base
radius: 5
opacity: 0
anchors.centerIn: parent
layer.enabled: true
layer.effect: DropShadow {
transparentBorder: true
spread: 0.02
samples: 25
color: "#80000000"
}
Behavior on opacity {
NumberAnimation {
duration: 300
easing.type: Easing.OutCubic
}
}
ColumnLayout {
id: mainColumn
spacing: 10
Layout.fillWidth: true
Layout.preferredWidth: parent.width
Layout.margins: 10
anchors {
top: parent.top
left: parent.left
right: parent.right
margins: 10
}
PwNodeLinkTracker {
id: linkTracker
node: Pipewire.defaultAudioSink
}
Card {
node: Pipewire.defaultAudioSink
Layout.fillWidth: true
Layout.preferredHeight: 50
}
Rectangle {
Layout.fillWidth: true
color: ShellGlobals.colors.light
implicitHeight: 2
radius: 1
}
ScrollView {
Layout.fillWidth: true
Layout.fillHeight: true
ScrollBar.vertical.policy: ScrollBar.AlwaysOff
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
contentWidth: availableWidth
ColumnLayout {
width: parent.width
spacing: 10
Repeater {
model: linkTracker.linkGroups
Card {
required property PwLinkGroup modelData
node: modelData.source
Layout.fillWidth: true
Layout.preferredHeight: 45
}
}
}
}
}
}
}