remove battery module from local pc
This commit is contained in:
commit
c1267d5d8e
@ -32,14 +32,13 @@ Variants {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
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 {
|
RowLayout {
|
||||||
id: leftStuff
|
id: leftStuff
|
||||||
anchors.margins: Settings.config.barHeight / 4
|
|
||||||
spacing: 10
|
spacing: 10
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Workspaces {
|
Workspaces {
|
||||||
|
Layout.leftMargin: Settings.config.floating ? 5 : 20
|
||||||
property var screen: root.modelData
|
property var screen: root.modelData
|
||||||
}
|
}
|
||||||
Title {}
|
Title {}
|
||||||
@ -54,16 +53,16 @@ Variants {
|
|||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: rightStuff
|
id: rightStuff
|
||||||
anchors.margins: 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 {}
|
|
||||||
Battery {}
|
|
||||||
SysTray {}
|
SysTray {}
|
||||||
SettingsIcon {}
|
StatusIcons {
|
||||||
|
margin: Layout.rightMargin
|
||||||
|
barWindow: root
|
||||||
|
barContainer: container
|
||||||
|
Layout.rightMargin: Settings.config.floating ? 5 : 20
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,83 +0,0 @@
|
|||||||
import Quickshell.Services.UPower
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import QtQuick
|
|
||||||
import Quickshell.Widgets
|
|
||||||
import Qt5Compat.GraphicalEffects
|
|
||||||
import Quickshell
|
|
||||||
import qs
|
|
||||||
import qs.reusables
|
|
||||||
import qs.settings
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: container
|
|
||||||
visible: UPower.displayDevice.isLaptopBattery
|
|
||||||
radius: implicitHeight / 2
|
|
||||||
color: Colors.surfaceContainer
|
|
||||||
implicitWidth: UPower.displayDevice.isLaptopBattery ? root.implicitWidth + 20 : 0
|
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
|
||||||
Item {
|
|
||||||
id: root
|
|
||||||
anchors.centerIn: parent
|
|
||||||
|
|
||||||
property bool frame1: UPower.displayDevice.percentage <= 0.16
|
|
||||||
property bool frame2: UPower.displayDevice.percentage < 0.32
|
|
||||||
property bool frame3: UPower.displayDevice.percentage < 0.48
|
|
||||||
property bool frame4: UPower.displayDevice.percentage < 0.74
|
|
||||||
property bool frame5: UPower.displayDevice.percentage < 0.90
|
|
||||||
property bool frame6: UPower.displayDevice.percentage <= 1
|
|
||||||
|
|
||||||
function getBatteryIcon() {
|
|
||||||
if (UPower.displayDevice.state == UPowerDeviceState.Charging) {
|
|
||||||
return "battery_android_frame_bolt";
|
|
||||||
}
|
|
||||||
if (frame1) {
|
|
||||||
return "battery_android_frame_1";
|
|
||||||
}
|
|
||||||
if (frame2) {
|
|
||||||
return "battery_android_frame_2";
|
|
||||||
}
|
|
||||||
if (frame3) {
|
|
||||||
return "battery_android_frame_3";
|
|
||||||
}
|
|
||||||
if (frame4) {
|
|
||||||
return "battery_android_frame_4";
|
|
||||||
}
|
|
||||||
if (frame5) {
|
|
||||||
return "battery_android_frame_5";
|
|
||||||
}
|
|
||||||
if (frame6) {
|
|
||||||
return "battery_android_frame_full";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getProfileIcon() {
|
|
||||||
if (PowerProfiles.profile.toString() == "2") {
|
|
||||||
return "power-profile-performance-symbolic";
|
|
||||||
}
|
|
||||||
if (PowerProfiles.profile.toString() == "1") {
|
|
||||||
return "power-profile-balanced-symbolic";
|
|
||||||
}
|
|
||||||
if (PowerProfiles.profile.toString() == "0") {
|
|
||||||
return "power-profile-power-saver-symbolic";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
implicitWidth: batRow.width
|
|
||||||
implicitHeight: Settings.config.barHeight
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: batRow
|
|
||||||
anchors.centerIn: parent
|
|
||||||
height: parent.height
|
|
||||||
spacing: 5
|
|
||||||
CustomText {
|
|
||||||
id: batText
|
|
||||||
|
|
||||||
text: Math.round(UPower.displayDevice.percentage * 100) + "%"
|
|
||||||
}
|
|
||||||
CustomIcon {
|
|
||||||
id: batIcon
|
|
||||||
text: root.getBatteryIcon()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -25,7 +25,7 @@ Rectangle {
|
|||||||
id: clockText
|
id: clockText
|
||||||
property bool showFull
|
property bool showFull
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: showFull ? Qt.formatDateTime(clock.date, "hh:mm / dd.mm.yy") : Qt.formatDateTime(clock.date, "hh:mm")
|
text: showFull ? Qt.formatDateTime(clock.date, "hh:mm / dd.MM.yy") : Qt.formatDateTime(clock.date, "hh:mm")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|||||||
@ -6,44 +6,41 @@ import qs.settings
|
|||||||
import qs.reusables
|
import qs.reusables
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: container
|
id: root
|
||||||
visible: root.spotify != null
|
visible: root.spotify != null
|
||||||
radius: implicitHeight / 2
|
radius: implicitHeight / 2
|
||||||
color: clickHandler.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
|
|
||||||
implicitWidth: root.implicitWidth + 20
|
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
Item {
|
color: clickHandler.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
|
||||||
id: root
|
implicitWidth: statusRow.width + 20
|
||||||
anchors.centerIn: parent
|
|
||||||
property var spotify: root.getSpotify()
|
|
||||||
function getSpotify() {
|
|
||||||
for (let i = 0; i < Mpris.players.values.length; i++) {
|
|
||||||
if (Mpris.players.values[i].identity.toLowerCase() === "spotify") {
|
|
||||||
return Mpris.players.values[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
implicitWidth: statusRow.implicitWidth
|
|
||||||
implicitHeight: statusRow.implicitHeight
|
|
||||||
|
|
||||||
RowLayout {
|
property var spotify: root.getSpotify()
|
||||||
id: statusRow
|
function getSpotify() {
|
||||||
spacing: 5
|
for (let i = 0; i < Mpris.players.values.length; i++) {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
if (Mpris.players.values[i].identity.toLowerCase() === "spotify") {
|
||||||
property var combinedText: root.spotify != null ? root.spotify.trackArtist + " - " + root.spotify.trackTitle : ""
|
return Mpris.players.values[i];
|
||||||
property var status: root.spotify != null ? !root.spotify.isPlaying ? "play_arrow" : "pause" : ""
|
|
||||||
CustomText {
|
|
||||||
id: mprisText
|
|
||||||
Layout.topMargin: 2
|
|
||||||
text: root.spotify != null ? parent.combinedText : ""
|
|
||||||
}
|
|
||||||
CustomIcon {
|
|
||||||
id: mprisStatus
|
|
||||||
Layout.topMargin: 2
|
|
||||||
text: root.spotify != null ? parent.status : ""
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: statusRow
|
||||||
|
spacing: 5
|
||||||
|
anchors.centerIn: parent
|
||||||
|
property var combinedText: root.spotify != null ? root.spotify.trackArtist + " - " + root.spotify.trackTitle : ""
|
||||||
|
property var status: root.spotify != null ? !root.spotify.isPlaying ? "play_arrow" : "pause" : ""
|
||||||
|
CustomText {
|
||||||
|
id: mprisText
|
||||||
|
Layout.maximumWidth: 300
|
||||||
|
Layout.topMargin: 2
|
||||||
|
text: root.spotify != null ? parent.combinedText : ""
|
||||||
|
elide: Text.ElideRight
|
||||||
|
}
|
||||||
|
CustomIcon {
|
||||||
|
id: mprisStatus
|
||||||
|
Layout.topMargin: 2
|
||||||
|
text: root.spotify != null ? parent.status : ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: clickHandler
|
id: clickHandler
|
||||||
|
|||||||
@ -1,88 +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:
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
134
modules/bar/StatusIcons.qml
Normal file
134
modules/bar/StatusIcons.qml
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
pragma ComponentBehavior: Bound
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Io
|
||||||
|
import Quickshell.Services.Pipewire
|
||||||
|
import Quickshell.Networking
|
||||||
|
import Quickshell.Services.UPower
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import qs
|
||||||
|
import qs.reusables
|
||||||
|
import qs.settings
|
||||||
|
import "functions.js" as Fn
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: root
|
||||||
|
implicitWidth: statusLayout.implicitWidth + 20
|
||||||
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
|
color: Colors.surfaceContainer
|
||||||
|
radius: implicitHeight / 2
|
||||||
|
required property var barWindow
|
||||||
|
required property var barContainer
|
||||||
|
required property var margin
|
||||||
|
property var sink: Pipewire.defaultAudioSink
|
||||||
|
property var sinkReady: Pipewire.defaultAudioSink.ready
|
||||||
|
property var bat: UPower.displayDevice
|
||||||
|
property var perc: UPower.displayDevice.percentage
|
||||||
|
property var vol: Math.floor(Pipewire.defaultAudioSink.audio.volume * 100)
|
||||||
|
Process {
|
||||||
|
id: lowBat
|
||||||
|
running: false
|
||||||
|
command: ["sh", "-c", "notify-send", "'Low battery!'", "'Plug in your device!'"]
|
||||||
|
}
|
||||||
|
PopupWindow {
|
||||||
|
id: batPopup
|
||||||
|
property string popupText
|
||||||
|
implicitWidth: root.width + 5
|
||||||
|
implicitHeight: 30
|
||||||
|
anchor.window: root.barWindow
|
||||||
|
anchor.rect.y: root.barContainer.height + 5
|
||||||
|
anchor.rect.x: root.barContainer.width - root.width - root.margin
|
||||||
|
color: "transparent"
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: Colors.surfaceContainer
|
||||||
|
border.width: 5
|
||||||
|
border.color: Colors.surface
|
||||||
|
radius: Settings.config.floating ? height / 2 : Settings.config.screenCornerRadius
|
||||||
|
|
||||||
|
CustomText {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: batPopup.popupText
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: statusLayout
|
||||||
|
anchors.centerIn: parent
|
||||||
|
spacing: 10
|
||||||
|
CustomIcon {
|
||||||
|
id: volumeIcon
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
PwObjectTracker {
|
||||||
|
objects: Pipewire.ready ? Pipewire.defaultAudioSink : []
|
||||||
|
}
|
||||||
|
text: Fn.getVolumeIcon()
|
||||||
|
MouseArea {
|
||||||
|
id: pavuArea
|
||||||
|
Process {
|
||||||
|
id: pavuLauncher
|
||||||
|
command: ["sh", "-c", "pavucontrol"]
|
||||||
|
}
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: pavuLauncher.exec(pavuLauncher.command)
|
||||||
|
acceptedButtons: Qt.LeftButton
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: {
|
||||||
|
batPopup.visible = true;
|
||||||
|
batPopup.popupText = "Volume: " + root.vol + "%";
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
batPopup.visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
id: netRepeater
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
model: Networking.devices
|
||||||
|
|
||||||
|
delegate: CustomIcon {
|
||||||
|
id: netIcon
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
required property var modelData
|
||||||
|
text: Fn.getIcon(modelData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CustomIcon {
|
||||||
|
id: batIcon
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
visible: UPower.displayDevice.isLaptopBattery
|
||||||
|
text: Fn.getBatteryIcon(root.perc)
|
||||||
|
MouseArea {
|
||||||
|
id: batHover
|
||||||
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.LeftButton
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: {
|
||||||
|
batPopup.visible = true;
|
||||||
|
batPopup.popupText = "Battery: " + Math.floor(UPower.displayDevice.percentage * 100) + "%";
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
batPopup.visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CustomIcon {
|
||||||
|
id: settingsIcon
|
||||||
|
text: "settings"
|
||||||
|
MouseArea {
|
||||||
|
id: settingsArea
|
||||||
|
anchors.fill: settingsIcon
|
||||||
|
onClicked: {
|
||||||
|
Settings.config.settingsShown = true;
|
||||||
|
}
|
||||||
|
acceptedButtons: Qt.LeftButton
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
hoverEnabled: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -5,7 +5,7 @@ import qs
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
implicitWidth: trayRow.implicitWidth + 10
|
implicitWidth: trayRow.implicitWidth + 8
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
radius: implicitHeight / 2
|
radius: implicitHeight / 2
|
||||||
color: Colors.surfaceContainer
|
color: Colors.surfaceContainer
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
|
import Quickshell.Widgets
|
||||||
|
import Quickshell
|
||||||
import qs
|
import qs
|
||||||
import qs.settings
|
import qs.settings
|
||||||
import qs.reusables
|
import qs.reusables
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: container
|
id: container
|
||||||
@ -14,13 +17,32 @@ Rectangle {
|
|||||||
id: root
|
id: root
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
readonly property var activeWindow: ToplevelManager.activeToplevel
|
readonly property var activeWindow: ToplevelManager.activeToplevel
|
||||||
implicitWidth: titleText.implicitWidth + 20
|
implicitWidth: titleLayout.implicitWidth
|
||||||
implicitHeight: titleText.implicitHeight
|
implicitHeight: titleText.implicitHeight
|
||||||
CustomText {
|
RowLayout {
|
||||||
id: titleText
|
id: titleLayout
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.centerIn: parent
|
||||||
text: root.activeWindow ? root.activeWindow.activated ? root.activeWindow.appId : "Desktop" : "Desktop"
|
|
||||||
elide: Text.ElideRight
|
anchors.fill: parent
|
||||||
|
spacing: 5
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 30
|
||||||
|
Layout.leftMargin: 10
|
||||||
|
IconImage {
|
||||||
|
id: icon
|
||||||
|
source: root.activeWindow ? root.activeWindow.activated ? Quickshell.iconPath(root.activeWindow.appId, "") : "" : ""
|
||||||
|
implicitSize: root.activeWindow ? root.activeWindow.activated ? 16 : 0 : 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CustomText {
|
||||||
|
id: titleText
|
||||||
|
Layout.rightMargin: 10
|
||||||
|
Layout.maximumWidth: 300
|
||||||
|
text: root.activeWindow ? root.activeWindow.activated ? root.activeWindow.title : "Desktop" : "Desktop"
|
||||||
|
onTextChanged: {}
|
||||||
|
elide: Text.ElideRight
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,69 +0,0 @@
|
|||||||
import Quickshell.Io
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import QtQuick
|
|
||||||
import Quickshell.Services.Pipewire
|
|
||||||
import qs.settings
|
|
||||||
import qs.reusables
|
|
||||||
import qs
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: root
|
|
||||||
radius: implicitHeight / 2
|
|
||||||
color: pavuArea.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
|
|
||||||
implicitWidth: textRow.implicitWidth + 20
|
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
|
||||||
property var sink: Pipewire.defaultAudioSink
|
|
||||||
function getVolumeIcon() {
|
|
||||||
// Safety check: if Pipewire is dead or sink is missing
|
|
||||||
if (!sink)
|
|
||||||
return "volume_off";
|
|
||||||
|
|
||||||
// If muted, show the hush icon
|
|
||||||
if (sink.audio.muted)
|
|
||||||
return "volume_off";
|
|
||||||
|
|
||||||
// Volume is usually 0.0 to 1.0 (0% to 100%)
|
|
||||||
const vol = sink.audio.volume;
|
|
||||||
|
|
||||||
if (vol <= 0.25)
|
|
||||||
return "volume_mute";
|
|
||||||
if (vol < 0.75)
|
|
||||||
return "volume_down";
|
|
||||||
if (vol <= 1.00)
|
|
||||||
return "volume_up";
|
|
||||||
|
|
||||||
// If it's loud, prepare the ears!
|
|
||||||
return "volume_up";
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
id: textRow
|
|
||||||
spacing: 2
|
|
||||||
anchors.centerIn: parent
|
|
||||||
height: parent.height
|
|
||||||
CustomText {
|
|
||||||
id: volumeText
|
|
||||||
PwObjectTracker {
|
|
||||||
objects: Pipewire.ready ? Pipewire.defaultAudioSink : []
|
|
||||||
}
|
|
||||||
text: Pipewire.ready ? Math.round(root.sink.audio.volume * 100) + "%" : "failure"
|
|
||||||
opacity: Pipewire.ready ? root.sink.audio.muted ? 0.5 : 1 : 0
|
|
||||||
}
|
|
||||||
CustomIcon {
|
|
||||||
id: volumeIcon
|
|
||||||
opacity: Pipewire.ready ? root.sink.audio.muted ? 0.5 : 1 : 0
|
|
||||||
text: Pipewire.ready ? root.getVolumeIcon() : null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MouseArea {
|
|
||||||
id: pavuArea
|
|
||||||
Process {
|
|
||||||
id: pavuLauncher
|
|
||||||
command: ["sh", "-c", "pavucontrol"]
|
|
||||||
}
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: pavuLauncher.exec(pavuLauncher.command)
|
|
||||||
acceptedButtons: Qt.LeftButton
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
hoverEnabled: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -10,14 +10,14 @@ Rectangle {
|
|||||||
id: root
|
id: root
|
||||||
color: Colors.surfaceContainer
|
color: Colors.surfaceContainer
|
||||||
|
|
||||||
implicitWidth: workspaceRow.implicitWidth + 20
|
implicitWidth: workspaceRow.implicitWidth + 10
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
radius: Settings.config.barHeight / 2
|
radius: Settings.config.barHeight / 2
|
||||||
property var screen: screen
|
property var screen: screen
|
||||||
Row {
|
Row {
|
||||||
id: workspaceRow
|
id: workspaceRow
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: 5 // Slightly increase spacing between workspace buttons
|
spacing: 0 // Slightly increase spacing between workspace buttons
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
id: wsRepeater
|
id: wsRepeater
|
||||||
@ -38,14 +38,22 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
required property var modelData
|
required property var modelData
|
||||||
width: isOnMon ? Settings.config.barHeight - Settings.config.barHeight / 2 : 0
|
width: 20
|
||||||
height: isOnMon ? Settings.config.barHeight - Settings.config.barHeight / 2 : 0
|
height: Settings.config.barHeight - 10
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
Behavior on width {
|
||||||
|
NumberAnimation {
|
||||||
|
|
||||||
|
duration: 200
|
||||||
|
easing.type: Easing.Linear
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CustomText {
|
CustomText {
|
||||||
anchors.centerIn: workspaceNumber
|
anchors.centerIn: workspaceNumber
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: parent.modelData.id
|
text: parent.modelData.id
|
||||||
color: Colors.onSurfaceColor
|
|
||||||
opacity: workspaceNumber.modelData.focused ? 1 : 0.5
|
opacity: workspaceNumber.modelData.focused ? 1 : 0.5
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|||||||
91
modules/bar/functions.js
Normal file
91
modules/bar/functions.js
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
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 "\uf0b0";
|
||||||
|
//signa_wifi_0_bar
|
||||||
|
if (net.signalStrength <= 0.40)
|
||||||
|
return "\uebe4";
|
||||||
|
//network_wifi_1_bar
|
||||||
|
if (net.signalStrength <= 0.60)
|
||||||
|
return "\uebd6";
|
||||||
|
//network_wifi_2_bar
|
||||||
|
if (net.signalStrength <= 0.80)
|
||||||
|
return "\uebe1";
|
||||||
|
//network_wifi_3_bar
|
||||||
|
if (net.signalStrength >= 0.80)
|
||||||
|
return "\ue1d8";
|
||||||
|
// signal_wifi_4_bar
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "\ue1da";
|
||||||
|
} else if (device.connected) {
|
||||||
|
return "settings_ethernet";
|
||||||
|
}
|
||||||
|
return "\ue1da";
|
||||||
|
// signal_wifi_off
|
||||||
|
}
|
||||||
|
|
||||||
|
function getBatteryIcon(perc) {
|
||||||
|
if (UPower.displayDevice.state == UPowerDeviceState.Charging) {
|
||||||
|
return "battery_android_frame_bolt";
|
||||||
|
}
|
||||||
|
if (perc <= 0.16) {
|
||||||
|
lowBat.running = true;
|
||||||
|
return "battery_android_alert";
|
||||||
|
}
|
||||||
|
if (perc < 0.32) {
|
||||||
|
return "battery_android_frame_2";
|
||||||
|
}
|
||||||
|
if (perc < 0.48) {
|
||||||
|
return "battery_android_frame_3";
|
||||||
|
}
|
||||||
|
if (perc < 0.74) {
|
||||||
|
return "battery_android_frame_4";
|
||||||
|
}
|
||||||
|
if (perc < 0.9) {
|
||||||
|
return "battery_android_frame_5";
|
||||||
|
}
|
||||||
|
if (perc > 0.9) {
|
||||||
|
return "battery_android_frame_full";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
// pipewire function
|
||||||
|
function getVolumeIcon() {
|
||||||
|
// Safety check: if Pipewire is dead or sink is missing
|
||||||
|
if (!sink)
|
||||||
|
return "volume_off";
|
||||||
|
|
||||||
|
// If muted, show the hush icon
|
||||||
|
if (sink.audio.muted)
|
||||||
|
return "volume_off";
|
||||||
|
|
||||||
|
// Volume is usually 0.0 to 1.0 (0% to 100%)
|
||||||
|
const vol = sink.audio.volume;
|
||||||
|
|
||||||
|
if (vol <= 0.25)
|
||||||
|
return "volume_mute";
|
||||||
|
if (vol < 0.75)
|
||||||
|
return "volume_down";
|
||||||
|
if (vol <= 1.00)
|
||||||
|
return "volume_up";
|
||||||
|
|
||||||
|
// If it's loud, prepare the ears!
|
||||||
|
return "volume_up";
|
||||||
|
}
|
||||||
|
|
||||||
@ -11,8 +11,10 @@ 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.surfaceContainer : Colors.surfaceContainerLowest
|
color: dismissArea.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
|
||||||
radius: 22
|
radius: 22
|
||||||
|
border.width: 1
|
||||||
|
border.color: Colors.outline
|
||||||
Timer {
|
Timer {
|
||||||
id: dismissTimer
|
id: dismissTimer
|
||||||
interval: 5000
|
interval: 5000
|
||||||
|
|||||||
@ -24,7 +24,7 @@ Variants {
|
|||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
fillMode: Image.Stretch
|
fillMode: Image.PreserveAspectCrop
|
||||||
source: Settings.config.currentWall
|
source: Settings.config.currentWall
|
||||||
}
|
}
|
||||||
ScreenCorners {}
|
ScreenCorners {}
|
||||||
|
|||||||
@ -1,98 +0,0 @@
|
|||||||
pragma ComponentBehavior: Bound
|
|
||||||
import QtQuick
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import Quickshell
|
|
||||||
import QtQuick.Dialogs
|
|
||||||
import Quickshell.Widgets
|
|
||||||
import qs
|
|
||||||
import qs.settings
|
|
||||||
import qs.reusables
|
|
||||||
|
|
||||||
FloatingWindow {
|
|
||||||
id: root
|
|
||||||
visible: Settings.config.settingsShown
|
|
||||||
onClosed: {
|
|
||||||
Settings.config.settingsShown = false;
|
|
||||||
}
|
|
||||||
color: Colors.surface
|
|
||||||
title: "qs-settings"
|
|
||||||
implicitWidth: 800
|
|
||||||
implicitHeight: 600
|
|
||||||
ListModel {
|
|
||||||
id: pageModel
|
|
||||||
ListElement {
|
|
||||||
text: "welcomePage"
|
|
||||||
source: "WelcomePage.qml"
|
|
||||||
}
|
|
||||||
ListElement {
|
|
||||||
text: "Appearance"
|
|
||||||
source: "Appearance.qml"
|
|
||||||
}
|
|
||||||
ListElement {
|
|
||||||
text: "Matugen"
|
|
||||||
source: "Matugen.qml"
|
|
||||||
}
|
|
||||||
ListElement {
|
|
||||||
text: "test"
|
|
||||||
source: "WelcomePage.qml"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
id: windowLayout
|
|
||||||
clip: true
|
|
||||||
anchors.fill: parent
|
|
||||||
spacing: 10
|
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
|
||||||
id: pageWrapper
|
|
||||||
Layout.margins: 20
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.preferredWidth: 200
|
|
||||||
Layout.rightMargin: 0
|
|
||||||
margin: 20
|
|
||||||
color: Colors.surfaceContainerLow
|
|
||||||
radius: 12
|
|
||||||
ListView {
|
|
||||||
id: pageView
|
|
||||||
clip: true
|
|
||||||
model: pageModel
|
|
||||||
delegate: pageDelegate
|
|
||||||
Component {
|
|
||||||
id: pageDelegate
|
|
||||||
Rectangle {
|
|
||||||
radius: 24
|
|
||||||
color: ListView.isCurrentItem ? Colors.surfaceContainerHigh : "transparent"
|
|
||||||
implicitHeight: 30
|
|
||||||
implicitWidth: pageWrapper.width - 50
|
|
||||||
required property var modelData
|
|
||||||
required property int index
|
|
||||||
CustomText {
|
|
||||||
id: delegateText
|
|
||||||
leftPadding: 10
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
text: parent.modelData.text
|
|
||||||
}
|
|
||||||
MouseArea {
|
|
||||||
id: clickHandler
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
acceptedButtons: Qt.LeftButton
|
|
||||||
onClicked: {
|
|
||||||
contentLoader.source = parent.modelData.source;
|
|
||||||
pageView.currentIndex = parent.index;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loader {
|
|
||||||
id: contentLoader
|
|
||||||
Layout.leftMargin: 0
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.margins: 20
|
|
||||||
source: pageModel.get(pageView.currentIndex).source
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -26,7 +26,9 @@ ClippingWrapperRectangle {
|
|||||||
}
|
}
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
clip: true
|
clip: true
|
||||||
color: Colors.surfaceContainerLow
|
color: Colors.surfaceContainerHigh
|
||||||
|
border.color: Colors.primary
|
||||||
|
border.width: 1
|
||||||
radius: 12
|
radius: 12
|
||||||
margin: 20
|
margin: 20
|
||||||
|
|
||||||
@ -45,7 +47,7 @@ ClippingWrapperRectangle {
|
|||||||
bottomRightRadius: 4
|
bottomRightRadius: 4
|
||||||
bottomLeftRadius: 4
|
bottomLeftRadius: 4
|
||||||
|
|
||||||
color: Colors.surfaceContainerHigh
|
color: Colors.primaryContainer
|
||||||
implicitHeight: 30
|
implicitHeight: 30
|
||||||
child: RowLayout {
|
child: RowLayout {
|
||||||
id: fontLayout
|
id: fontLayout
|
||||||
@ -73,7 +75,7 @@ ClippingWrapperRectangle {
|
|||||||
bottomRightRadius: 4
|
bottomRightRadius: 4
|
||||||
topRightRadius: 4
|
topRightRadius: 4
|
||||||
topLeftRadius: 4
|
topLeftRadius: 4
|
||||||
color: Colors.surfaceContainerHigh
|
color: Colors.primaryContainer
|
||||||
child: RowLayout {
|
child: RowLayout {
|
||||||
id: floatingToggleLayout
|
id: floatingToggleLayout
|
||||||
spacing: 40
|
spacing: 40
|
||||||
@ -102,7 +104,7 @@ ClippingWrapperRectangle {
|
|||||||
bottomRightRadius: 4
|
bottomRightRadius: 4
|
||||||
topRightRadius: 4
|
topRightRadius: 4
|
||||||
topLeftRadius: 4
|
topLeftRadius: 4
|
||||||
color: Colors.surfaceContainerHigh
|
color: Colors.primaryContainer
|
||||||
child: RowLayout {
|
child: RowLayout {
|
||||||
id: screenCornerLayout
|
id: screenCornerLayout
|
||||||
spacing: 40
|
spacing: 40
|
||||||
@ -131,7 +133,7 @@ ClippingWrapperRectangle {
|
|||||||
bottomRightRadius: 4
|
bottomRightRadius: 4
|
||||||
topRightRadius: 4
|
topRightRadius: 4
|
||||||
topLeftRadius: 4
|
topLeftRadius: 4
|
||||||
color: Colors.surfaceContainerHigh
|
color: Colors.primaryContainer
|
||||||
child: RowLayout {
|
child: RowLayout {
|
||||||
id: screenCornerRadiusLayout
|
id: screenCornerRadiusLayout
|
||||||
spacing: 5
|
spacing: 5
|
||||||
@ -174,7 +176,7 @@ ClippingWrapperRectangle {
|
|||||||
bottomRightRadius: 4
|
bottomRightRadius: 4
|
||||||
topRightRadius: 4
|
topRightRadius: 4
|
||||||
topLeftRadius: 4
|
topLeftRadius: 4
|
||||||
color: Colors.surfaceContainerHigh
|
color: Colors.primaryContainer
|
||||||
child: RowLayout {
|
child: RowLayout {
|
||||||
id: barControlsLayout
|
id: barControlsLayout
|
||||||
spacing: 5
|
spacing: 5
|
||||||
@ -217,7 +219,7 @@ ClippingWrapperRectangle {
|
|||||||
bottomRightRadius: 4
|
bottomRightRadius: 4
|
||||||
topRightRadius: 4
|
topRightRadius: 4
|
||||||
topLeftRadius: 4
|
topLeftRadius: 4
|
||||||
color: Colors.surfaceContainerHigh
|
color: Colors.primaryContainer
|
||||||
child: RowLayout {
|
child: RowLayout {
|
||||||
id: barMarginLayout
|
id: barMarginLayout
|
||||||
spacing: 5
|
spacing: 5
|
||||||
@ -257,7 +259,7 @@ ClippingWrapperRectangle {
|
|||||||
bottomRightRadius: 12
|
bottomRightRadius: 12
|
||||||
topRightRadius: 4
|
topRightRadius: 4
|
||||||
topLeftRadius: 4
|
topLeftRadius: 4
|
||||||
color: Colors.surfaceContainerHigh
|
color: Colors.primaryContainer
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: translucencyLayout
|
id: translucencyLayout
|
||||||
|
|||||||
@ -14,7 +14,7 @@ FloatingWindow {
|
|||||||
onClosed: {
|
onClosed: {
|
||||||
Settings.config.settingsShown = false;
|
Settings.config.settingsShown = false;
|
||||||
}
|
}
|
||||||
color: Colors.surface
|
color: Colors.surfaceContainer
|
||||||
title: "qs-settings"
|
title: "qs-settings"
|
||||||
implicitWidth: 800
|
implicitWidth: 800
|
||||||
implicitHeight: 600
|
implicitHeight: 600
|
||||||
@ -50,7 +50,7 @@ FloatingWindow {
|
|||||||
Layout.preferredWidth: 200
|
Layout.preferredWidth: 200
|
||||||
Layout.rightMargin: 0
|
Layout.rightMargin: 0
|
||||||
margin: 20
|
margin: 20
|
||||||
color: Colors.surfaceContainerLow
|
color: Colors.surfaceContainer
|
||||||
radius: 12
|
radius: 12
|
||||||
ListView {
|
ListView {
|
||||||
id: pageView
|
id: pageView
|
||||||
@ -61,7 +61,7 @@ FloatingWindow {
|
|||||||
id: pageDelegate
|
id: pageDelegate
|
||||||
Rectangle {
|
Rectangle {
|
||||||
radius: 24
|
radius: 24
|
||||||
color: ListView.isCurrentItem ? Colors.surfaceContainerHigh : "transparent"
|
color: ListView.isCurrentItem ? Colors.primaryContainer : "transparent"
|
||||||
implicitHeight: 30
|
implicitHeight: 30
|
||||||
implicitWidth: pageWrapper.width - 50
|
implicitWidth: pageWrapper.width - 50
|
||||||
required property var modelData
|
required property var modelData
|
||||||
|
|||||||
@ -8,7 +8,9 @@ ClippingWrapperRectangle {
|
|||||||
id: root
|
id: root
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
clip: true
|
clip: true
|
||||||
color: Colors.surfaceContainerLow
|
color: Colors.surfaceContainerHigh
|
||||||
|
border.width: 1
|
||||||
|
border.color: Colors.primary
|
||||||
radius: 12
|
radius: 12
|
||||||
margin: 20
|
margin: 20
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|||||||
@ -23,7 +23,7 @@ FloatingWindow {
|
|||||||
}
|
}
|
||||||
Process {
|
Process {
|
||||||
id: wallustRunner
|
id: wallustRunner
|
||||||
property string cmd: "matugen image " + Settings.config.currentWall
|
property string cmd: "matugen image " + Settings.config.currentWall + " --source-color-index 0"
|
||||||
command: ["sh", "-c", cmd]
|
command: ["sh", "-c", cmd]
|
||||||
}
|
}
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
|
|||||||
@ -15,9 +15,7 @@ Button {
|
|||||||
}
|
}
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
id: contentBackground
|
id: contentBackground
|
||||||
border.color: control.down ? Colors.primaryFixed : Colors.primary
|
|
||||||
border.width: 1
|
|
||||||
radius: parent.implicitHeight / 2
|
radius: parent.implicitHeight / 2
|
||||||
color: Colors.surfaceContainerLow
|
color: Colors.surfaceContainerHigh
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,11 +3,19 @@ import qs
|
|||||||
import qs.settings
|
import qs.settings
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
id: root
|
||||||
color: Colors.onSurfaceColor
|
color: Colors.onSurfaceColor
|
||||||
font.family: "Material Symbols Rounded"
|
property real iconSize: 16
|
||||||
font.pixelSize: 14
|
property real fill: 1
|
||||||
font.variableAxes: ({
|
renderType: Text.NativeRendering
|
||||||
GRAD: 200,
|
font {
|
||||||
wght: 400
|
hintingPreference: Font.PreferNoHinting
|
||||||
})
|
family: "Material Symbols Outlined"
|
||||||
|
pixelSize: iconSize
|
||||||
|
weight: Font.Normal + (Font.DemiBold - Font.Normal) * fill
|
||||||
|
variableAxes: {
|
||||||
|
"FILL": fill,
|
||||||
|
"opsz": iconSize
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,6 @@ Slider {
|
|||||||
height: parent.height
|
height: parent.height
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
radius: 2
|
radius: 2
|
||||||
border.color: Colors.outline
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,6 +30,5 @@ Slider {
|
|||||||
implicitHeight: control.implicitHeight - 2
|
implicitHeight: control.implicitHeight - 2
|
||||||
radius: 13
|
radius: 13
|
||||||
color: control.pressed ? Colors.primary : Colors.surfaceContainerLowest
|
color: control.pressed ? Colors.primary : Colors.surfaceContainerLowest
|
||||||
border.color: control.pressed ? Colors.surfaceContainerLowest : Colors.primary
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,6 @@ Switch {
|
|||||||
implicitHeight: parent.implicitHeight
|
implicitHeight: parent.implicitHeight
|
||||||
radius: 26
|
radius: 26
|
||||||
color: Colors.surfaceContainerLow
|
color: Colors.surfaceContainerLow
|
||||||
border.color: control.checked ? Colors.primary : Colors.onSurfaceColor
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
implicitHeight: parent.implicitHeight - 6
|
implicitHeight: parent.implicitHeight - 6
|
||||||
|
|||||||
@ -3,12 +3,8 @@ import qs
|
|||||||
import qs.settings
|
import qs.settings
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
color: Colors.onSurfaceColor
|
color: Colors.onSurfaceColor
|
||||||
font.family: Settings.config.font
|
font.family: Settings.config.font
|
||||||
font.pixelSize: Settings.config.fontSize
|
font.pixelSize: Settings.config.fontSize
|
||||||
font.variableAxes: ({
|
font.weight: Settings.config.fontWeight
|
||||||
GRAD: 200,
|
|
||||||
wght: 400
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import Quickshell.Io
|
|||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
property alias config: settingsAdapter
|
property alias config: settingsAdapter
|
||||||
|
property alias currentWall: settingsAdapter.currentWall
|
||||||
onConfigChanged: settingsView.writeAdapter()
|
onConfigChanged: settingsView.writeAdapter()
|
||||||
FileView {
|
FileView {
|
||||||
id: settingsView
|
id: settingsView
|
||||||
@ -32,7 +33,6 @@ Singleton {
|
|||||||
property double translucency: 1
|
property double translucency: 1
|
||||||
property bool blackScreenCorners: true
|
property bool blackScreenCorners: true
|
||||||
property bool settingsShown: true
|
property bool settingsShown: true
|
||||||
property string schemeGenerator: "matugen"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user