Compare commits
No commits in common. "318ca10e44dc776503e13a19c97aa3827a1e90bd" and "45aed4fab3d1770dede54bdf2dc6672e06b224fe" have entirely different histories.
318ca10e44
...
45aed4fab3
@ -1,7 +1,6 @@
|
|||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
|
||||||
import qs
|
import qs
|
||||||
import qs.settings
|
import qs.settings
|
||||||
|
|
||||||
@ -33,9 +32,9 @@ Variants {
|
|||||||
color: Qt.rgba(Colors.surface.r, Colors.surface.g, Colors.surface.b, Settings.config.translucency)
|
color: Qt.rgba(Colors.surface.r, Colors.surface.g, Colors.surface.b, Settings.config.translucency)
|
||||||
radius: Settings.config.floating ? Settings.config.barHeight / 2 : 0
|
radius: Settings.config.floating ? Settings.config.barHeight / 2 : 0
|
||||||
|
|
||||||
RowLayout {
|
Row {
|
||||||
id: leftStuff
|
id: leftStuff
|
||||||
anchors.margins: Settings.config.barHeight / 4
|
leftPadding: Settings.config.barHeight / 4
|
||||||
spacing: 10
|
spacing: 10
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@ -52,14 +51,12 @@ Variants {
|
|||||||
Clock {}
|
Clock {}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
Row {
|
||||||
id: rightStuff
|
id: rightStuff
|
||||||
anchors.margins: Settings.config.barHeight / 4
|
rightPadding: Settings.config.barHeight / 4
|
||||||
spacing: 10
|
spacing: 10
|
||||||
clip: true
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Network {}
|
|
||||||
Volume {}
|
Volume {}
|
||||||
Battery {}
|
Battery {}
|
||||||
SysTray {}
|
SysTray {}
|
||||||
|
|||||||
@ -11,13 +11,14 @@ import qs.settings
|
|||||||
Loader {
|
Loader {
|
||||||
id: batLoader
|
id: batLoader
|
||||||
active: UPower.displayDevice.isLaptopBattery
|
active: UPower.displayDevice.isLaptopBattery
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
sourceComponent: Rectangle {
|
sourceComponent: Rectangle {
|
||||||
id: container
|
id: container
|
||||||
radius: implicitHeight / 2
|
radius: implicitHeight / 2
|
||||||
color: clickHandler.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
|
color: clickHandler.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
implicitWidth: UPower.displayDevice.isLaptopBattery ? root.implicitWidth + 20 : 0
|
implicitWidth: root.implicitWidth + 20
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|||||||
@ -1,89 +0,0 @@
|
|||||||
pragma ComponentBehavior: Bound
|
|
||||||
import Quickshell.Networking
|
|
||||||
import QtQuick
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import qs.reusables
|
|
||||||
import qs.settings
|
|
||||||
import qs
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: root
|
|
||||||
// This is the background of the entire bar/module
|
|
||||||
// You might want to make this transparent if you only want the "pills" to show
|
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
|
||||||
implicitWidth: mainLayout.implicitWidth + 20
|
|
||||||
color: Colors.surfaceContainer
|
|
||||||
radius: implicitHeight / 2
|
|
||||||
|
|
||||||
// --- Logic Functions ---
|
|
||||||
function getIcon(device) {
|
|
||||||
if (device.type === DeviceType.Wifi) {
|
|
||||||
for (var i = 0; i < device.networks.values.length; i++) {
|
|
||||||
var net = device.networks.values[i];
|
|
||||||
if (net.connected) {
|
|
||||||
if (net.signalStrength <= 0.20)
|
|
||||||
return "android_wifi_0_bar";
|
|
||||||
if (net.signalStrength <= 0.40)
|
|
||||||
return "android_wifi_1_bar";
|
|
||||||
if (net.signalStrength <= 0.60)
|
|
||||||
return "android_wifi_2_bar";
|
|
||||||
if (net.signalStrength <= 0.80)
|
|
||||||
return "android_wifi_3_bar";
|
|
||||||
return "android_wifi_4_bar";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return "wifi_off";
|
|
||||||
} else if (device.connected) {
|
|
||||||
return "settings_ethernet";
|
|
||||||
}
|
|
||||||
return "wifi_off";
|
|
||||||
}
|
|
||||||
|
|
||||||
function getStatus(device) {
|
|
||||||
if (device.type === DeviceType.Wifi) {
|
|
||||||
for (var i = 0; i < device.networks.values.length; i++) {
|
|
||||||
var net = device.networks.values[i];
|
|
||||||
if (net.connected) {
|
|
||||||
return net.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return "Disconnected";
|
|
||||||
}
|
|
||||||
return device.connected ? "Connected" : "Disconnected";
|
|
||||||
}
|
|
||||||
|
|
||||||
// --- Main Layout ---
|
|
||||||
RowLayout {
|
|
||||||
id: mainLayout
|
|
||||||
anchors.centerIn: parent
|
|
||||||
spacing: 10 // Space between multiple device pills (if you have ethernet + wifi)
|
|
||||||
|
|
||||||
Repeater {
|
|
||||||
id: netRepeater
|
|
||||||
model: Networking.devices
|
|
||||||
|
|
||||||
delegate: RowLayout {
|
|
||||||
id: innerContent
|
|
||||||
required property var modelData
|
|
||||||
// THIS fixes the centering issue:
|
|
||||||
anchors.centerIn: parent
|
|
||||||
spacing: 8
|
|
||||||
|
|
||||||
CustomIcon {
|
|
||||||
id: netIcon
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
text: root.getIcon(innerContent.modelData)
|
|
||||||
}
|
|
||||||
|
|
||||||
CustomText {
|
|
||||||
id: netText
|
|
||||||
Layout.topMargin: 1
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
text: root.getStatus(innerContent.modelData)
|
|
||||||
// Ensures the text font aligns vertically within its own line-height
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -8,6 +8,7 @@ Rectangle {
|
|||||||
id: root
|
id: root
|
||||||
radius: implicitHeight / 2
|
radius: implicitHeight / 2
|
||||||
color: pavuArea.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
|
color: pavuArea.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
implicitWidth: volumeIcon.implicitWidth + 10
|
implicitWidth: volumeIcon.implicitWidth + 10
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
CustomIcon {
|
CustomIcon {
|
||||||
|
|||||||
@ -8,6 +8,7 @@ Rectangle {
|
|||||||
id: container
|
id: container
|
||||||
radius: implicitHeight / 2
|
radius: implicitHeight / 2
|
||||||
color: Colors.surfaceContainer
|
color: Colors.surfaceContainer
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
implicitWidth: root.implicitWidth
|
implicitWidth: root.implicitWidth
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
Item {
|
Item {
|
||||||
|
|||||||
@ -10,8 +10,9 @@ Rectangle {
|
|||||||
id: root
|
id: root
|
||||||
radius: implicitHeight / 2
|
radius: implicitHeight / 2
|
||||||
color: pavuArea.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
|
color: pavuArea.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
implicitWidth: textRow.implicitWidth + 20
|
implicitWidth: textRow.implicitWidth + 20
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
implicitHeight: Settings.config.barHeight - 8
|
||||||
property var sink: Pipewire.defaultAudioSink
|
property var sink: Pipewire.defaultAudioSink
|
||||||
function getVolumeIcon() {
|
function getVolumeIcon() {
|
||||||
// Safety check: if Pipewire is dead or sink is missing
|
// Safety check: if Pipewire is dead or sink is missing
|
||||||
@ -39,10 +40,8 @@ Rectangle {
|
|||||||
id: textRow
|
id: textRow
|
||||||
spacing: 2
|
spacing: 2
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
height: parent.height
|
|
||||||
CustomText {
|
CustomText {
|
||||||
id: volumeText
|
id: volumeText
|
||||||
Layout.topMargin: 1
|
|
||||||
PwObjectTracker {
|
PwObjectTracker {
|
||||||
objects: Pipewire.ready ? Pipewire.defaultAudioSink : []
|
objects: Pipewire.ready ? Pipewire.defaultAudioSink : []
|
||||||
}
|
}
|
||||||
@ -51,6 +50,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
CustomIcon {
|
CustomIcon {
|
||||||
id: volumeIcon
|
id: volumeIcon
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
opacity: Pipewire.ready ? root.sink.audio.muted ? 0.5 : 1 : 0
|
opacity: Pipewire.ready ? root.sink.audio.muted ? 0.5 : 1 : 0
|
||||||
text: Pipewire.ready ? root.getVolumeIcon() : null
|
text: Pipewire.ready ? root.getVolumeIcon() : null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,8 +10,9 @@ Rectangle {
|
|||||||
color: Colors.surfaceContainer
|
color: Colors.surfaceContainer
|
||||||
|
|
||||||
implicitWidth: workspaceRow.implicitWidth + 10
|
implicitWidth: workspaceRow.implicitWidth + 10
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
radius: Settings.config.barHeight / 2
|
radius: Settings.config.barHeight / 2
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
property var screen: screen
|
property var screen: screen
|
||||||
Row {
|
Row {
|
||||||
id: workspaceRow
|
id: workspaceRow
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import QtQuick
|
|||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import qs.settings
|
import qs.settings
|
||||||
import QtQuick.Dialogs
|
import QtQuick.Dialogs
|
||||||
import Quickshell
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
FontDialog {
|
FontDialog {
|
||||||
@ -13,15 +12,18 @@ Item {
|
|||||||
IpcHandler {
|
IpcHandler {
|
||||||
id: ipcHandler
|
id: ipcHandler
|
||||||
target: "settings"
|
target: "settings"
|
||||||
|
function setWall(newWall: string): void {
|
||||||
|
console.log(Settings.config.generateScheme);
|
||||||
|
Settings.config.currentWall = newWall;
|
||||||
|
if (Settings.config.generateScheme === true) {
|
||||||
|
wallustRunner.startDetached();
|
||||||
|
}
|
||||||
|
}
|
||||||
function setFont(newFont: string): void {
|
function setFont(newFont: string): void {
|
||||||
Settings.config.font = newFont;
|
Settings.config.font = newFont;
|
||||||
}
|
}
|
||||||
function gen(toggle: bool): void {
|
function gen(toggle: bool): void {
|
||||||
Settings.config.generateScheme = toggle;
|
Settings.config.generateScheme = toggle;
|
||||||
}
|
}
|
||||||
function reload(hard: bool): void {
|
|
||||||
Quickshell.reload(hard);
|
|
||||||
console.log("reloaded!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@ Rectangle {
|
|||||||
required property var modelData
|
required property var modelData
|
||||||
implicitWidth: ListView.view ? ListView.view.width : 300
|
implicitWidth: ListView.view ? ListView.view.width : 300
|
||||||
implicitHeight: fullLayout.implicitHeight + 20
|
implicitHeight: fullLayout.implicitHeight + 20
|
||||||
color: dismissArea.containsMouse ? Colors.surfaceContainerLow : Colors.surfaceContainerHigh
|
color: dismissArea.containsMouse ? Colors.color5 : Colors.color6
|
||||||
radius: 22
|
radius: 22
|
||||||
Timer {
|
Timer {
|
||||||
id: dismissTimer
|
id: dismissTimer
|
||||||
@ -32,7 +32,7 @@ Rectangle {
|
|||||||
id: notiIcon
|
id: notiIcon
|
||||||
radius: notifyItem.radius - notifyItem.radius / 3
|
radius: notifyItem.radius - notifyItem.radius / 3
|
||||||
implicitWidth: 64
|
implicitWidth: 64
|
||||||
color: "transparent"
|
color: Colors.color8
|
||||||
implicitHeight: 64
|
implicitHeight: 64
|
||||||
visible: notifyItem.modelData.image !== ""
|
visible: notifyItem.modelData.image !== ""
|
||||||
IconImage {
|
IconImage {
|
||||||
|
|||||||
@ -278,6 +278,38 @@ ClippingWrapperRectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
id: schemeGeneratorWrapper
|
||||||
|
Layout.fillWidth: true
|
||||||
|
leftMargin: 10
|
||||||
|
rightMargin: 15
|
||||||
|
implicitHeight: 30
|
||||||
|
bottomLeftRadius: 12
|
||||||
|
bottomRightRadius: 12
|
||||||
|
topRightRadius: 4
|
||||||
|
topLeftRadius: 4
|
||||||
|
color: Colors.surfaceContainerHigh
|
||||||
|
child: RowLayout {
|
||||||
|
id: schemeGeneratorLayout
|
||||||
|
spacing: 5
|
||||||
|
CustomText {
|
||||||
|
id: schemeGeneratorText
|
||||||
|
text: "Scheme generator"
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
CustomButton {
|
||||||
|
implicitHeight: schemeGeneratorWrapper.implicitHeight - 10
|
||||||
|
onClicked: {
|
||||||
|
if (Settings.config.schemeGenerator === "matugen") {
|
||||||
|
Settings.config.schemeGenerator = "wallust";
|
||||||
|
} else {
|
||||||
|
Settings.config.schemeGenerator = "matugen";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
customText: Settings.config.schemeGenerator
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Item {
|
Item {
|
||||||
id: spring
|
id: spring
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|||||||
@ -23,7 +23,7 @@ FloatingWindow {
|
|||||||
}
|
}
|
||||||
Process {
|
Process {
|
||||||
id: wallustRunner
|
id: wallustRunner
|
||||||
property string cmd: "matugen image " + Settings.config.currentWall
|
property string cmd: Settings.config.schemeGenerator === "matugen" ? "matugen image " + Settings.config.currentWall : "wallust run " + Settings.config.currentWall
|
||||||
command: ["sh", "-c", cmd]
|
command: ["sh", "-c", cmd]
|
||||||
}
|
}
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
|
|||||||
@ -1,16 +1,10 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import qs
|
|
||||||
import qs.settings
|
import qs.settings
|
||||||
|
import qs
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
property real fill: 0
|
verticalAlignment: Text.AlignVCenter
|
||||||
font.family: "Material Symbols Rounded"
|
font.family: "Material Symbols Rounded"
|
||||||
color: Colors.onSurfaceColor
|
color: Colors.onSurfaceColor
|
||||||
font.pixelSize: Settings.config.fontSize
|
font.pixelSize: Settings.config.fontSize + 2
|
||||||
font.variableAxes: ({
|
|
||||||
FILL: fill,
|
|
||||||
GRAD: 200,
|
|
||||||
opsz: 36,
|
|
||||||
wght: 400
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user