quickshell: nuke kded6 when starting

This commit is contained in:
2025-10-14 01:28:38 +02:00
parent ba6c735850
commit fcf2dea615
15 changed files with 62 additions and 19 deletions

View File

@@ -224,7 +224,7 @@ def _change_quickshell(palette: dict[str, str], flavor: str):
apply_theme_funcs: dict[str, Callable[[dict[str, str], str], None]] = { apply_theme_funcs: dict[str, Callable[[dict[str, str], str], None]] = {
'kvantum': _change_kvantum, # 'kvantum': _change_kvantum,
# 'nwg-look': _change_nwglook, # 'nwg-look': _change_nwglook,
'eww': _change_eww, 'eww': _change_eww,
'hypr': _change_hypr, 'hypr': _change_hypr,

View File

@@ -164,7 +164,7 @@ environment {
// Themes // Themes
QT_QPA_PLATFORM "wayland" QT_QPA_PLATFORM "wayland"
QT_QPA_PLATFORMTHEME "kde" QT_QPA_PLATFORMTHEME "kde"
QT_STYLE_OVERRIDE "kvantum" QT_STYLE_OVERRIDE "Breeze"
// Nvidia // Nvidia
LIBVA_DRIVER_NAME "nvidia" LIBVA_DRIVER_NAME "nvidia"

View File

@@ -164,7 +164,7 @@ environment {
// Themes // Themes
QT_QPA_PLATFORM "wayland" QT_QPA_PLATFORM "wayland"
QT_QPA_PLATFORMTHEME "kde" QT_QPA_PLATFORMTHEME "kde"
QT_STYLE_OVERRIDE "kvantum" QT_STYLE_OVERRIDE "Breeze"
// Nvidia // Nvidia
LIBVA_DRIVER_NAME "nvidia" LIBVA_DRIVER_NAME "nvidia"

View File

@@ -2,7 +2,7 @@
"location": "Munich", "location": "Munich",
"notifications": { "notifications": {
"doNotDisturb": false, "doNotDisturb": false,
"lastSeenTs": 1760383655000 "lastSeenTs": 1760397059000
}, },
"primaryColor": "#89b4fa", "primaryColor": "#89b4fa",
"showLyricsBar": false "showLyricsBar": false

View File

@@ -9,13 +9,14 @@ MonitorItem {
readonly property bool isReady: (battery && battery.ready && battery.isLaptopBattery && battery.isPresent) readonly property bool isReady: (battery && battery.ready && battery.isLaptopBattery && battery.isPresent)
readonly property real percent: (isReady ? (battery.percentage * 100) : 0) readonly property real percent: (isReady ? (battery.percentage * 100) : 0)
readonly property bool charging: (isReady ? battery.state === UPowerDeviceState.Charging : false) readonly property bool charging: (isReady ? battery.state === UPowerDeviceState.Charging : false)
property int lowBatteryThreshold: 15 property int lowBatteryThreshold: 20
symbol: { symbol: {
return charging ? Icons.charging : percent >= 80 ? Icons.battery100 : percent >= 60 ? Icons.battery75 : percent >= 40 ? Icons.battery50 : percent >= 20 ? Icons.battery25 : Icons.battery00; 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 value: percent
critical: isReady && !charging && percent <= lowBatteryThreshold
maxValue: 100 maxValue: 100
textSuffix: "%" textSuffix: "%"
pointerCursor: false pointerCursor: false

View File

@@ -5,8 +5,9 @@ import qs.Modules.Bar.Misc
import qs.Services import qs.Services
MonitorItem { MonitorItem {
symbol: Icons.cpuTemp > 80 ? Icons.tempHigh : Icons.cpuTemp > 50 ? Icons.tempMedium : Icons.tempLow symbol: SystemStatService.cpuTemp > 80 ? Icons.tempHigh : SystemStatService.cpuTemp > 50 ? Icons.tempMedium : Icons.tempLow
fillColor: Icons.cpuTemp > 80 ? Colors.red : Colors.yellow fillColor: Colors.yellow
critical: SystemStatService.cpuTemp > 80
value: Math.round(SystemStatService.cpuTemp) value: Math.round(SystemStatService.cpuTemp)
maxValue: 120 maxValue: 120
textSuffix: "°C" textSuffix: "°C"

View File

@@ -7,6 +7,7 @@ import qs.Services
MonitorItem { MonitorItem {
symbol: Icons.cpu symbol: Icons.cpu
fillColor: Colors.teal fillColor: Colors.teal
critical: SystemStatService.cpuUsage > 90
value: Math.round(SystemStatService.cpuUsage) value: Math.round(SystemStatService.cpuUsage)
maxValue: 100 maxValue: 100
textSuffix: "%" textSuffix: "%"

View File

@@ -13,14 +13,15 @@ Rectangle {
border.width: Style.borderS border.width: Style.borderS
Connections { Connections {
target: SettingsService function onShowLyricsBarChanged() {
onShowLyricsBarChanged: {
visible = SettingsService.showLyricsBar; visible = SettingsService.showLyricsBar;
if (visible) if (visible)
LyricsService.startSyncing(); LyricsService.startSyncing();
else else
LyricsService.stopSyncing(); LyricsService.stopSyncing();
} }
target: SettingsService
} }
RowLayout { RowLayout {

View File

@@ -9,6 +9,7 @@ MonitorItem {
symbol: Icons.memory symbol: Icons.memory
fillColor: Colors.green fillColor: Colors.green
critical: SystemStatService.memPercent > 90
value: Math.round(SystemStatService.memPercent) value: Math.round(SystemStatService.memPercent)
maxValue: 100 maxValue: 100
textValue: showPercent ? SystemStatService.memPercent : SystemStatService.memGb textValue: showPercent ? SystemStatService.memPercent : SystemStatService.memGb

View File

@@ -1,10 +1,11 @@
import QtQuick import QtQuick
import Quickshell
import qs.Constants import qs.Constants
import qs.Modules.Bar.Misc import qs.Modules.Bar.Misc
import qs.Services import qs.Services
MonitorItem { 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 fillColor: Colors.lavender
value: Math.round(AudioService.volume * 100) value: Math.round(AudioService.volume * 100)
maxValue: 100 maxValue: 100
@@ -18,4 +19,7 @@ MonitorItem {
onClicked: { onClicked: {
AudioService.toggleMute(); AudioService.toggleMute();
} }
onRightClicked: {
Quickshell.execDetached(["sh", "-c", "pkill -x -n pavucontrol || pavucontrol"]);
}
} }

View File

@@ -16,7 +16,10 @@ Item {
property bool pointerCursor: true property bool pointerCursor: true
property alias hovered: mouseArea.containsMouse property alias hovered: mouseArea.containsMouse
property bool disableHover: false property bool disableHover: false
property bool critical: false
property color criticalColor: Colors.red
readonly property real ratio: value / maxValue readonly property real ratio: value / maxValue
property color realColor: critical ? criticalColor : fillColor
signal wheelUp() signal wheelUp()
signal wheelDown() signal wheelDown()
@@ -74,7 +77,7 @@ Item {
ctx.beginPath(); ctx.beginPath();
ctx.arc(centerX, centerY, radius, endAngle, startAngle, false); ctx.arc(centerX, centerY, radius, endAngle, startAngle, false);
ctx.lineWidth = 3; ctx.lineWidth = 3;
ctx.strokeStyle = root.fillColor; ctx.strokeStyle = root.realColor;
ctx.lineCap = "round"; ctx.lineCap = "round";
ctx.stroke(); ctx.stroke();
} }
@@ -84,7 +87,7 @@ Item {
progressCircle.requestPaint(); progressCircle.requestPaint();
} }
function onFillColorChanged() { function onRealColorChanged() {
progressCircle.requestPaint(); progressCircle.requestPaint();
} }
@@ -100,7 +103,7 @@ Item {
text: symbol text: symbol
font.family: Fonts.nerd font.family: Fonts.nerd
font.pointSize: Fonts.icon font.pointSize: Fonts.icon
color: fillColor color: root.realColor
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
} }
@@ -123,7 +126,7 @@ Item {
text: (textValue || Math.round(root.value)) + root.textSuffix text: (textValue || Math.round(root.value)) + root.textSuffix
font.pointSize: Fonts.small font.pointSize: Fonts.small
font.family: Fonts.primary font.family: Fonts.primary
color: root.fillColor color: root.realColor
opacity: root.hovered ? 1 : 0 opacity: root.hovered ? 1 : 0
} }
@@ -139,4 +142,12 @@ Item {
} }
Behavior on realColor {
ColorAnimation {
duration: Style.animationNormal
easing.type: Easing.InOutCubic
}
}
} }

View File

@@ -58,8 +58,8 @@ Singleton {
if (success) { if (success) {
try { try {
const response = JSON.parse(data); const response = JSON.parse(data);
if (response && response.country_code) { if (response && (response.country_code || response.country)) {
let newCountryCode = response.country_code; let newCountryCode = response.country_code || response.country;
Logger.log("IpService", "Fetched country code: " + newCountryCode); Logger.log("IpService", "Fetched country code: " + newCountryCode);
countryCode = newCountryCode; countryCode = newCountryCode;
} else { } else {

View File

@@ -467,7 +467,7 @@ Singleton {
Connections { Connections {
target: SettingsService.notifications target: SettingsService.notifications
onDoNotDisturbChanged: { function onDoNotDisturbChanged() {
const enabled = SettingsService.notifications.doNotDisturb const enabled = SettingsService.notifications.doNotDisturb
} }
} }

View File

@@ -0,0 +1,23 @@
import QtQuick
import Quickshell
import Quickshell.Io
import qs.Utils
pragma Singleton
Singleton {
property bool done: false
Process {
id: process
running: true
command: ["sh", "-c", "kquitapp6 kded6"]
onExited: (code, status) => {
if (code !== 0)
Logger.warn("NukeKded6", `Failed to kill kded6: ${code}`);
done = true;
}
}
}

View File

@@ -13,7 +13,7 @@ ShellRoot {
Loader { Loader {
id: loader id: loader
active: CacheService.loaded active: CacheService.loaded && NukeKded6.done
sourceComponent: Item { sourceComponent: Item {
Notification { Notification {