Settings rework...

This commit is contained in:
Ly-sec 2025-08-05 17:41:08 +02:00
parent 74b233798d
commit fb68300746
63 changed files with 7139 additions and 1026 deletions

View file

@ -6,7 +6,7 @@ IpcHandler {
property var appLauncherPanel
property var lockScreen
property IdleInhibitor idleInhibitor
property var notificationPopup
property var notificationPopupVariants
target: "globalIPC"
@ -17,10 +17,18 @@ IpcHandler {
function toggleNotificationPopup(): void {
console.log("[IPC] NotificationPopup toggle() called")
notificationPopup.togglePopup();
if (notificationPopupVariants) {
for (let i = 0; i < notificationPopupVariants.count; i++) {
let popup = notificationPopupVariants.objectAt(i);
if (popup) {
popup.togglePopup();
}
}
}
}
// Toggle Applauncher visibility
function toggleLauncher(): void {
if (!appLauncherPanel) {
console.warn("AppLauncherIpcHandler: appLauncherPanel not set!");
@ -34,7 +42,7 @@ IpcHandler {
}
}
// Toggle LockScreen
function toggleLock(): void {
if (!lockScreen) {
console.warn("LockScreenIpcHandler: lockScreen not set!");

View file

@ -3,10 +3,10 @@ import Quickshell.Io
Process {
id: idleRoot
// Example: systemd-inhibit to prevent idle/sleep
// Uses systemd-inhibit to prevent idle/sleep
command: ["systemd-inhibit", "--what=idle:sleep", "--who=noctalia", "--why=User requested", "sleep", "infinity"]
// Keep process running in background
// Track background process state
property bool isRunning: running
onStarted: {
@ -17,7 +17,7 @@ Process {
console.log("[IdleInhibitor] Process finished:", exitCode)
}
// Control functions
function start() {
if (!running) {
console.log("[IdleInhibitor] Starting idle inhibitor...")

18
Helpers/Time.js Normal file
View file

@ -0,0 +1,18 @@
function formatVagueHumanReadableTime(totalSeconds) {
const hours = Math.floor(totalSeconds / 3600);
const minutes = Math.floor((totalSeconds - (hours * 3600)) / 60);
const seconds = totalSeconds - (hours * 3600) - (minutes * 60);
var str = "";
if (hours) {
str += hours.toString() + "h";
}
if (minutes) {
str += minutes.toString() + "m";
}
if (!hours && !minutes) {
str += seconds.toString() + "s";
}
return str;
}