quickshell: nuke kded6 when starting
This commit is contained in:
@@ -9,13 +9,14 @@ MonitorItem {
|
||||
readonly property bool isReady: (battery && battery.ready && battery.isLaptopBattery && battery.isPresent)
|
||||
readonly property real percent: (isReady ? (battery.percentage * 100) : 0)
|
||||
readonly property bool charging: (isReady ? battery.state === UPowerDeviceState.Charging : false)
|
||||
property int lowBatteryThreshold: 15
|
||||
property int lowBatteryThreshold: 20
|
||||
|
||||
symbol: {
|
||||
return charging ? Icons.charging : percent >= 80 ? Icons.battery100 : percent >= 60 ? Icons.battery75 : percent >= 40 ? Icons.battery50 : percent >= 20 ? Icons.battery25 : Icons.battery00;
|
||||
}
|
||||
fillColor: !isReady || charging || percent > lowBatteryThreshold ? Colors.sapphire : Colors.red
|
||||
fillColor: Colors.sapphire
|
||||
value: percent
|
||||
critical: isReady && !charging && percent <= lowBatteryThreshold
|
||||
maxValue: 100
|
||||
textSuffix: "%"
|
||||
pointerCursor: false
|
||||
|
||||
@@ -5,8 +5,9 @@ import qs.Modules.Bar.Misc
|
||||
import qs.Services
|
||||
|
||||
MonitorItem {
|
||||
symbol: Icons.cpuTemp > 80 ? Icons.tempHigh : Icons.cpuTemp > 50 ? Icons.tempMedium : Icons.tempLow
|
||||
fillColor: Icons.cpuTemp > 80 ? Colors.red : Colors.yellow
|
||||
symbol: SystemStatService.cpuTemp > 80 ? Icons.tempHigh : SystemStatService.cpuTemp > 50 ? Icons.tempMedium : Icons.tempLow
|
||||
fillColor: Colors.yellow
|
||||
critical: SystemStatService.cpuTemp > 80
|
||||
value: Math.round(SystemStatService.cpuTemp)
|
||||
maxValue: 120
|
||||
textSuffix: "°C"
|
||||
|
||||
@@ -7,6 +7,7 @@ import qs.Services
|
||||
MonitorItem {
|
||||
symbol: Icons.cpu
|
||||
fillColor: Colors.teal
|
||||
critical: SystemStatService.cpuUsage > 90
|
||||
value: Math.round(SystemStatService.cpuUsage)
|
||||
maxValue: 100
|
||||
textSuffix: "%"
|
||||
|
||||
@@ -13,14 +13,15 @@ Rectangle {
|
||||
border.width: Style.borderS
|
||||
|
||||
Connections {
|
||||
target: SettingsService
|
||||
onShowLyricsBarChanged: {
|
||||
function onShowLyricsBarChanged() {
|
||||
visible = SettingsService.showLyricsBar;
|
||||
if (visible)
|
||||
LyricsService.startSyncing();
|
||||
else
|
||||
LyricsService.stopSyncing();
|
||||
}
|
||||
|
||||
target: SettingsService
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
||||
@@ -9,6 +9,7 @@ MonitorItem {
|
||||
|
||||
symbol: Icons.memory
|
||||
fillColor: Colors.green
|
||||
critical: SystemStatService.memPercent > 90
|
||||
value: Math.round(SystemStatService.memPercent)
|
||||
maxValue: 100
|
||||
textValue: showPercent ? SystemStatService.memPercent : SystemStatService.memGb
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.Constants
|
||||
import qs.Modules.Bar.Misc
|
||||
import qs.Services
|
||||
|
||||
MonitorItem {
|
||||
symbol: AudioService.muted ? Icons.volumeMuted : (AudioService.volume >= 0.66 ? Icons.volumeHigh : (AudioService.volume >= 0.33 ? Icons.volumeMedium : Icons.volumeLow))
|
||||
symbol: AudioService.muted ? Icons.volumeMuted : (AudioService.volume >= 0.5 ? Icons.volumeHigh : (AudioService.volume >= 0.2 ? Icons.volumeMedium : Icons.volumeLow))
|
||||
fillColor: Colors.lavender
|
||||
value: Math.round(AudioService.volume * 100)
|
||||
maxValue: 100
|
||||
@@ -18,4 +19,7 @@ MonitorItem {
|
||||
onClicked: {
|
||||
AudioService.toggleMute();
|
||||
}
|
||||
onRightClicked: {
|
||||
Quickshell.execDetached(["sh", "-c", "pkill -x -n pavucontrol || pavucontrol"]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,10 @@ Item {
|
||||
property bool pointerCursor: true
|
||||
property alias hovered: mouseArea.containsMouse
|
||||
property bool disableHover: false
|
||||
property bool critical: false
|
||||
property color criticalColor: Colors.red
|
||||
readonly property real ratio: value / maxValue
|
||||
property color realColor: critical ? criticalColor : fillColor
|
||||
|
||||
signal wheelUp()
|
||||
signal wheelDown()
|
||||
@@ -74,7 +77,7 @@ Item {
|
||||
ctx.beginPath();
|
||||
ctx.arc(centerX, centerY, radius, endAngle, startAngle, false);
|
||||
ctx.lineWidth = 3;
|
||||
ctx.strokeStyle = root.fillColor;
|
||||
ctx.strokeStyle = root.realColor;
|
||||
ctx.lineCap = "round";
|
||||
ctx.stroke();
|
||||
}
|
||||
@@ -84,7 +87,7 @@ Item {
|
||||
progressCircle.requestPaint();
|
||||
}
|
||||
|
||||
function onFillColorChanged() {
|
||||
function onRealColorChanged() {
|
||||
progressCircle.requestPaint();
|
||||
}
|
||||
|
||||
@@ -100,7 +103,7 @@ Item {
|
||||
text: symbol
|
||||
font.family: Fonts.nerd
|
||||
font.pointSize: Fonts.icon
|
||||
color: fillColor
|
||||
color: root.realColor
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
@@ -123,7 +126,7 @@ Item {
|
||||
text: (textValue || Math.round(root.value)) + root.textSuffix
|
||||
font.pointSize: Fonts.small
|
||||
font.family: Fonts.primary
|
||||
color: root.fillColor
|
||||
color: root.realColor
|
||||
opacity: root.hovered ? 1 : 0
|
||||
}
|
||||
|
||||
@@ -139,4 +142,12 @@ Item {
|
||||
|
||||
}
|
||||
|
||||
Behavior on realColor {
|
||||
ColorAnimation {
|
||||
duration: Style.animationNormal
|
||||
easing.type: Easing.InOutCubic
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user