Settings rework...
This commit is contained in:
parent
74b233798d
commit
fb68300746
63 changed files with 7139 additions and 1026 deletions
|
|
@ -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!");
|
||||
|
|
|
|||
|
|
@ -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
18
Helpers/Time.js
Normal 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;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue