mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge branch 'main' into auto-night-mode
This commit is contained in:
+2
-2
@@ -106,11 +106,11 @@ Singleton {
|
||||
printErrors: false
|
||||
watchChanges: true
|
||||
onFileChanged: {
|
||||
Logger.log("Color", "Reloading colors from disk")
|
||||
Logger.i("Color", "Reloading colors from disk")
|
||||
reload()
|
||||
}
|
||||
onAdapterUpdated: {
|
||||
Logger.log("Color", "Writing colors to disk")
|
||||
Logger.i("Color", "Writing colors to disk")
|
||||
writeAdapter()
|
||||
}
|
||||
|
||||
|
||||
+30
-46
@@ -7,8 +7,6 @@ import qs.Commons
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
property bool debug: false
|
||||
property string debugForceLanguage: ""
|
||||
|
||||
property bool isLoaded: false
|
||||
@@ -36,7 +34,7 @@ Singleton {
|
||||
var output = stdoutCollector.text || ""
|
||||
parseDirectoryListing(output)
|
||||
} else {
|
||||
Logger.error("I18n", `Failed to scan translation directory`)
|
||||
Logger.e("I18n", `Failed to scan translation directory`)
|
||||
// Fallback to default languages
|
||||
availableLanguages = ["en"]
|
||||
detectLanguage()
|
||||
@@ -53,21 +51,19 @@ Singleton {
|
||||
try {
|
||||
var data = JSON.parse(text())
|
||||
root.translations = data
|
||||
Logger.log("I18n", `Loaded translations for "${root.langCode}"`)
|
||||
if (debug) {
|
||||
Logger.log("I18n", `Available root keys: ${Object.keys(data).join(", ")}`)
|
||||
}
|
||||
Logger.i("I18n", `Loaded translations for "${root.langCode}"`)
|
||||
Logger.d("I18n", `Available root keys: ${Object.keys(data).join(", ")}`)
|
||||
|
||||
root.isLoaded = true
|
||||
root.translationsLoaded()
|
||||
} catch (e) {
|
||||
Logger.error("I18n", `Failed to parse translation file: ${e}`)
|
||||
Logger.e("I18n", `Failed to parse translation file: ${e}`)
|
||||
setLanguage("en")
|
||||
}
|
||||
}
|
||||
onLoadFailed: function (error) {
|
||||
setLanguage("en")
|
||||
Logger.error("I18n", `Failed to load translation file: ${error}`)
|
||||
Logger.e("I18n", `Failed to load translation file: ${error}`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,24 +76,24 @@ Singleton {
|
||||
try {
|
||||
var data = JSON.parse(text())
|
||||
root.fallbackTranslations = data
|
||||
Logger.log("I18n", `Loaded english fallback translations`)
|
||||
Logger.d("I18n", `Loaded english fallback translations`)
|
||||
} catch (e) {
|
||||
Logger.error("I18n", `Failed to parse fallback translation file: ${e}`)
|
||||
Logger.e("I18n", `Failed to parse fallback translation file: ${e}`)
|
||||
}
|
||||
}
|
||||
onLoadFailed: function (error) {
|
||||
Logger.error("I18n", `Failed to load fallback translation file: ${error}`)
|
||||
Logger.e("I18n", `Failed to load fallback translation file: ${error}`)
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
Logger.log("I18n", "Service started")
|
||||
Logger.i("I18n", "Service started")
|
||||
scanAvailableLanguages()
|
||||
}
|
||||
|
||||
// -------------------------------------------
|
||||
function scanAvailableLanguages() {
|
||||
Logger.log("I18n", "Scanning for available translation files...")
|
||||
Logger.d("I18n", "Scanning for available translation files...")
|
||||
directoryScanner.running = true
|
||||
}
|
||||
|
||||
@@ -107,7 +103,7 @@ Singleton {
|
||||
|
||||
try {
|
||||
if (!output || output.trim() === "") {
|
||||
Logger.warn("I18n", "Empty directory listing output")
|
||||
Logger.w("I18n", "Empty directory listing output")
|
||||
availableLanguages = ["en"]
|
||||
detectLanguage()
|
||||
return
|
||||
@@ -136,17 +132,17 @@ Singleton {
|
||||
}
|
||||
|
||||
if (languages.length === 0) {
|
||||
Logger.warn("I18n", "No translation files found, using fallback")
|
||||
Logger.w("I18n", "No translation files found, using fallback")
|
||||
languages = ["en"] // Fallback
|
||||
}
|
||||
|
||||
availableLanguages = languages
|
||||
Logger.log("I18n", `Found ${languages.length} available languages: ${languages.join(', ')}`)
|
||||
Logger.d("I18n", `Found ${languages.length} available languages: ${languages.join(', ')}`)
|
||||
|
||||
// Detect language after scanning
|
||||
detectLanguage()
|
||||
} catch (e) {
|
||||
Logger.error("I18n", `Failed to parse directory listing: ${e}`)
|
||||
Logger.e("I18n", `Failed to parse directory listing: ${e}`)
|
||||
// Fallback to default languages
|
||||
availableLanguages = ["en"]
|
||||
detectLanguage()
|
||||
@@ -155,20 +151,20 @@ Singleton {
|
||||
|
||||
// -------------------------------------------
|
||||
function detectLanguage() {
|
||||
Logger.log("I18n", `detectLanguage() called. Available languages: [${availableLanguages.join(', ')}]`)
|
||||
Logger.d("I18n", `detectLanguage() called. Available languages: [${availableLanguages.join(', ')}]`)
|
||||
|
||||
if (availableLanguages.length === 0) {
|
||||
Logger.warn("I18n", "No available languages found")
|
||||
Logger.w("I18n", "No available languages found")
|
||||
return
|
||||
}
|
||||
|
||||
if (debug && debugForceLanguage !== "") {
|
||||
Logger.log("I18n", `Debug mode: forcing language to "${debugForceLanguage}"`)
|
||||
if (Settings.isDebug && debugForceLanguage !== "") {
|
||||
Logger.d("I18n", `Debug mode: forcing language to "${debugForceLanguage}"`)
|
||||
if (availableLanguages.includes(debugForceLanguage)) {
|
||||
setLanguage(debugForceLanguage)
|
||||
return
|
||||
} else {
|
||||
Logger.warn("I18n", `Debug language "${debugForceLanguage}" not available in [${availableLanguages.join(', ')}]`)
|
||||
Logger.w("I18n", `Debug language "${debugForceLanguage}" not available in [${availableLanguages.join(', ')}]`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +174,7 @@ Singleton {
|
||||
|
||||
// Try full code match (such as zh CN, en US)
|
||||
if (availableLanguages.includes(fullUserLang)) {
|
||||
Logger.log("I18n", `Exact match found: "${fullUserLang}"`)
|
||||
Logger.d("I18n", `Exact match found: "${fullUserLang}"`)
|
||||
setLanguage(fullUserLang)
|
||||
return
|
||||
}
|
||||
@@ -186,12 +182,12 @@ Singleton {
|
||||
// If full code match fails, try short code matching (such as zh, en)
|
||||
const shortUserLang = fullUserLang.substring(0, 2)
|
||||
if (availableLanguages.includes(shortUserLang)) {
|
||||
Logger.log("I18n", `Short code match found: "${shortUserLang}" from "${fullUserLang}"`)
|
||||
Logger.d("I18n", `Short code match found: "${shortUserLang}" from "${fullUserLang}"`)
|
||||
setLanguage(shortUserLang)
|
||||
return
|
||||
}
|
||||
|
||||
Logger.log("I18n", `No match for system language: "${fullUserLang}"`)
|
||||
Logger.d("I18n", `No match for system language: "${fullUserLang}"`)
|
||||
}
|
||||
|
||||
// Fallback to first available language (preferably "en" if available)
|
||||
@@ -203,11 +199,11 @@ Singleton {
|
||||
function setLanguage(newLangCode) {
|
||||
if (newLangCode !== langCode && availableLanguages.includes(newLangCode)) {
|
||||
langCode = newLangCode
|
||||
Logger.log("I18n", `Language set to "${langCode}"`)
|
||||
Logger.i("I18n", `Language set to "${langCode}"`)
|
||||
languageChanged(langCode)
|
||||
loadTranslations()
|
||||
} else if (!availableLanguages.includes(newLangCode)) {
|
||||
Logger.warn("I18n", `Language "${newLangCode}" is not available`)
|
||||
Logger.w("I18n", `Language "${newLangCode}" is not available`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,7 +215,7 @@ Singleton {
|
||||
const filePath = `file://${Quickshell.shellDir}/Assets/Translations/${langCode}.json`
|
||||
fileView.path = filePath
|
||||
isLoaded = false
|
||||
Logger.log("I18n", `Loading translations: ${langCode}`)
|
||||
Logger.d("I18n", `Loading translations: ${langCode}`)
|
||||
|
||||
// Only load fallback translations if we are not using english and english is available
|
||||
if (langCode !== "en" && availableLanguages.includes("en")) {
|
||||
@@ -271,7 +267,7 @@ Singleton {
|
||||
// -------------------------------------------
|
||||
// Reload translations (useful for development)
|
||||
function reload() {
|
||||
Logger.log("I18n", "Reloading translations")
|
||||
Logger.d("I18n", "Reloading translations")
|
||||
loadTranslations()
|
||||
}
|
||||
|
||||
@@ -282,9 +278,7 @@ Singleton {
|
||||
interpolations = {}
|
||||
|
||||
if (!isLoaded) {
|
||||
if (debug) {
|
||||
Logger.warn("I18n", "Translations not loaded yet")
|
||||
}
|
||||
Logger.d("I18n", "Translations not loaded yet")
|
||||
return key
|
||||
}
|
||||
|
||||
@@ -294,20 +288,12 @@ Singleton {
|
||||
// Look-up translation in the active language
|
||||
var value = translations
|
||||
var notFound = false
|
||||
if (debug) {
|
||||
Logger.log("I18n", `Looking up key: "${key}"`)
|
||||
}
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
if (value && typeof value === "object" && keys[i] in value) {
|
||||
value = value[keys[i]]
|
||||
if (debug) {
|
||||
Logger.log("I18n", `Found key part "${keys[i]}"`)
|
||||
}
|
||||
} else {
|
||||
if (debug) {
|
||||
Logger.warn("I18n", `Translation key "${key}" not found at part "${keys[i]}"`)
|
||||
Logger.warn("I18n", `Available keys: ${Object.keys(value || {}).join(", ")}`)
|
||||
}
|
||||
Logger.d("I18n", `Translation key "${key}" not found at part "${keys[i]}"`)
|
||||
Logger.d("I18n", `Available keys: ${Object.keys(value || {}).join(", ")}`)
|
||||
notFound = true
|
||||
break
|
||||
}
|
||||
@@ -333,9 +319,7 @@ Singleton {
|
||||
}
|
||||
|
||||
if (typeof value !== "string") {
|
||||
if (debug) {
|
||||
Logger.warn("I18n", `Translation key "${key}" is not a string`)
|
||||
}
|
||||
Logger.d("I18n", `Translation key "${key}" is not a string`)
|
||||
return key
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -26,14 +26,14 @@ Singleton {
|
||||
signal fontReloaded
|
||||
|
||||
Component.onCompleted: {
|
||||
Logger.log("Icons", "Service started")
|
||||
Logger.i("Icons", "Service started")
|
||||
loadFontWithCacheBusting()
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Quickshell
|
||||
function onReloadCompleted() {
|
||||
Logger.log("Icons", "Quickshell reload completed - forcing font reload")
|
||||
Logger.d("Icons", "Quickshell reload completed - forcing font reload")
|
||||
reloadFont()
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@ Singleton {
|
||||
}
|
||||
|
||||
function loadFontWithCacheBusting() {
|
||||
Logger.log("Icons", "Loading font with cache busting")
|
||||
Logger.d("Icons", "Loading font with cache busting")
|
||||
|
||||
// Destroy old loader first
|
||||
if (currentFontLoader) {
|
||||
@@ -69,16 +69,16 @@ Singleton {
|
||||
// Connect to the new loader's status changes
|
||||
currentFontLoader.statusChanged.connect(function () {
|
||||
if (currentFontLoader.status === FontLoader.Ready) {
|
||||
Logger.log("Icons", "Font loaded successfully:", currentFontLoader.name, "(version " + fontVersion + ")")
|
||||
Logger.d("Icons", "Font loaded successfully:", currentFontLoader.name, "(version " + fontVersion + ")")
|
||||
fontReloaded()
|
||||
} else if (currentFontLoader.status === FontLoader.Error) {
|
||||
Logger.error("Icons", "Font failed to load (version " + fontVersion + ")")
|
||||
Logger.e("Icons", "Font failed to load (version " + fontVersion + ")")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function reloadFont() {
|
||||
Logger.log("Icons", "Forcing font reload...")
|
||||
Logger.d("Icons", "Forcing font reload...")
|
||||
fontVersion++
|
||||
loadFontWithCacheBusting()
|
||||
}
|
||||
|
||||
+18
-7
@@ -25,34 +25,45 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
function log(...args) {
|
||||
// Info log (always visible)
|
||||
function i(...args) {
|
||||
var msg = _formatMessage(...args)
|
||||
console.log(msg)
|
||||
}
|
||||
|
||||
function warn(...args) {
|
||||
// Debug log (only when Settings.isDebug is true)
|
||||
function d(...args) {
|
||||
if (Settings && Settings.isDebug) {
|
||||
var msg = _formatMessage(...args)
|
||||
console.log(msg)
|
||||
}
|
||||
}
|
||||
|
||||
// Warning log
|
||||
function w(...args) {
|
||||
var msg = _formatMessage(...args)
|
||||
console.warn(msg)
|
||||
}
|
||||
|
||||
function error(...args) {
|
||||
// Error log
|
||||
function e(...args) {
|
||||
var msg = _formatMessage(...args)
|
||||
console.error(msg)
|
||||
}
|
||||
|
||||
function callStack() {
|
||||
var stack = _getStackTrace()
|
||||
Logger.log("Debug", "--------------------------")
|
||||
Logger.log("Debug", "Current call stack")
|
||||
Logger.i("Debug", "--------------------------")
|
||||
Logger.i("Debug", "Current call stack")
|
||||
// Split the stack into lines and log each one
|
||||
var stackLines = stack.split('\n')
|
||||
for (var i = 0; i < stackLines.length; i++) {
|
||||
var line = stackLines[i].trim() // Remove leading/trailing whitespace
|
||||
if (line.length > 0) {
|
||||
// Only log non-empty lines
|
||||
Logger.log("Debug", `- ${line}`)
|
||||
Logger.i("Debug", `- ${line}`)
|
||||
}
|
||||
}
|
||||
Logger.log("Debug", "--------------------------")
|
||||
Logger.i("Debug", "--------------------------")
|
||||
}
|
||||
}
|
||||
|
||||
+13
-12
@@ -15,6 +15,7 @@ Singleton {
|
||||
property bool isLoaded: false
|
||||
property bool directoriesCreated: false
|
||||
property int settingsVersion: 16
|
||||
property bool isDebug: Quickshell.env("NOCTALIA_DEBUG") === "1"
|
||||
|
||||
// Define our app directories
|
||||
// Default config directory: ~/.config/noctalia
|
||||
@@ -93,7 +94,7 @@ Singleton {
|
||||
}
|
||||
onLoaded: function () {
|
||||
if (!isLoaded) {
|
||||
Logger.log("Settings", "Settings loaded")
|
||||
Logger.i("Settings", "Settings loaded")
|
||||
|
||||
upgradeSettingsData()
|
||||
validateMonitorConfigurations()
|
||||
@@ -437,7 +438,7 @@ Singleton {
|
||||
// Generate default settings at the root of the repo
|
||||
function generateDefaultSettings() {
|
||||
try {
|
||||
Logger.log("Settings", "Generating settings-default.json")
|
||||
Logger.d("Settings", "Generating settings-default.json")
|
||||
|
||||
// Prepare a clean JSON
|
||||
var plainAdapter = QtObj2JS.qtObjectToPlainObject(adapter)
|
||||
@@ -449,7 +450,7 @@ Singleton {
|
||||
var base64Data = Qt.btoa(jsonData)
|
||||
Quickshell.execDetached(["sh", "-c", `echo "${base64Data}" | base64 -d > "${defaultPath}"`])
|
||||
} catch (error) {
|
||||
Logger.error("Settings", "Failed to generate default settings file: " + error)
|
||||
Logger.e("Settings", "Failed to generate default settings file: " + error)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -461,8 +462,8 @@ Singleton {
|
||||
availableScreenNames.push(Quickshell.screens[i].name)
|
||||
}
|
||||
|
||||
Logger.log("Settings", "Available monitors: [" + availableScreenNames.join(", ") + "]")
|
||||
Logger.log("Settings", "Configured bar monitors: [" + adapter.bar.monitors.join(", ") + "]")
|
||||
Logger.d("Settings", "Available monitors: [" + availableScreenNames.join(", ") + "]")
|
||||
Logger.d("Settings", "Configured bar monitors: [" + adapter.bar.monitors.join(", ") + "]")
|
||||
|
||||
// Check bar monitors
|
||||
if (adapter.bar.monitors.length > 0) {
|
||||
@@ -474,15 +475,15 @@ Singleton {
|
||||
}
|
||||
}
|
||||
if (!hasValidBarMonitor) {
|
||||
Logger.warn("Settings", "No configured bar monitors found on system, clearing bar monitor list to show on all screens")
|
||||
Logger.w("Settings", "No configured bar monitors found on system, clearing bar monitor list to show on all screens")
|
||||
adapter.bar.monitors = []
|
||||
} else {
|
||||
|
||||
//Logger.log("Settings", "Found valid bar monitors, keeping configuration")
|
||||
//Logger.i("Settings", "Found valid bar monitors, keeping configuration")
|
||||
}
|
||||
} else {
|
||||
|
||||
//Logger.log("Settings", "Bar monitor list is empty, will show on all available screens")
|
||||
//Logger.i("Settings", "Bar monitor list is empty, will show on all available screens")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -492,7 +493,7 @@ Singleton {
|
||||
function upgradeSettingsData() {
|
||||
// Wait for BarWidgetRegistry to be ready
|
||||
if (!BarWidgetRegistry.widgets || Object.keys(BarWidgetRegistry.widgets).length === 0) {
|
||||
Logger.warn("Settings", "BarWidgetRegistry not ready, deferring upgrade")
|
||||
Logger.w("Settings", "BarWidgetRegistry not ready, deferring upgrade")
|
||||
Qt.callLater(upgradeSettingsData)
|
||||
return
|
||||
}
|
||||
@@ -533,7 +534,7 @@ Singleton {
|
||||
for (var i = widgets.length - 1; i >= 0; i--) {
|
||||
var widget = widgets[i]
|
||||
if (!BarWidgetRegistry.hasWidget(widget.id)) {
|
||||
Logger.warn(`Settings`, `Deleted invalid widget ${widget.id}`)
|
||||
Logger.w(`Settings`, `Deleted invalid widget ${widget.id}`)
|
||||
widgets.splice(i, 1)
|
||||
removedWidget = true
|
||||
}
|
||||
@@ -554,7 +555,7 @@ Singleton {
|
||||
}
|
||||
|
||||
if (upgradeWidget(widget)) {
|
||||
Logger.log("Settings", `Upgraded ${widget.id} widget:`, JSON.stringify(widget))
|
||||
Logger.d("Settings", `Upgraded ${widget.id} widget:`, JSON.stringify(widget))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -580,7 +581,7 @@ Singleton {
|
||||
adapter.bar.widgets["right"].push(({
|
||||
"id": "ControlCenter"
|
||||
}))
|
||||
Logger.warn("Settings", "Added a ControlCenter widget to the right section")
|
||||
Logger.w("Settings", "Added a ControlCenter widget to the right section")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ Variants {
|
||||
sourceSize: undefined
|
||||
onStatusChanged: {
|
||||
if (status === Image.Error) {
|
||||
Logger.warn("Current wallpaper failed to load:", source)
|
||||
Logger.w("Current wallpaper failed to load:", source)
|
||||
} else if (status === Image.Ready && !dimensionsCalculated) {
|
||||
dimensionsCalculated = true
|
||||
const optimalSize = calculateOptimalWallpaperSize(implicitWidth, implicitHeight)
|
||||
@@ -147,7 +147,7 @@ Variants {
|
||||
sourceSize: undefined
|
||||
onStatusChanged: {
|
||||
if (status === Image.Error) {
|
||||
Logger.warn("Next wallpaper failed to load:", source)
|
||||
Logger.w("Next wallpaper failed to load:", source)
|
||||
} else if (status === Image.Ready && !dimensionsCalculated) {
|
||||
dimensionsCalculated = true
|
||||
const optimalSize = calculateOptimalWallpaperSize(implicitWidth, implicitHeight)
|
||||
@@ -336,7 +336,7 @@ Variants {
|
||||
dim = Qt.size(h * imageAspectRatio, h)
|
||||
}
|
||||
|
||||
Logger.log("Background", `Wallpaper resized on ${modelData.name} ${screenWidth}x${screenHeight} @ ${compositorScale}x`, "src:", wpWidth, wpHeight, "dst:", dim.width, dim.height)
|
||||
Logger.d("Background", `Wallpaper resized on ${modelData.name} ${screenWidth}x${screenHeight} @ ${compositorScale}x`, "src:", wpWidth, wpHeight, "dst:", dim.width, dim.height)
|
||||
return dim
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ Variants {
|
||||
transitionType = "fade"
|
||||
}
|
||||
|
||||
//Logger.log("Background", "New wallpaper: ", futureWallpaper, "On:", modelData.name, "Transition:", transitionType)
|
||||
//Logger.i("Background", "New wallpaper: ", futureWallpaper, "On:", modelData.name, "Transition:", transitionType)
|
||||
switch (transitionType) {
|
||||
case "none":
|
||||
setWallpaperImmediate(futureWallpaper)
|
||||
|
||||
@@ -20,7 +20,7 @@ Variants {
|
||||
|
||||
Component.onCompleted: {
|
||||
if (modelData) {
|
||||
Logger.log("Overview", "Loading Overview component for Niri on", modelData.name)
|
||||
Logger.d("Overview", "Loading Overview component for Niri on", modelData.name)
|
||||
}
|
||||
setWallpaperInitial()
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ Item {
|
||||
item.onLoaded()
|
||||
}
|
||||
|
||||
//Logger.log("BarWidgetLoader", "Loaded", widgetId, "on screen", item.screen.name)
|
||||
//Logger.i("BarWidgetLoader", "Loaded", widgetId, "on screen", item.screen.name)
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
@@ -67,7 +67,7 @@ Item {
|
||||
// Error handling
|
||||
onWidgetIdChanged: {
|
||||
if (widgetId && !BarWidgetRegistry.hasWidget(widgetId)) {
|
||||
Logger.warn("BarWidgetLoader", "Widget not found in registry:", widgetId)
|
||||
Logger.w("BarWidgetLoader", "Widget not found in registry:", widgetId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,12 +30,12 @@ PopupWindow {
|
||||
|
||||
function showAt(item, x, y) {
|
||||
if (!item) {
|
||||
Logger.warn("TrayMenu", "anchorItem is undefined, won't show menu.")
|
||||
Logger.w("TrayMenu", "anchorItem is undefined, won't show menu.")
|
||||
return
|
||||
}
|
||||
|
||||
if (!opener.children || opener.children.values.length === 0) {
|
||||
//Logger.warn("TrayMenu", "Menu not ready, delaying show")
|
||||
//Logger.w("TrayMenu", "Menu not ready, delaying show")
|
||||
Qt.callLater(() => showAt(item, x, y))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ Item {
|
||||
return iconResult
|
||||
}
|
||||
} catch (iconError) {
|
||||
Logger.warn("ActiveWindow", "Error getting icon from CompositorService:", iconError)
|
||||
Logger.w("ActiveWindow", "Error getting icon from CompositorService:", iconError)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,14 +90,14 @@ Item {
|
||||
}
|
||||
}
|
||||
} catch (fallbackError) {
|
||||
Logger.warn("ActiveWindow", "Error getting icon from ToplevelManager:", fallbackError)
|
||||
Logger.w("ActiveWindow", "Error getting icon from ToplevelManager:", fallbackError)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ThemeIcons.iconFromName(fallbackIcon)
|
||||
} catch (e) {
|
||||
Logger.warn("ActiveWindow", "Error in getAppIcon:", e)
|
||||
Logger.w("ActiveWindow", "Error in getAppIcon:", e)
|
||||
return ThemeIcons.iconFromName(fallbackIcon)
|
||||
}
|
||||
}
|
||||
@@ -367,7 +367,7 @@ Item {
|
||||
windowIcon.source = Qt.binding(getAppIcon)
|
||||
windowIconVertical.source = Qt.binding(getAppIcon)
|
||||
} catch (e) {
|
||||
Logger.warn("ActiveWindow", "Error in onActiveWindowChanged:", e)
|
||||
Logger.w("ActiveWindow", "Error in onActiveWindowChanged:", e)
|
||||
}
|
||||
}
|
||||
function onWindowListChanged() {
|
||||
@@ -375,7 +375,7 @@ Item {
|
||||
windowIcon.source = Qt.binding(getAppIcon)
|
||||
windowIconVertical.source = Qt.binding(getAppIcon)
|
||||
} catch (e) {
|
||||
Logger.warn("ActiveWindow", "Error in onWindowListChanged:", e)
|
||||
Logger.w("ActiveWindow", "Error in onWindowListChanged:", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ Item {
|
||||
function onClicked() {
|
||||
if (leftClickExec) {
|
||||
Quickshell.execDetached(["sh", "-c", leftClickExec])
|
||||
Logger.log("CustomButton", `Executing command: ${leftClickExec}`)
|
||||
Logger.i("CustomButton", `Executing command: ${leftClickExec}`)
|
||||
} else if (!hasExec) {
|
||||
// No script was defined, open settings
|
||||
var settingsPanel = PanelService.getPanel("settingsPanel")
|
||||
@@ -124,14 +124,14 @@ Item {
|
||||
function onRightClicked() {
|
||||
if (rightClickExec) {
|
||||
Quickshell.execDetached(["sh", "-c", rightClickExec])
|
||||
Logger.log("CustomButton", `Executing command: ${rightClickExec}`)
|
||||
Logger.i("CustomButton", `Executing command: ${rightClickExec}`)
|
||||
}
|
||||
}
|
||||
|
||||
function onMiddleClicked() {
|
||||
if (middleClickExec) {
|
||||
Quickshell.execDetached(["sh", "-c", middleClickExec])
|
||||
Logger.log("CustomButton", `Executing command: ${middleClickExec}`)
|
||||
Logger.i("CustomButton", `Executing command: ${middleClickExec}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ Item {
|
||||
Connections {
|
||||
target: AudioService.source?.audio ? AudioService.source?.audio : null
|
||||
function onVolumeChanged() {
|
||||
// Logger.log("Bar:Microphone", "onInputVolumeChanged")
|
||||
// Logger.i("Bar:Microphone", "onInputVolumeChanged")
|
||||
if (!firstInputVolumeReceived) {
|
||||
// Ignore the first volume change
|
||||
firstInputVolumeReceived = true
|
||||
@@ -66,7 +66,7 @@ Item {
|
||||
Connections {
|
||||
target: AudioService.source?.audio ? AudioService.source?.audio : null
|
||||
function onMutedChanged() {
|
||||
// Logger.log("Bar:Microphone", "onInputMutedChanged")
|
||||
// Logger.i("Bar:Microphone", "onInputMutedChanged")
|
||||
if (!firstInputVolumeReceived) {
|
||||
// Ignore the first mute change
|
||||
firstInputVolumeReceived = true
|
||||
|
||||
@@ -168,13 +168,13 @@ Rectangle {
|
||||
try {
|
||||
CompositorService.focusWindow(taskbarItem.modelData)
|
||||
} catch (error) {
|
||||
Logger.error("Taskbar", "Failed to activate toplevel: " + error)
|
||||
Logger.e("Taskbar", "Failed to activate toplevel: " + error)
|
||||
}
|
||||
} else if (mouse.button === Qt.RightButton) {
|
||||
try {
|
||||
CompositorService.closeWindow(taskbarItem.modelData)
|
||||
} catch (error) {
|
||||
Logger.error("Taskbar", "Failed to close toplevel: " + error)
|
||||
Logger.e("Taskbar", "Failed to close toplevel: " + error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ Rectangle {
|
||||
if (!str || !rule) {
|
||||
return false
|
||||
}
|
||||
Logger.log("Tray", "wildCardMatch - Input str:", str, "rule:", rule)
|
||||
Logger.i("Tray", "wildCardMatch - Input str:", str, "rule:", rule)
|
||||
|
||||
// Escape all special regex characters in the rule
|
||||
let escapedRule = rule.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
||||
@@ -52,15 +52,15 @@ Rectangle {
|
||||
// Add ^ and $ to match the entire string
|
||||
pattern = '^' + pattern + '$'
|
||||
|
||||
Logger.log("Tray", "wildCardMatch - Generated pattern:", pattern)
|
||||
Logger.i("Tray", "wildCardMatch - Generated pattern:", pattern)
|
||||
|
||||
try {
|
||||
const regex = new RegExp(pattern, 'i')
|
||||
// 'i' for case-insensitive
|
||||
Logger.log("Tray", "wildCardMatch - Regex test result:", regex.test(str))
|
||||
Logger.i("Tray", "wildCardMatch - Regex test result:", regex.test(str))
|
||||
return regex.test(str)
|
||||
} catch (e) {
|
||||
Logger.warn("Tray", "Invalid regex pattern for wildcard match:", rule, e.message)
|
||||
Logger.w("Tray", "Invalid regex pattern for wildcard match:", rule, e.message)
|
||||
return false // If regex is invalid, it won't match
|
||||
}
|
||||
}
|
||||
@@ -252,7 +252,7 @@ Rectangle {
|
||||
trayMenu.item.menu = modelData.menu
|
||||
trayMenu.item.showAt(parent, menuX, menuY)
|
||||
} else {
|
||||
Logger.log("Tray", "No menu available for", modelData.id, "or trayMenu not set")
|
||||
Logger.i("Tray", "No menu available for", modelData.id, "or trayMenu not set")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ Item {
|
||||
Connections {
|
||||
target: AudioService.sink?.audio ? AudioService.sink?.audio : null
|
||||
function onVolumeChanged() {
|
||||
// Logger.log("Bar:Volume", "onVolumeChanged")
|
||||
// Logger.i("Bar:Volume", "onVolumeChanged")
|
||||
if (!firstVolumeReceived) {
|
||||
// Ignore the first volume change
|
||||
firstVolumeReceived = true
|
||||
|
||||
@@ -37,7 +37,7 @@ NIconButton {
|
||||
}
|
||||
return connected ? NetworkService.signalIcon(signalStrength) : "wifi-off"
|
||||
} catch (error) {
|
||||
Logger.error("Wi-Fi", "Error getting icon:", error)
|
||||
Logger.e("Wi-Fi", "Error getting icon:", error)
|
||||
return "signal_wifi_bad"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ Item {
|
||||
item.onLoaded()
|
||||
}
|
||||
|
||||
//Logger.log("ControlCenterWidgetLoader", "Loaded", widgetId, "on screen", item.screen.name)
|
||||
//Logger.i("ControlCenterWidgetLoader", "Loaded", widgetId, "on screen", item.screen.name)
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
@@ -58,7 +58,7 @@ Item {
|
||||
// Error handling
|
||||
onWidgetIdChanged: {
|
||||
if (widgetId && !ControlCenterWidgetRegistry.hasWidget(widgetId)) {
|
||||
Logger.warn("ControlCenterWidgetLoader", "Widget not found in registry:", widgetId)
|
||||
Logger.w("ControlCenterWidgetLoader", "Widget not found in registry:", widgetId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ NIconButtonHot {
|
||||
}
|
||||
return connected ? NetworkService.signalIcon(signalStrength) : "wifi-off"
|
||||
} catch (error) {
|
||||
Logger.error("Wi-Fi", "Error getting icon:", error)
|
||||
Logger.e("Wi-Fi", "Error getting icon:", error)
|
||||
return "signal_wifi_bad"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ PopupWindow {
|
||||
|
||||
function show(item, toplevelData) {
|
||||
if (!item) {
|
||||
Logger.warn("DockMenu", "anchorItem is undefined, won't show menu.")
|
||||
Logger.w("DockMenu", "anchorItem is undefined, won't show menu.")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ PopupWindow {
|
||||
Qt.callLater(root.onAppClosed)
|
||||
}
|
||||
} else {
|
||||
Logger.warn("DockMenu", "Cannot close app - invalid toplevel reference")
|
||||
Logger.w("DockMenu", "Cannot close app - invalid toplevel reference")
|
||||
}
|
||||
root.hide()
|
||||
root.requestClose()
|
||||
|
||||
@@ -127,27 +127,27 @@ NPanel {
|
||||
const appsPlugin = Qt.createComponent("Plugins/ApplicationsPlugin.qml").createObject(this)
|
||||
if (appsPlugin) {
|
||||
registerPlugin(appsPlugin)
|
||||
Logger.log("Launcher", "Registered: ApplicationsPlugin")
|
||||
Logger.d("Launcher", "Registered: ApplicationsPlugin")
|
||||
} else {
|
||||
Logger.error("Launcher", "Failed to load ApplicationsPlugin")
|
||||
Logger.e("Launcher", "Failed to load ApplicationsPlugin")
|
||||
}
|
||||
|
||||
// Load calculator plugin
|
||||
const calcPlugin = Qt.createComponent("Plugins/CalculatorPlugin.qml").createObject(this)
|
||||
if (calcPlugin) {
|
||||
registerPlugin(calcPlugin)
|
||||
Logger.log("Launcher", "Registered: CalculatorPlugin")
|
||||
Logger.d("Launcher", "Registered: CalculatorPlugin")
|
||||
} else {
|
||||
Logger.error("Launcher", "Failed to load CalculatorPlugin")
|
||||
Logger.e("Launcher", "Failed to load CalculatorPlugin")
|
||||
}
|
||||
|
||||
// Load clipboard history plugin
|
||||
const clipboardPlugin = Qt.createComponent("Plugins/ClipboardPlugin.qml").createObject(this)
|
||||
if (clipboardPlugin) {
|
||||
registerPlugin(clipboardPlugin)
|
||||
Logger.log("Launcher", "Registered: ClipboardPlugin")
|
||||
Logger.d("Launcher", "Registered: ClipboardPlugin")
|
||||
} else {
|
||||
Logger.error("Launcher", "Failed to load ClipboardPlugin")
|
||||
Logger.e("Launcher", "Failed to load ClipboardPlugin")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ Item {
|
||||
|
||||
function loadApplications() {
|
||||
if (typeof DesktopEntries === 'undefined') {
|
||||
Logger.warn("ApplicationsPlugin", "DesktopEntries service not available")
|
||||
Logger.w("ApplicationsPlugin", "DesktopEntries service not available")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ Item {
|
||||
app.executableName = getExecutableName(app)
|
||||
return app
|
||||
})
|
||||
Logger.log("ApplicationsPlugin", `Loaded ${entries.length} applications`)
|
||||
Logger.d("ApplicationsPlugin", `Loaded ${entries.length} applications`)
|
||||
}
|
||||
|
||||
function getExecutableName(app) {
|
||||
@@ -198,12 +198,12 @@ Item {
|
||||
// Ensures we are not preventing the future focusing of the app
|
||||
launcher.close()
|
||||
|
||||
Logger.log("ApplicationsPlugin", `Launching: ${app.name}`)
|
||||
Logger.d("ApplicationsPlugin", `Launching: ${app.name}`)
|
||||
// Record usage and persist asynchronously
|
||||
if (Settings.data.appLauncher.sortByMostUsed)
|
||||
recordUsage(app)
|
||||
if (Settings.data.appLauncher.useApp2Unit && app.id) {
|
||||
Logger.log("ApplicationsPlugin", `Using app2unit for: ${app.id}`)
|
||||
Logger.d("ApplicationsPlugin", `Using app2unit for: ${app.id}`)
|
||||
if (app.runInTerminal)
|
||||
Quickshell.execDetached(["app2unit", "--", app.id + ".desktop"])
|
||||
else
|
||||
@@ -212,7 +212,7 @@ Item {
|
||||
// Fallback logic when app2unit is not used
|
||||
if (app.runInTerminal) {
|
||||
// If app.execute() fails for terminal apps, we handle it manually.
|
||||
Logger.log("ApplicationsPlugin", "Executing terminal app manually: " + app.name)
|
||||
Logger.d("ApplicationsPlugin", "Executing terminal app manually: " + app.name)
|
||||
const terminal = Settings.data.appLauncher.terminalCommand.split(" ")
|
||||
const command = terminal.concat(app.command)
|
||||
Quickshell.execDetached(command)
|
||||
@@ -220,7 +220,7 @@ Item {
|
||||
// Default execution for GUI apps
|
||||
app.execute()
|
||||
} else {
|
||||
Logger.log("ApplicationsPlugin", `Could not launch: ${app.name}. No valid launch method.`)
|
||||
Logger.w("ApplicationsPlugin", `Could not launch: ${app.name}. No valid launch method.`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ Item {
|
||||
|
||||
// Initialize plugin
|
||||
function init() {
|
||||
Logger.log("ClipboardPlugin", "Initialized")
|
||||
Logger.i("ClipboardPlugin", "Initialized")
|
||||
// Pre-load clipboard data if service is active
|
||||
if (ClipboardService.active) {
|
||||
ClipboardService.list(100)
|
||||
@@ -189,7 +189,7 @@ Item {
|
||||
})
|
||||
}
|
||||
|
||||
//Logger.log("ClipboardPlugin", `Returning ${results.length} results for query: "${query}"`)
|
||||
//Logger.i("ClipboardPlugin", `Returning ${results.length} results for query: "${query}"`)
|
||||
return results
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ Scope {
|
||||
errorMessage = ""
|
||||
showFailure = false
|
||||
|
||||
Logger.log("LockContext", "Starting PAM authentication for user:", pam.user)
|
||||
Logger.i("LockContext", "Starting PAM authentication for user:", pam.user)
|
||||
pam.start()
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ Scope {
|
||||
user: Quickshell.env("USER")
|
||||
|
||||
onPamMessage: {
|
||||
Logger.log("LockContext", "PAM message:", message, "isError:", messageIsError, "responseRequired:", responseRequired)
|
||||
Logger.i("LockContext", "PAM message:", message, "isError:", messageIsError, "responseRequired:", responseRequired)
|
||||
|
||||
if (messageIsError) {
|
||||
errorMessage = message
|
||||
@@ -52,26 +52,26 @@ Scope {
|
||||
}
|
||||
|
||||
if (responseRequired) {
|
||||
Logger.log("LockContext", "Responding to PAM with password")
|
||||
Logger.i("LockContext", "Responding to PAM with password")
|
||||
respond(root.currentText)
|
||||
}
|
||||
}
|
||||
|
||||
onResponseRequiredChanged: {
|
||||
Logger.log("LockContext", "Response required changed:", responseRequired)
|
||||
Logger.i("LockContext", "Response required changed:", responseRequired)
|
||||
if (responseRequired && root.unlockInProgress) {
|
||||
Logger.log("LockContext", "Automatically responding to PAM")
|
||||
Logger.i("LockContext", "Automatically responding to PAM")
|
||||
respond(root.currentText)
|
||||
}
|
||||
}
|
||||
|
||||
onCompleted: result => {
|
||||
Logger.log("LockContext", "PAM completed with result:", result)
|
||||
Logger.i("LockContext", "PAM completed with result:", result)
|
||||
if (result === PamResult.Success) {
|
||||
Logger.log("LockContext", "Authentication successful")
|
||||
Logger.i("LockContext", "Authentication successful")
|
||||
root.unlocked()
|
||||
} else {
|
||||
Logger.log("LockContext", "Authentication failed")
|
||||
Logger.i("LockContext", "Authentication failed")
|
||||
errorMessage = "Authentication failed"
|
||||
showFailure = true
|
||||
root.failed()
|
||||
@@ -80,7 +80,7 @@ Scope {
|
||||
}
|
||||
|
||||
onError: {
|
||||
Logger.log("LockContext", "PAM error:", error, "message:", message)
|
||||
Logger.i("LockContext", "PAM error:", error, "message:", message)
|
||||
errorMessage = message || "Authentication error"
|
||||
showFailure = true
|
||||
root.unlockInProgress = false
|
||||
|
||||
@@ -344,14 +344,14 @@ ColumnLayout {
|
||||
newArray.splice(toIndex, 0, item)
|
||||
|
||||
Settings.data.bar.widgets[section] = newArray
|
||||
//Logger.log("BarTab", "Widget reordered. New array:", JSON.stringify(newArray))
|
||||
//Logger.i("BarTab", "Widget reordered. New array:", JSON.stringify(newArray))
|
||||
}
|
||||
}
|
||||
|
||||
function _updateWidgetSettingsInSection(section, index, settings) {
|
||||
// Update the widget settings in the Settings data
|
||||
Settings.data.bar.widgets[section][index] = settings
|
||||
//Logger.log("BarTab", `Updated widget settings for ${settings.id} in ${section} section`)
|
||||
//Logger.i("BarTab", `Updated widget settings for ${settings.id} in ${section} section`)
|
||||
}
|
||||
|
||||
function _moveWidgetBetweenSections(fromSection, index, toSection) {
|
||||
@@ -369,7 +369,7 @@ ColumnLayout {
|
||||
targetArray.push(widget)
|
||||
Settings.data.bar.widgets[toSection] = targetArray
|
||||
|
||||
//Logger.log("BarTab", `Moved widget ${widget.id} from ${fromSection} to ${toSection}`)
|
||||
//Logger.i("BarTab", `Moved widget ${widget.id} from ${fromSection} to ${toSection}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ ColumnLayout {
|
||||
var jsonData = JSON.parse(text())
|
||||
root.schemeLoaded(schemeName, jsonData)
|
||||
} catch (e) {
|
||||
Logger.warn("ColorSchemeTab", "Failed to parse JSON for scheme:", schemeName, e)
|
||||
Logger.w("ColorSchemeTab", "Failed to parse JSON for scheme:", schemeName, e)
|
||||
root.schemeLoaded(schemeName, null)
|
||||
}
|
||||
}
|
||||
@@ -401,7 +401,7 @@ ColumnLayout {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
Settings.data.colorSchemes.useWallpaperColors = false
|
||||
Logger.log("ColorSchemeTab", "Disabled wallpaper colors")
|
||||
Logger.i("ColorSchemeTab", "Disabled wallpaper colors")
|
||||
|
||||
Settings.data.colorSchemes.predefinedScheme = schemeItem.schemeName
|
||||
ColorSchemeService.applyScheme(Settings.data.colorSchemes.predefinedScheme)
|
||||
|
||||
@@ -180,7 +180,7 @@ ColumnLayout {
|
||||
root.handleDragEnd()
|
||||
}
|
||||
onItemToggled: function (index, enabled) {
|
||||
//Logger.log("ControlCenterTab", "Item", index, "toggled to", enabled)
|
||||
//Logger.i("ControlCenterTab", "Item", index, "toggled to", enabled)
|
||||
var newModel = cardsModel.slice()
|
||||
newModel[index] = Object.assign({}, newModel[index], {
|
||||
"enabled": enabled
|
||||
@@ -189,7 +189,7 @@ ColumnLayout {
|
||||
saveCards()
|
||||
}
|
||||
onItemsReordered: function (fromIndex, toIndex) {
|
||||
//Logger.log("ControlCenterTab", "Item moved from", fromIndex, "to", toIndex)
|
||||
//Logger.i("ControlCenterTab", "Item moved from", fromIndex, "to", toIndex)
|
||||
var newModel = cardsModel.slice()
|
||||
var item = newModel.splice(fromIndex, 1)[0]
|
||||
newModel.splice(toIndex, 0, item)
|
||||
@@ -324,7 +324,7 @@ ColumnLayout {
|
||||
targetArray.push(widget)
|
||||
Settings.data.controlCenter.shortcuts[toSection] = targetArray
|
||||
|
||||
//Logger.log("BarTab", `Moved widget ${widget.id} from ${fromSection} to ${toSection}`)
|
||||
//Logger.i("BarTab", `Moved widget ${widget.id} from ${fromSection} to ${toSection}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,13 +36,13 @@ ColumnLayout {
|
||||
var value = jsonData || {}
|
||||
schemeColorsCache[schemeName] = value
|
||||
cacheVersion++
|
||||
Logger.log("SetupAppearanceStep", `Loaded scheme ${schemeName}`)
|
||||
Logger.i("SetupAppearanceStep", `Loaded scheme ${schemeName}`)
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: ColorSchemeService
|
||||
function onSchemesChanged() {
|
||||
Logger.log("SetupAppearanceStep", `Color schemes changed: ${ColorSchemeService.schemes.length}`)
|
||||
Logger.i("SetupAppearanceStep", `Color schemes changed: ${ColorSchemeService.schemes.length}`)
|
||||
schemeColorsCache = {}
|
||||
cacheVersion++
|
||||
}
|
||||
|
||||
@@ -363,7 +363,7 @@ NPanel {
|
||||
}
|
||||
|
||||
function completeSetup() {
|
||||
Logger.log("SetupWizard", "Completing setup with selected options")
|
||||
Logger.i("SetupWizard", "Completing setup with selected options")
|
||||
|
||||
if (selectedWallpaperDirectory !== Settings.data.wallpaper.directory) {
|
||||
Settings.data.wallpaper.directory = selectedWallpaperDirectory
|
||||
@@ -380,7 +380,7 @@ NPanel {
|
||||
Settings.data.setupCompleted = true
|
||||
|
||||
Settings.saveImmediate()
|
||||
Logger.log("SetupWizard", "Setup completed successfully")
|
||||
Logger.i("SetupWizard", "Setup completed successfully")
|
||||
root.close()
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ NPanel {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
Logger.log("SetupWizard", "Setup wizard opened")
|
||||
Logger.i("SetupWizard", "Setup wizard opened")
|
||||
// Initialize selections from existing settings to avoid overwriting user config
|
||||
if (Settings && Settings.data) {
|
||||
selectedScaleRatio = Settings.data.general.scaleRatio
|
||||
|
||||
@@ -44,11 +44,11 @@ Item {
|
||||
function enqueueToast(toastData) {
|
||||
// Safe logging - fix the substring bug
|
||||
var descPreview = (toastData.description || "").substring(0, 100).replace(/\n/g, " ")
|
||||
Logger.log("ToastScreen", "Queuing", toastData.type, ":", toastData.message, descPreview)
|
||||
Logger.i("ToastScreen", "Queuing", toastData.type, ":", toastData.message, descPreview)
|
||||
|
||||
// Bounded queue to prevent unbounded memory growth
|
||||
if (messageQueue.length >= maxQueueSize) {
|
||||
Logger.log("ToastScreen", "Queue full, dropping oldest toast")
|
||||
Logger.i("ToastScreen", "Queue full, dropping oldest toast")
|
||||
messageQueue.shift()
|
||||
}
|
||||
|
||||
|
||||
@@ -81,14 +81,14 @@ Singleton {
|
||||
Connections {
|
||||
target: Settings.data.colorSchemes
|
||||
function onDarkModeChanged() {
|
||||
Logger.log("AppThemeService", "Detected dark mode change")
|
||||
Logger.i("AppThemeService", "Detected dark mode change")
|
||||
AppThemeService.generate()
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
function init() {
|
||||
Logger.log("AppThemeService", "Service started")
|
||||
Logger.i("AppThemeService", "Service started")
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
@@ -106,10 +106,10 @@ Singleton {
|
||||
// --------------------------------------------------------------------------------
|
||||
function generateFromWallpaper() {
|
||||
|
||||
// Logger.log("AppThemeService", "Generating from wallpaper on screen:", Screen.name)
|
||||
// Logger.i("AppThemeService", "Generating from wallpaper on screen:", Screen.name)
|
||||
const wp = WallpaperService.getWallpaper(Screen.name).replace(/'/g, "'\\''")
|
||||
if (!wp) {
|
||||
Logger.error("AppThemeService", "No wallpaper found")
|
||||
Logger.e("AppThemeService", "No wallpaper found")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ Singleton {
|
||||
// Instead, we use 'sed' to apply a custom palette to the existing matugen templates.
|
||||
// --------------------------------------------------------------------------------
|
||||
function generateFromPredefinedScheme(schemeData) {
|
||||
Logger.log("AppThemeService", "Generating templates from predefined color scheme")
|
||||
Logger.i("AppThemeService", "Generating templates from predefined color scheme")
|
||||
|
||||
handleTerminalThemes()
|
||||
|
||||
@@ -349,7 +349,7 @@ Singleton {
|
||||
stderr: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (this.text) {
|
||||
Logger.warn("AppThemeService", "GenerateProcess stderr:", this.text)
|
||||
Logger.w("AppThemeService", "GenerateProcess stderr:", this.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -361,7 +361,7 @@ Singleton {
|
||||
stderr: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (this.text) {
|
||||
Logger.warn("AppThemeService", "CopyProcess stderr:", this.text)
|
||||
Logger.w("AppThemeService", "CopyProcess stderr:", this.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ Singleton {
|
||||
|
||||
function onMutedChanged() {
|
||||
root._muted = (sink?.audio.muted ?? true)
|
||||
Logger.log("AudioService", "OnMuteChanged:", root._muted)
|
||||
Logger.i("AudioService", "OnMuteChanged:", root._muted)
|
||||
ToastService.showNotice(I18n.tr("settings.audio.devices.output-device.label"), root._muted ? I18n.tr("toast.audio.muted") : I18n.tr("toast.audio.unmuted"))
|
||||
}
|
||||
}
|
||||
@@ -79,7 +79,7 @@ Singleton {
|
||||
|
||||
function onMutedChanged() {
|
||||
root._inputMuted = (source?.audio.muted ?? true)
|
||||
Logger.log("AudioService", "OnInputMuteChanged:", root._inputMuted)
|
||||
Logger.i("AudioService", "OnInputMuteChanged:", root._inputMuted)
|
||||
ToastService.showNotice(I18n.tr("settings.audio.devices.input-device.label"), root._inputMuted ? I18n.tr("toast.audio.muted") : I18n.tr("toast.audio.unmuted"))
|
||||
}
|
||||
}
|
||||
@@ -97,9 +97,9 @@ Singleton {
|
||||
// Clamp it accordingly
|
||||
sink.audio.muted = false
|
||||
sink.audio.volume = Math.max(0, Math.min(Settings.data.audio.volumeOverdrive ? 1.5 : 1.0, newVolume))
|
||||
//Logger.log("AudioService", "SetVolume", sink.audio.volume);
|
||||
//Logger.i("AudioService", "SetVolume", sink.audio.volume);
|
||||
} else {
|
||||
Logger.warn("AudioService", "No sink available")
|
||||
Logger.w("AudioService", "No sink available")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ Singleton {
|
||||
if (sink?.ready && sink?.audio) {
|
||||
sink.audio.muted = muted
|
||||
} else {
|
||||
Logger.warn("AudioService", "No sink available")
|
||||
Logger.w("AudioService", "No sink available")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ Singleton {
|
||||
source.audio.muted = false
|
||||
source.audio.volume = Math.max(0, Math.min(Settings.data.audio.volumeOverdrive ? 1.5 : 1.0, newVolume))
|
||||
} else {
|
||||
Logger.warn("AudioService", "No source available")
|
||||
Logger.w("AudioService", "No source available")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ Singleton {
|
||||
if (source?.ready && source?.audio) {
|
||||
source.audio.muted = muted
|
||||
} else {
|
||||
Logger.warn("AudioService", "No source available")
|
||||
Logger.w("AudioService", "No source available")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,14 +38,14 @@ Singleton {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
Logger.log("BarService", "Service started")
|
||||
Logger.d("BarService", "Service started")
|
||||
}
|
||||
|
||||
// Function for the Bar to call when it's ready
|
||||
function registerBar(screenName) {
|
||||
if (!readyBars[screenName]) {
|
||||
readyBars[screenName] = true
|
||||
Logger.log("BarService", "Bar is ready on screen:", screenName)
|
||||
Logger.d("BarService", "Bar is ready on screen:", screenName)
|
||||
barReadyChanged(screenName)
|
||||
}
|
||||
}
|
||||
@@ -69,7 +69,7 @@ Singleton {
|
||||
|
||||
timerCheckVisualizer.restart()
|
||||
|
||||
Logger.log("BarService", "Registered widget:", key)
|
||||
Logger.d("BarService", "Registered widget:", key)
|
||||
root.activeWidgetsChanged()
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ Singleton {
|
||||
function unregisterWidget(screenName, section, widgetId, index) {
|
||||
const key = [screenName, section, widgetId, index].join("|")
|
||||
delete widgetInstances[key]
|
||||
Logger.log("BarService", "Unregistered widget:", key)
|
||||
Logger.d("BarService", "Unregistered widget:", key)
|
||||
root.activeWidgetsChanged()
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ Singleton {
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.error(e)
|
||||
Logger.e(e)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ Singleton {
|
||||
}
|
||||
|
||||
function init() {
|
||||
Logger.log("BarWidgetRegistry", "Service started")
|
||||
Logger.i("BarWidgetRegistry", "Service started")
|
||||
}
|
||||
|
||||
// ------------------------------
|
||||
|
||||
+15
-15
@@ -69,7 +69,7 @@ Singleton {
|
||||
|
||||
function setChargingMode(newMode) {
|
||||
if (newMode !== BatteryService.ChargingMode.Full && newMode !== BatteryService.ChargingMode.Balanced && newMode !== BatteryService.ChargingMode.Lifespan) {
|
||||
Logger.warn("BatteryService", `Invalid charging mode set ${newMode}`)
|
||||
Logger.w("BatteryService", `Invalid charging mode set ${newMode}`)
|
||||
return
|
||||
}
|
||||
BatteryService.chargingMode = newMode
|
||||
@@ -112,7 +112,7 @@ Singleton {
|
||||
running: false
|
||||
onExited: (exitCode, exitStatus) => {
|
||||
if (exitCode === 0) {
|
||||
Logger.log("BatteryService", "Battery threshold set successfully")
|
||||
Logger.i("BatteryService", "Battery threshold set successfully")
|
||||
if (BatteryService.initialSetter) {
|
||||
BatteryService.initialSetter = false
|
||||
return
|
||||
@@ -127,20 +127,20 @@ Singleton {
|
||||
BatteryService.runInstaller()
|
||||
} else {
|
||||
ToastService.showError(I18n.tr("toast.battery-manager.title"), I18n.tr("toast.battery-manager.set-failed"))
|
||||
Logger.error("BatteryService", `Setter process failed with exit code: ${exitCode}`)
|
||||
Logger.e("BatteryService", `Setter process failed with exit code: ${exitCode}`)
|
||||
}
|
||||
}
|
||||
stderr: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (this.text) {
|
||||
Logger.warn("BatteryService", "SetterProcess stderr:", this.text)
|
||||
Logger.w("BatteryService", "SetterProcess stderr:", this.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (this.text) {
|
||||
Logger.log("BatteryService", "SetterProcess stdout:", this.text)
|
||||
Logger.i("BatteryService", "SetterProcess stdout:", this.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -170,14 +170,14 @@ Singleton {
|
||||
stderr: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (this.text) {
|
||||
Logger.warn("BatteryService", "InstallerProcess stderr:", this.text)
|
||||
Logger.w("BatteryService", "InstallerProcess stderr:", this.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (this.text) {
|
||||
Logger.log("BatteryService", "InstallerProcess stdout:", this.text)
|
||||
Logger.i("BatteryService", "InstallerProcess stdout:", this.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -190,27 +190,27 @@ Singleton {
|
||||
running: false
|
||||
onExited: (exitCode, exitStatus) => {
|
||||
if (exitCode === 0) {
|
||||
Logger.log("BatteryService", "Battery Manager uninstalled successfully")
|
||||
Logger.i("BatteryService", "Battery Manager uninstalled successfully")
|
||||
ToastService.showNotice(I18n.tr("toast.battery-manager.title"), I18n.tr("toast.battery-manager.uninstall-success"))
|
||||
Settings.data.battery.chargingMode = BatteryService.chargingMode
|
||||
BatteryService.chargingMode = BatteryService.ChargingMode.Disabled
|
||||
cleanupProcess.running = true
|
||||
} else {
|
||||
ToastService.showError(I18n.tr("toast.battery-manager.title"), I18n.tr("toast.battery-manager.uninstall-failed"))
|
||||
Logger.error("BatteryService", `Uninstaller process failed with exit code: ${exitCode}`)
|
||||
Logger.e("BatteryService", `Uninstaller process failed with exit code: ${exitCode}`)
|
||||
}
|
||||
}
|
||||
stderr: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (this.text) {
|
||||
Logger.warn("BatteryService", "UninstallerProcess stderr:", this.text)
|
||||
Logger.w("BatteryService", "UninstallerProcess stderr:", this.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (this.text) {
|
||||
Logger.log("BatteryService", "UninstallerProcess stdout:", this.text)
|
||||
Logger.i("BatteryService", "UninstallerProcess stdout:", this.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -224,22 +224,22 @@ Singleton {
|
||||
running: false
|
||||
onExited: (exitCode, exitStatus) => {
|
||||
if (exitCode === 0) {
|
||||
Logger.log("BatteryService", "Battery Manager uninstalled successfully")
|
||||
Logger.i("BatteryService", "Battery Manager uninstalled successfully")
|
||||
} else {
|
||||
Logger.error("BatteryService", `Cleanup process failed with exit code: ${exitCode}`)
|
||||
Logger.e("BatteryService", `Cleanup process failed with exit code: ${exitCode}`)
|
||||
}
|
||||
}
|
||||
stderr: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (this.text) {
|
||||
Logger.warn("BatteryService", "CleanupProcess stderr:", this.text)
|
||||
Logger.w("BatteryService", "CleanupProcess stderr:", this.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (this.text) {
|
||||
Logger.log("BatteryService", "CleanupProcess stdout:", this.text)
|
||||
Logger.i("BatteryService", "CleanupProcess stdout:", this.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ Singleton {
|
||||
}
|
||||
|
||||
function init() {
|
||||
Logger.log("Bluetooth", "Service initialized")
|
||||
Logger.i("Bluetooth", "Service initialized")
|
||||
}
|
||||
|
||||
Timer {
|
||||
@@ -46,11 +46,11 @@ Singleton {
|
||||
target: adapter
|
||||
function onEnabledChanged() {
|
||||
if (!adapter) {
|
||||
Logger.warn("Bluetooth", "onEnabledChanged", "No adapter available")
|
||||
Logger.w("Bluetooth", "onEnabledChanged", "No adapter available")
|
||||
return
|
||||
}
|
||||
|
||||
Logger.log("Bluetooth", "onEnableChanged", adapter.enabled)
|
||||
Logger.d("Bluetooth", "onEnableChanged", adapter.enabled)
|
||||
if (adapter.enabled) {
|
||||
ToastService.showNotice(I18n.tr("bluetooth.panel.title"), I18n.tr("toast.bluetooth.enabled"))
|
||||
discoveryTimer.running = true
|
||||
@@ -225,11 +225,11 @@ Singleton {
|
||||
|
||||
function setBluetoothEnabled(state) {
|
||||
if (!adapter) {
|
||||
Logger.warn("Bluetooth", "No adapter available")
|
||||
Logger.w("Bluetooth", "No adapter available")
|
||||
return
|
||||
}
|
||||
|
||||
Logger.log("Bluetooth", "SetBluetoothEnabled", state)
|
||||
Logger.i("Bluetooth", "SetBluetoothEnabled", state)
|
||||
adapter.enabled = state
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ Singleton {
|
||||
reloadableId: "brightness"
|
||||
|
||||
Component.onCompleted: {
|
||||
Logger.log("Brightness", "Service started")
|
||||
Logger.i("Brightness", "Service started")
|
||||
}
|
||||
|
||||
onMonitorsChanged: {
|
||||
@@ -85,7 +85,7 @@ Singleton {
|
||||
var ddcModel = ddcModelMatch ? ddcModelMatch.length > 0 : false
|
||||
var model = modelMatch ? modelMatch[1] : "Unknown"
|
||||
var bus = busMatch ? busMatch[1] : "Unknown"
|
||||
Logger.log("Brigthness", "Detected DDC Monitor:", model, "on bus", bus, "is DDC:", !ddcModel)
|
||||
Logger.i("Brigthness", "Detected DDC Monitor:", model, "on bus", bus, "is DDC:", !ddcModel)
|
||||
return {
|
||||
"model": model,
|
||||
"busNum": bus,
|
||||
@@ -141,7 +141,7 @@ Singleton {
|
||||
monitor.brightness = newBrightness
|
||||
monitor.brightnessUpdated(monitor.brightness)
|
||||
root.monitorBrightnessChanged(monitor, monitor.brightness)
|
||||
//Logger.log("Brightness", "Refreshed brightness from system:", monitor.modelData.name, monitor.brightness)
|
||||
//Logger.i("Brightness", "Refreshed brightness from system:", monitor.modelData.name, monitor.brightness)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -190,12 +190,12 @@ Singleton {
|
||||
return
|
||||
}
|
||||
|
||||
//Logger.log("Brightness", "Raw brightness data for", monitor.modelData.name + ":", dataText)
|
||||
//Logger.i("Brightness", "Raw brightness data for", monitor.modelData.name + ":", dataText)
|
||||
if (monitor.isAppleDisplay) {
|
||||
var val = parseInt(dataText)
|
||||
if (!isNaN(val)) {
|
||||
monitor.brightness = val / 101
|
||||
Logger.log("Brightness", "Apple display brightness:", monitor.brightness)
|
||||
Logger.d("Brightness", "Apple display brightness:", monitor.brightness)
|
||||
}
|
||||
} else if (monitor.isDdc) {
|
||||
var parts = dataText.split(" ")
|
||||
@@ -204,7 +204,7 @@ Singleton {
|
||||
var max = parseInt(parts[4])
|
||||
if (!isNaN(current) && !isNaN(max) && max > 0) {
|
||||
monitor.brightness = current / max
|
||||
Logger.log("Brightness", "DDC brightness:", current + "/" + max + " =", monitor.brightness)
|
||||
Logger.d("Brightness", "DDC brightness:", current + "/" + max + " =", monitor.brightness)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -220,8 +220,8 @@ Singleton {
|
||||
if (!isNaN(current) && !isNaN(max) && max > 0) {
|
||||
monitor.maxBrightness = max
|
||||
monitor.brightness = current / max
|
||||
Logger.log("Brightness", "Internal brightness:", current + "/" + max + " =", monitor.brightness)
|
||||
Logger.log("Brightness", "Using backlight device:", monitor.backlightDevice)
|
||||
Logger.d("Brightness", "Internal brightness:", current + "/" + max + " =", monitor.brightness)
|
||||
Logger.d("Brightness", "Using backlight device:", monitor.backlightDevice)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ Singleton {
|
||||
running: root.shouldRun
|
||||
command: ["cava", "-p", "/dev/stdin"]
|
||||
onRunningChanged: {
|
||||
Logger.log("Cava", "Process running:", running)
|
||||
Logger.d("Cava", "Process running:", running)
|
||||
}
|
||||
onExited: {
|
||||
stdinEnabled = true
|
||||
|
||||
@@ -18,7 +18,7 @@ Singleton {
|
||||
Connections {
|
||||
target: Settings.data.colorSchemes
|
||||
function onDarkModeChanged() {
|
||||
Logger.log("ColorScheme", "Detected dark mode change")
|
||||
Logger.i("ColorScheme", "Detected dark mode change")
|
||||
if (!Settings.data.colorSchemes.useWallpaperColors && Settings.data.colorSchemes.predefinedScheme) {
|
||||
// Re-apply current scheme to pick the right variant
|
||||
applyScheme(Settings.data.colorSchemes.predefinedScheme)
|
||||
@@ -35,12 +35,12 @@ Singleton {
|
||||
function init() {
|
||||
// does nothing but ensure the singleton is created
|
||||
// do not remove
|
||||
Logger.log("ColorScheme", "Service started")
|
||||
Logger.i("ColorScheme", "Service started")
|
||||
loadColorSchemes()
|
||||
}
|
||||
|
||||
function loadColorSchemes() {
|
||||
Logger.log("ColorScheme", "Load colorScheme")
|
||||
Logger.d("ColorScheme", "Load colorScheme")
|
||||
scanning = true
|
||||
schemes = []
|
||||
// Use find command to locate all scheme.json files
|
||||
@@ -108,7 +108,7 @@ Singleton {
|
||||
})
|
||||
schemes = files
|
||||
scanning = false
|
||||
Logger.log("ColorScheme", "Listed", schemes.length, "schemes")
|
||||
Logger.d("ColorScheme", "Listed", schemes.length, "schemes")
|
||||
// Normalize stored scheme to basename and re-apply if necessary
|
||||
var stored = Settings.data.colorSchemes.predefinedScheme
|
||||
if (stored) {
|
||||
@@ -121,7 +121,7 @@ Singleton {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Logger.error("ColorScheme", "Failed to find color scheme files")
|
||||
Logger.e("ColorScheme", "Failed to find color scheme files")
|
||||
schemes = []
|
||||
scanning = false
|
||||
}
|
||||
@@ -147,14 +147,14 @@ Singleton {
|
||||
}
|
||||
}
|
||||
writeColorsToDisk(variant)
|
||||
Logger.log("ColorScheme", "Applying color scheme:", getBasename(path))
|
||||
Logger.i("ColorScheme", "Applying color scheme:", getBasename(path))
|
||||
|
||||
// Generate Matugen templates if any are enabled and setting allows it
|
||||
if (Settings.data.colorSchemes.generateTemplatesForPredefined && hasEnabledTemplates()) {
|
||||
AppThemeService.generateFromPredefinedScheme(data)
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.error("ColorScheme", "Failed to parse scheme JSON:", path, e)
|
||||
Logger.e("ColorScheme", "Failed to parse scheme JSON:", path, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,7 +171,7 @@ Singleton {
|
||||
path: colorsJsonFilePath
|
||||
onSaved: {
|
||||
|
||||
// Logger.log("ColorScheme", "Colors saved")
|
||||
// Logger.i("ColorScheme", "Colors saved")
|
||||
}
|
||||
JsonAdapter {
|
||||
id: out
|
||||
|
||||
@@ -100,13 +100,13 @@ Singleton {
|
||||
// Load cached display scales
|
||||
displayScales = displayCacheAdapter.displays || {}
|
||||
displayScalesLoaded = true
|
||||
// Logger.log("CompositorService", "Loaded display scales from cache:", JSON.stringify(displayScales))
|
||||
// Logger.i("CompositorService", "Loaded display scales from cache:", JSON.stringify(displayScales))
|
||||
}
|
||||
|
||||
onLoadFailed: {
|
||||
// Cache doesn't exist yet, will be created on first update
|
||||
displayScalesLoaded = true
|
||||
// Logger.log("CompositorService", "No display cache found, will create on first update")
|
||||
// Logger.i("CompositorService", "No display cache found, will create on first update")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ Singleton {
|
||||
// Update display scales from backend
|
||||
function updateDisplayScales() {
|
||||
if (!backend || !backend.queryDisplayScales) {
|
||||
Logger.warn("CompositorService", "Backend does not support display scale queries")
|
||||
Logger.w("CompositorService", "Backend does not support display scale queries")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ Singleton {
|
||||
displayScales = scales
|
||||
saveDisplayScalesToCache()
|
||||
displayScalesChanged()
|
||||
Logger.log("CompositorService", "Display scales updated")
|
||||
Logger.i("CompositorService", "Display scales updated")
|
||||
}
|
||||
|
||||
// Save display scales to cache
|
||||
@@ -261,7 +261,7 @@ Singleton {
|
||||
if (backend && backend.switchToWorkspace) {
|
||||
backend.switchToWorkspace(workspace)
|
||||
} else {
|
||||
Logger.warn("Compositor", "No backend available for workspace switching")
|
||||
Logger.w("Compositor", "No backend available for workspace switching")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ Singleton {
|
||||
if (backend && backend.focusWindow) {
|
||||
backend.focusWindow(window)
|
||||
} else {
|
||||
Logger.warn("Compositor", "No backend available for window focus")
|
||||
Logger.w("Compositor", "No backend available for window focus")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,43 +302,43 @@ Singleton {
|
||||
if (backend && backend.closeWindow) {
|
||||
backend.closeWindow(window)
|
||||
} else {
|
||||
Logger.warn("Compositor", "No backend available for window closing")
|
||||
Logger.w("Compositor", "No backend available for window closing")
|
||||
}
|
||||
}
|
||||
|
||||
// Session management
|
||||
function logout() {
|
||||
if (backend && backend.logout) {
|
||||
Logger.log("Compositor", "Logout requested")
|
||||
Logger.i("Compositor", "Logout requested")
|
||||
backend.logout()
|
||||
} else {
|
||||
Logger.warn("Compositor", "No backend available for logout")
|
||||
Logger.w("Compositor", "No backend available for logout")
|
||||
}
|
||||
}
|
||||
|
||||
function shutdown() {
|
||||
Logger.log("Compositor", "Shutdown requested")
|
||||
Logger.i("Compositor", "Shutdown requested")
|
||||
Quickshell.execDetached(["shutdown", "-h", "now"])
|
||||
}
|
||||
|
||||
function reboot() {
|
||||
Logger.log("Compositor", "Reboot requested")
|
||||
Logger.i("Compositor", "Reboot requested")
|
||||
Quickshell.execDetached(["reboot"])
|
||||
}
|
||||
|
||||
function suspend() {
|
||||
Logger.log("Compositor", "Suspend requested")
|
||||
Logger.i("Compositor", "Suspend requested")
|
||||
Quickshell.execDetached(["systemctl", "suspend"])
|
||||
}
|
||||
|
||||
function lockAndSuspend() {
|
||||
Logger.log("Compositor", "Lock and suspend requested")
|
||||
Logger.i("Compositor", "Lock and suspend requested")
|
||||
try {
|
||||
if (PanelService && PanelService.lockScreen && !PanelService.lockScreen.active) {
|
||||
PanelService.lockScreen.active = true
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.warn("Compositor", "Failed to activate lock screen before suspend: " + e)
|
||||
Logger.w("Compositor", "Failed to activate lock screen before suspend: " + e)
|
||||
}
|
||||
// Queue suspend to the next event loop cycle to allow lock UI to render
|
||||
Qt.callLater(suspend)
|
||||
|
||||
@@ -49,7 +49,7 @@ Singleton {
|
||||
}
|
||||
|
||||
function init() {
|
||||
Logger.log("ControlCenterWidgetRegistry", "Service started")
|
||||
Logger.i("ControlCenterWidgetRegistry", "Service started")
|
||||
}
|
||||
|
||||
// ------------------------------
|
||||
|
||||
@@ -82,7 +82,7 @@ Singleton {
|
||||
if (logoName)
|
||||
resolveLogo(logoName)
|
||||
} catch (e) {
|
||||
Logger.warn("DistroService", "failed to read os-release", e)
|
||||
Logger.w("DistroService", "failed to read os-release", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,10 +93,10 @@ Singleton {
|
||||
const p = String(stdout.text || "").trim()
|
||||
if (code === 0 && p) {
|
||||
root.osLogo = `file://${p}`
|
||||
Logger.log("DistroService", "found", root.osLogo)
|
||||
Logger.i("DistroService", "found", root.osLogo)
|
||||
} else {
|
||||
root.osLogo = ""
|
||||
Logger.warn("DistroService", "none found")
|
||||
Logger.w("DistroService", "none found")
|
||||
}
|
||||
}
|
||||
stdout: StdioCollector {}
|
||||
|
||||
@@ -26,7 +26,7 @@ Singleton {
|
||||
|
||||
// -------------------------------------------
|
||||
function init() {
|
||||
Logger.log("Font", "Service started")
|
||||
Logger.i("Font", "Service started")
|
||||
loadFontconfigMonospaceFonts()
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ Singleton {
|
||||
if (isLoading)
|
||||
return
|
||||
|
||||
Logger.log("Font", "Loading system fonts...")
|
||||
Logger.d("Font", "Loading system fonts...")
|
||||
isLoading = true
|
||||
|
||||
var fontFamilies = Qt.fontFamilies()
|
||||
@@ -125,7 +125,7 @@ Singleton {
|
||||
|
||||
fontsLoaded = true
|
||||
isLoading = false
|
||||
Logger.log("Font", "Loaded", availableFonts.count, "fonts:", monospaceFonts.count, "monospace,", displayFonts.count, "display")
|
||||
Logger.d("Font", "Loaded", availableFonts.count, "fonts:", monospaceFonts.count, "monospace,", displayFonts.count, "display")
|
||||
}
|
||||
|
||||
function isMonospaceFont(fontName) {
|
||||
|
||||
+15
-15
@@ -53,11 +53,11 @@ Singleton {
|
||||
function loadFromCache() {
|
||||
const now = Time.timestamp
|
||||
if (!data.timestamp || (now >= data.timestamp + githubUpdateFrequency)) {
|
||||
Logger.log("GitHub", "Cache expired or missing, fetching new data")
|
||||
Logger.d("GitHub", "Cache expired or missing, fetching new data")
|
||||
fetchFromGitHub()
|
||||
return
|
||||
}
|
||||
Logger.log("GitHub", "Loading cached GitHub data (age:", Math.round((now - data.timestamp) / 60), "minutes)")
|
||||
Logger.d("GitHub", "Loading cached GitHub data (age:", Math.round((now - data.timestamp) / 60), "minutes)")
|
||||
|
||||
if (data.version) {
|
||||
root.latestVersion = data.version
|
||||
@@ -70,7 +70,7 @@ Singleton {
|
||||
// --------------------------------
|
||||
function fetchFromGitHub() {
|
||||
if (isFetchingData) {
|
||||
Logger.warn("GitHub", "GitHub data is still fetching")
|
||||
Logger.w("GitHub", "GitHub data is still fetching")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ Singleton {
|
||||
// --------------------------------
|
||||
function saveData() {
|
||||
data.timestamp = Time.timestamp
|
||||
Logger.log("GitHub", "Saving data to cache file:", githubDataFile)
|
||||
Logger.log("GitHub", "Data to save - version:", data.version, "contributors:", data.contributors.length)
|
||||
Logger.d("GitHub", "Saving data to cache file:", githubDataFile)
|
||||
Logger.d("GitHub", "Data to save - version:", data.version, "contributors:", data.contributors.length)
|
||||
|
||||
// Ensure cache directory exists
|
||||
Quickshell.execDetached(["mkdir", "-p", Settings.cacheDir])
|
||||
@@ -91,7 +91,7 @@ Singleton {
|
||||
Qt.callLater(() => {
|
||||
// Use direct ID reference to the FileView
|
||||
githubDataFileView.writeAdapter()
|
||||
Logger.log("GitHub", "Cache file written successfully")
|
||||
Logger.d("GitHub", "Cache file written successfully")
|
||||
})
|
||||
}
|
||||
|
||||
@@ -120,15 +120,15 @@ Singleton {
|
||||
const version = data.tag_name
|
||||
root.data.version = version
|
||||
root.latestVersion = version
|
||||
Logger.log("GitHub", "Latest version fetched from GitHub:", version)
|
||||
Logger.d("GitHub", "Latest version fetched from GitHub:", version)
|
||||
} else {
|
||||
Logger.log("GitHub", "No tag_name in GitHub response")
|
||||
Logger.w("GitHub", "No tag_name in GitHub response")
|
||||
}
|
||||
} else {
|
||||
Logger.log("GitHub", "Empty response from GitHub API")
|
||||
Logger.w("GitHub", "Empty response from GitHub API")
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.error("GitHub", "Failed to parse version:", e)
|
||||
Logger.e("GitHub", "Failed to parse version:", e)
|
||||
}
|
||||
|
||||
// Check if both processes are done
|
||||
@@ -146,20 +146,20 @@ Singleton {
|
||||
onStreamFinished: {
|
||||
try {
|
||||
const response = text
|
||||
Logger.log("GitHub", "Raw contributors response length:", response ? response.length : 0)
|
||||
Logger.d("GitHub", "Raw contributors response length:", response ? response.length : 0)
|
||||
if (response && response.trim()) {
|
||||
const data = JSON.parse(response)
|
||||
Logger.log("GitHub", "Parsed contributors data type:", typeof data, "length:", Array.isArray(data) ? data.length : "not array")
|
||||
Logger.d("GitHub", "Parsed contributors data type:", typeof data, "length:", Array.isArray(data) ? data.length : "not array")
|
||||
root.data.contributors = data || []
|
||||
root.contributors = root.data.contributors
|
||||
Logger.log("GitHub", "Contributors fetched from GitHub:", root.contributors.length)
|
||||
Logger.d("GitHub", "Contributors fetched from GitHub:", root.contributors.length)
|
||||
} else {
|
||||
Logger.log("GitHub", "Empty response from GitHub API for contributors")
|
||||
Logger.w("GitHub", "Empty response from GitHub API for contributors")
|
||||
root.data.contributors = []
|
||||
root.contributors = []
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.error("GitHub", "Failed to parse contributors:", e)
|
||||
Logger.e("GitHub", "Failed to parse contributors:", e)
|
||||
root.data.contributors = []
|
||||
root.contributors = []
|
||||
}
|
||||
|
||||
@@ -38,9 +38,9 @@ Singleton {
|
||||
let command = script.replace(/\$1/g, wallpaperPath)
|
||||
command = command.replace(/\$2/g, screenName || "")
|
||||
Quickshell.execDetached(["sh", "-c", command])
|
||||
Logger.log("HooksService", `Executed wallpaper hook: ${command}`)
|
||||
Logger.d("HooksService", `Executed wallpaper hook: ${command}`)
|
||||
} catch (e) {
|
||||
Logger.error("HooksService", `Failed to execute wallpaper hook: ${e}`)
|
||||
Logger.e("HooksService", `Failed to execute wallpaper hook: ${e}`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,14 +58,14 @@ Singleton {
|
||||
try {
|
||||
const command = script.replace(/\$1/g, isDarkMode ? "true" : "false")
|
||||
Quickshell.execDetached(["sh", "-c", command])
|
||||
Logger.log("HooksService", `Executed dark mode hook: ${command}`)
|
||||
Logger.d("HooksService", `Executed dark mode hook: ${command}`)
|
||||
} catch (e) {
|
||||
Logger.error("HooksService", `Failed to execute dark mode hook: ${e}`)
|
||||
Logger.e("HooksService", `Failed to execute dark mode hook: ${e}`)
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize the service
|
||||
function init() {
|
||||
Logger.log("HooksService", "Service initialized")
|
||||
Logger.i("HooksService", "Service initialized")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,9 +45,9 @@ Item {
|
||||
queryDisplayScales()
|
||||
})
|
||||
initialized = true
|
||||
Logger.log("HyprlandService", "Initialized successfully")
|
||||
Logger.i("HyprlandService", "Initialized successfully")
|
||||
} catch (e) {
|
||||
Logger.error("HyprlandService", "Failed to initialize:", e)
|
||||
Logger.e("HyprlandService", "Failed to initialize:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ Item {
|
||||
|
||||
onExited: function (exitCode) {
|
||||
if (exitCode !== 0 || !accumulatedOutput) {
|
||||
Logger.error("HyprlandService", "Failed to query monitors, exit code:", exitCode)
|
||||
Logger.e("HyprlandService", "Failed to query monitors, exit code:", exitCode)
|
||||
accumulatedOutput = ""
|
||||
return
|
||||
}
|
||||
@@ -105,7 +105,7 @@ Item {
|
||||
CompositorService.onDisplayScalesUpdated(scales)
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.error("HyprlandService", "Failed to parse monitors:", e)
|
||||
Logger.e("HyprlandService", "Failed to parse monitors:", e)
|
||||
} finally {
|
||||
// Clear accumulated output for next query
|
||||
accumulatedOutput = ""
|
||||
@@ -152,7 +152,7 @@ Item {
|
||||
workspaces.append(wsData)
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.error("HyprlandService", "Error updating workspaces:", e)
|
||||
Logger.e("HyprlandService", "Error updating workspaces:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ Item {
|
||||
activeWindowChanged()
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.error("HyprlandService", "Error updating windows:", e)
|
||||
Logger.e("HyprlandService", "Error updating windows:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ Item {
|
||||
try {
|
||||
Hyprland.dispatch(`workspace ${workspace.idx}`)
|
||||
} catch (e) {
|
||||
Logger.error("HyprlandService", "Failed to switch workspace:", e)
|
||||
Logger.e("HyprlandService", "Failed to switch workspace:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ Item {
|
||||
try {
|
||||
Hyprland.dispatch(`focuswindow address:0x${window.id.toString()}`)
|
||||
} catch (e) {
|
||||
Logger.error("HyprlandService", "Failed to switch window:", e)
|
||||
Logger.e("HyprlandService", "Failed to switch window:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ Item {
|
||||
try {
|
||||
Hyprland.dispatch(`killwindow address:0x${window.id}`)
|
||||
} catch (e) {
|
||||
Logger.error("HyprlandService", "Failed to close window:", e)
|
||||
Logger.e("HyprlandService", "Failed to close window:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ Item {
|
||||
try {
|
||||
Quickshell.execDetached(["hyprctl", "dispatch", "exit"])
|
||||
} catch (e) {
|
||||
Logger.error("HyprlandService", "Failed to logout:", e)
|
||||
Logger.e("HyprlandService", "Failed to logout:", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ Item {
|
||||
function seekRelative(offset: string) {
|
||||
var offsetVal = parseFloat(position)
|
||||
if (Number.isNaN(offsetVal)) {
|
||||
Logger.warn("Media", "Argument to ipc call 'media seekRelative' must be a number")
|
||||
Logger.w("Media", "Argument to ipc call 'media seekRelative' must be a number")
|
||||
return
|
||||
}
|
||||
MediaService.seekRelative(offsetVal)
|
||||
@@ -239,7 +239,7 @@ Item {
|
||||
function seekByRatio(position: string) {
|
||||
var positionVal = parseFloat(position)
|
||||
if (Number.isNaN(positionVal)) {
|
||||
Logger.warn("Media", "Argument to ipc call 'media seekByRatio' must be a number")
|
||||
Logger.w("Media", "Argument to ipc call 'media seekByRatio' must be a number")
|
||||
return
|
||||
}
|
||||
MediaService.seekByRatio(positionVal)
|
||||
|
||||
@@ -17,13 +17,13 @@ Singleton {
|
||||
property string strategy: "systemd" // "systemd", "wayland", or "auto"
|
||||
|
||||
Component.onCompleted: {
|
||||
Logger.log("IdleInhibitor", "Service started")
|
||||
Logger.i("IdleInhibitor", "Service started")
|
||||
detectStrategy()
|
||||
|
||||
// Restore previous state from settings
|
||||
if (Settings.data.ui.idleInhibitorEnabled) {
|
||||
addInhibitor("manual", "Restored from previous session")
|
||||
Logger.log("IdleInhibitor", "Restored previous manual inhibition state")
|
||||
Logger.d("IdleInhibitor", "Restored previous manual inhibition state")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ Singleton {
|
||||
try {
|
||||
var systemdResult = Quickshell.execDetached(["which", "systemd-inhibit"])
|
||||
strategy = "systemd"
|
||||
Logger.log("IdleInhibitor", "Using systemd-inhibit strategy")
|
||||
Logger.d("IdleInhibitor", "Using systemd-inhibit strategy")
|
||||
return
|
||||
} catch (e) {
|
||||
|
||||
@@ -44,14 +44,14 @@ Singleton {
|
||||
try {
|
||||
var waylandResult = Quickshell.execDetached(["which", "wayhibitor"])
|
||||
strategy = "wayland"
|
||||
Logger.log("IdleInhibitor", "Using wayhibitor strategy")
|
||||
Logger.d("IdleInhibitor", "Using wayhibitor strategy")
|
||||
return
|
||||
} catch (e) {
|
||||
|
||||
// wayhibitor not found
|
||||
}
|
||||
|
||||
Logger.warn("IdleInhibitor", "No suitable inhibitor found - will try systemd as fallback")
|
||||
Logger.w("IdleInhibitor", "No suitable inhibitor found - will try systemd as fallback")
|
||||
strategy = "systemd" // Fallback to systemd even if not detected
|
||||
}
|
||||
}
|
||||
@@ -59,13 +59,13 @@ Singleton {
|
||||
// Add an inhibitor
|
||||
function addInhibitor(id, reason = "Application request") {
|
||||
if (activeInhibitors.includes(id)) {
|
||||
Logger.warn("IdleInhibitor", "Inhibitor already active:", id)
|
||||
Logger.w("IdleInhibitor", "Inhibitor already active:", id)
|
||||
return false
|
||||
}
|
||||
|
||||
activeInhibitors.push(id)
|
||||
updateInhibition(reason)
|
||||
Logger.log("IdleInhibitor", "Added inhibitor:", id)
|
||||
Logger.d("IdleInhibitor", "Added inhibitor:", id)
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -73,13 +73,13 @@ Singleton {
|
||||
function removeInhibitor(id) {
|
||||
const index = activeInhibitors.indexOf(id)
|
||||
if (index === -1) {
|
||||
Logger.warn("IdleInhibitor", "Inhibitor not found:", id)
|
||||
Logger.w("IdleInhibitor", "Inhibitor not found:", id)
|
||||
return false
|
||||
}
|
||||
|
||||
activeInhibitors.splice(index, 1)
|
||||
updateInhibition()
|
||||
Logger.log("IdleInhibitor", "Removed inhibitor:", id)
|
||||
Logger.d("IdleInhibitor", "Removed inhibitor:", id)
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -108,12 +108,12 @@ Singleton {
|
||||
} else if (strategy === "wayland") {
|
||||
startWaylandInhibition()
|
||||
} else {
|
||||
Logger.warn("IdleInhibitor", "No inhibition strategy available")
|
||||
Logger.w("IdleInhibitor", "No inhibition strategy available")
|
||||
return
|
||||
}
|
||||
|
||||
isInhibited = true
|
||||
Logger.log("IdleInhibitor", "Started inhibition:", reason)
|
||||
Logger.i("IdleInhibitor", "Started inhibition:", reason)
|
||||
}
|
||||
|
||||
// Stop system inhibition
|
||||
@@ -126,7 +126,7 @@ Singleton {
|
||||
}
|
||||
|
||||
isInhibited = false
|
||||
Logger.log("IdleInhibitor", "Stopped inhibition")
|
||||
Logger.i("IdleInhibitor", "Stopped inhibition")
|
||||
}
|
||||
|
||||
// Systemd inhibition using systemd-inhibit
|
||||
@@ -148,13 +148,13 @@ Singleton {
|
||||
|
||||
onExited: function (exitCode, exitStatus) {
|
||||
if (isInhibited) {
|
||||
Logger.warn("IdleInhibitor", "Inhibitor process exited unexpectedly:", exitCode)
|
||||
Logger.w("IdleInhibitor", "Inhibitor process exited unexpectedly:", exitCode)
|
||||
isInhibited = false
|
||||
}
|
||||
}
|
||||
|
||||
onStarted: function () {
|
||||
Logger.log("IdleInhibitor", "Inhibitor process started successfully")
|
||||
Logger.d("IdleInhibitor", "Inhibitor process started successfully")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,13 +164,13 @@ Singleton {
|
||||
removeInhibitor("manual")
|
||||
Settings.data.ui.idleInhibitorEnabled = false
|
||||
ToastService.showNotice(I18n.tr("tooltips.keep-awake"), I18n.tr("toast.keep-awake.disabled"))
|
||||
Logger.log("IdleInhibitor", "Manual inhibition disabled and saved to settings")
|
||||
Logger.i("IdleInhibitor", "Manual inhibition disabled and saved to settings")
|
||||
return false
|
||||
} else {
|
||||
addInhibitor("manual", "Manually activated by user")
|
||||
Settings.data.ui.idleInhibitorEnabled = true
|
||||
ToastService.showNotice(I18n.tr("tooltips.keep-awake"), I18n.tr("toast.keep-awake.enabled"))
|
||||
Logger.log("IdleInhibitor", "Manual inhibition enabled and saved to settings")
|
||||
Logger.i("IdleInhibitor", "Manual inhibition enabled and saved to settings")
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ Singleton {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
Logger.log("KeyboardLayout", "Service started")
|
||||
Logger.i("KeyboardLayout", "Service started")
|
||||
updateLayout()
|
||||
}
|
||||
|
||||
|
||||
@@ -28,14 +28,14 @@ Singleton {
|
||||
printErrors: false
|
||||
onAdapterUpdated: saveTimer.start()
|
||||
onLoaded: {
|
||||
Logger.log("Location", "Loaded cached data")
|
||||
Logger.d("Location", "Loaded cached data")
|
||||
// Initialize stable properties on load
|
||||
if (adapter.latitude !== "" && adapter.longitude !== "" && adapter.weatherLastFetch > 0) {
|
||||
root.stableLatitude = adapter.latitude
|
||||
root.stableLongitude = adapter.longitude
|
||||
root.stableName = adapter.name
|
||||
root.coordinatesReady = true
|
||||
Logger.log("Location", "Coordinates ready")
|
||||
Logger.i("Location", "Coordinates ready")
|
||||
}
|
||||
updateWeather()
|
||||
}
|
||||
@@ -87,12 +87,12 @@ Singleton {
|
||||
function init() {
|
||||
// does nothing but ensure the singleton is created
|
||||
// do not remove
|
||||
Logger.log("Location", "Service started")
|
||||
Logger.i("Location", "Service started")
|
||||
}
|
||||
|
||||
// --------------------------------
|
||||
function resetWeather() {
|
||||
Logger.log("Location", "Resetting weather data")
|
||||
Logger.i("Location", "Resetting weather data")
|
||||
|
||||
// Mark as changing to prevent UI updates
|
||||
root.coordinatesReady = false
|
||||
@@ -119,7 +119,7 @@ Singleton {
|
||||
}
|
||||
|
||||
if (isFetchingWeather) {
|
||||
Logger.warn("Location", "Weather is still fetching")
|
||||
Logger.w("Location", "Weather is still fetching")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -136,13 +136,13 @@ Singleton {
|
||||
const locationChanged = data.name !== Settings.data.location.name
|
||||
if (locationChanged) {
|
||||
root.coordinatesReady = false
|
||||
Logger.log("Location", "Location changed from", adapter.name, "to", Settings.data.location.name)
|
||||
Logger.d("Location", "Location changed from", adapter.name, "to", Settings.data.location.name)
|
||||
}
|
||||
|
||||
if ((adapter.latitude === "") || (adapter.longitude === "") || locationChanged) {
|
||||
|
||||
_geocodeLocation(Settings.data.location.name, function (latitude, longitude, name, country) {
|
||||
Logger.log("Location", "Geocoded", Settings.data.location.name, "to:", latitude, "/", longitude)
|
||||
Logger.d("Location", "Geocoded", Settings.data.location.name, "to:", latitude, "/", longitude)
|
||||
|
||||
// Save location name
|
||||
adapter.name = Settings.data.location.name
|
||||
@@ -162,7 +162,7 @@ Singleton {
|
||||
|
||||
// --------------------------------
|
||||
function _geocodeLocation(locationName, callback, errorCallback) {
|
||||
Logger.log("Location", "Geocoding location name")
|
||||
Logger.d("Location", "Geocoding location name")
|
||||
var geoUrl = "https://assets.noctalia.dev/geocode.php?city=" + encodeURIComponent(locationName) + "&language=en&format=json"
|
||||
var xhr = new XMLHttpRequest()
|
||||
xhr.onreadystatechange = function () {
|
||||
@@ -189,7 +189,7 @@ Singleton {
|
||||
|
||||
// --------------------------------
|
||||
function _fetchWeather(latitude, longitude, errorCallback) {
|
||||
Logger.log("Location", "Fetching weather from api.open-meteo.com")
|
||||
Logger.d("Location", "Fetching weather from api.open-meteo.com")
|
||||
var url = "https://api.open-meteo.com/v1/forecast?latitude=" + latitude + "&longitude=" + longitude + "¤t_weather=true¤t=relativehumidity_2m,surface_pressure&daily=temperature_2m_max,temperature_2m_min,weathercode,sunset,sunrise&timezone=auto"
|
||||
var xhr = new XMLHttpRequest()
|
||||
xhr.onreadystatechange = function () {
|
||||
@@ -209,7 +209,7 @@ Singleton {
|
||||
root.coordinatesReady = true
|
||||
|
||||
isFetchingWeather = false
|
||||
Logger.log("Location", "Cached weather to disk - stable coordinates updated")
|
||||
Logger.i("Location", "Cached weather to disk - stable coordinates updated")
|
||||
} catch (e) {
|
||||
errorCallback("Location", "Failed to parse weather data")
|
||||
}
|
||||
@@ -224,7 +224,7 @@ Singleton {
|
||||
|
||||
// --------------------------------
|
||||
function errorCallback(module, message) {
|
||||
Logger.error(module, message)
|
||||
Logger.e(module, message)
|
||||
isFetchingWeather = false
|
||||
}
|
||||
|
||||
|
||||
@@ -136,14 +136,14 @@ Singleton {
|
||||
function findActivePlayer() {
|
||||
let availablePlayers = getAvailablePlayers()
|
||||
if (availablePlayers.length === 0) {
|
||||
//Logger.log("Media", "No active player found")
|
||||
//Logger.i("Media", "No active player found")
|
||||
return null
|
||||
}
|
||||
|
||||
// Prioritize the actively playing player ---
|
||||
for (var i = 0; i < availablePlayers.length; i++) {
|
||||
if (availablePlayers[i] && availablePlayers[i].playbackState === MprisPlaybackState.Playing) {
|
||||
Logger.log("Media", "Found actively playing player: " + availablePlayers[i].identity)
|
||||
Logger.d("Media", "Found actively playing player: " + availablePlayers[i].identity)
|
||||
selectedPlayerIndex = i
|
||||
return availablePlayers[i]
|
||||
}
|
||||
@@ -177,7 +177,7 @@ Singleton {
|
||||
if (newPlayer !== currentPlayer) {
|
||||
currentPlayer = newPlayer
|
||||
currentPosition = currentPlayer ? currentPlayer.position : 0
|
||||
Logger.log("Media", "Switching player")
|
||||
Logger.d("Media", "Switching player")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ Singleton {
|
||||
Connections {
|
||||
target: Mpris.players
|
||||
function onValuesChanged() {
|
||||
Logger.log("Media", "Players changed")
|
||||
Logger.d("Media", "Players changed")
|
||||
updateCurrentPlayer()
|
||||
}
|
||||
}
|
||||
|
||||
+24
-24
@@ -56,7 +56,7 @@ Singleton {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
Logger.log("Network", "Service initialized")
|
||||
Logger.i("Network", "Service initialized")
|
||||
syncWifiState()
|
||||
scan()
|
||||
}
|
||||
@@ -105,7 +105,7 @@ Singleton {
|
||||
|
||||
if (scanning) {
|
||||
// Mark current scan results to be ignored and schedule a new scan
|
||||
Logger.log("Network", "Scan already in progress, will ignore results and rescan")
|
||||
Logger.d("Network", "Scan already in progress, will ignore results and rescan")
|
||||
ignoreScanResults = true
|
||||
scanPending = true
|
||||
return
|
||||
@@ -117,7 +117,7 @@ Singleton {
|
||||
|
||||
// Get existing profiles first, then scan
|
||||
profileCheckProcess.running = true
|
||||
Logger.log("Network", "Wi-Fi scan in progress...")
|
||||
Logger.d("Network", "Wi-Fi scan in progress...")
|
||||
}
|
||||
|
||||
function connect(ssid, password = "") {
|
||||
@@ -229,7 +229,7 @@ Singleton {
|
||||
})
|
||||
if (root.ethernetConnected !== connected) {
|
||||
root.ethernetConnected = connected
|
||||
Logger.log("Network", "Ethernet connected:", root.ethernetConnected)
|
||||
Logger.d("Network", "Ethernet connected:", root.ethernetConnected)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -245,7 +245,7 @@ Singleton {
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
const enabled = text.trim() === "enabled"
|
||||
Logger.log("Network", "Wi-Fi adapter was detect as enabled:", enabled)
|
||||
Logger.d("Network", "Wi-Fi adapter was detect as enabled:", enabled)
|
||||
if (Settings.data.network.wifiEnabled !== enabled) {
|
||||
Settings.data.network.wifiEnabled = enabled
|
||||
}
|
||||
@@ -261,7 +261,7 @@ Singleton {
|
||||
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
Logger.log("Network", "Wi-Fi state change command executed.")
|
||||
Logger.i("Network", "Wi-Fi state change command executed.")
|
||||
// Re-check the state to ensure it's in sync
|
||||
syncWifiState()
|
||||
}
|
||||
@@ -270,7 +270,7 @@ Singleton {
|
||||
stderr: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (text.trim()) {
|
||||
Logger.warn("Network", "Error changing Wi-Fi state: " + text)
|
||||
Logger.w("Network", "Error changing Wi-Fi state: " + text)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -285,7 +285,7 @@ Singleton {
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (root.ignoreScanResults) {
|
||||
Logger.log("Network", "Ignoring profile check results (new scan requested)")
|
||||
Logger.d("Network", "Ignoring profile check results (new scan requested)")
|
||||
root.scanning = false
|
||||
|
||||
// Check if we need to start a new scan
|
||||
@@ -318,7 +318,7 @@ Singleton {
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (root.ignoreScanResults) {
|
||||
Logger.log("Network", "Ignoring scan results (new scan requested)")
|
||||
Logger.d("Network", "Ignoring scan results (new scan requested)")
|
||||
root.scanning = false
|
||||
|
||||
// Check if we need to start a new scan
|
||||
@@ -344,7 +344,7 @@ Singleton {
|
||||
// We know the last 3 fields, so everything else is SSID
|
||||
const lastColonIdx = line.lastIndexOf(":")
|
||||
if (lastColonIdx === -1) {
|
||||
Logger.warn("Network", "Malformed nmcli output line:", line)
|
||||
Logger.w("Network", "Malformed nmcli output line:", line)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ Singleton {
|
||||
|
||||
const secondLastColonIdx = remainingLine.lastIndexOf(":")
|
||||
if (secondLastColonIdx === -1) {
|
||||
Logger.warn("Network", "Malformed nmcli output line:", line)
|
||||
Logger.w("Network", "Malformed nmcli output line:", line)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ Singleton {
|
||||
|
||||
const thirdLastColonIdx = remainingLine2.lastIndexOf(":")
|
||||
if (thirdLastColonIdx === -1) {
|
||||
Logger.warn("Network", "Malformed nmcli output line:", line)
|
||||
Logger.w("Network", "Malformed nmcli output line:", line)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -410,15 +410,15 @@ Singleton {
|
||||
|
||||
if (newNetworks.length > 0 || lostNetworks.length > 0) {
|
||||
if (newNetworks.length > 0) {
|
||||
Logger.log("Network", "New Wi-Fi SSID discovered:", newNetworks.join(", "))
|
||||
Logger.d("Network", "New Wi-Fi SSID discovered:", newNetworks.join(", "))
|
||||
}
|
||||
if (lostNetworks.length > 0) {
|
||||
Logger.log("Network", "Wi-Fi SSID disappeared:", lostNetworks.join(", "))
|
||||
Logger.d("Network", "Wi-Fi SSID disappeared:", lostNetworks.join(", "))
|
||||
}
|
||||
Logger.log("Network", "Total Wi-Fi SSIDs:", Object.keys(networksMap).length)
|
||||
Logger.d("Network", "Total Wi-Fi SSIDs:", Object.keys(networksMap).length)
|
||||
}
|
||||
|
||||
Logger.log("Network", "Wi-Fi scan completed")
|
||||
Logger.d("Network", "Wi-Fi scan completed")
|
||||
root.networks = networksMap
|
||||
root.scanning = false
|
||||
|
||||
@@ -435,7 +435,7 @@ Singleton {
|
||||
onStreamFinished: {
|
||||
root.scanning = false
|
||||
if (text.trim()) {
|
||||
Logger.warn("Network", "Scan error: " + text)
|
||||
Logger.w("Network", "Scan error: " + text)
|
||||
|
||||
// If scan fails, retry
|
||||
delayedScanTimer.interval = 5000
|
||||
@@ -491,7 +491,7 @@ Singleton {
|
||||
|
||||
root.connecting = false
|
||||
root.connectingTo = ""
|
||||
Logger.log("Network", `Connected to network: '${connectProcess.ssid}'`)
|
||||
Logger.i("Network", `Connected to network: '${connectProcess.ssid}'`)
|
||||
ToastService.showNotice(I18n.tr("wifi.panel.title"), I18n.tr("toast.wifi.connected", {
|
||||
"ssid": connectProcess.ssid
|
||||
}))
|
||||
@@ -520,7 +520,7 @@ Singleton {
|
||||
root.lastError = text.split("\n")[0].trim()
|
||||
}
|
||||
|
||||
Logger.warn("Network", "Connect error: " + text)
|
||||
Logger.w("Network", "Connect error: " + text)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -534,7 +534,7 @@ Singleton {
|
||||
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
Logger.log("Network", `Disconnected from network: '${disconnectProcess.ssid}'`)
|
||||
Logger.i("Network", `Disconnected from network: '${disconnectProcess.ssid}'`)
|
||||
ToastService.showNotice(I18n.tr("wifi.panel.title"), I18n.tr("toast.wifi.disconnected", {
|
||||
"ssid": disconnectProcess.ssid
|
||||
}))
|
||||
@@ -553,7 +553,7 @@ Singleton {
|
||||
onStreamFinished: {
|
||||
root.disconnectingFrom = ""
|
||||
if (text.trim()) {
|
||||
Logger.warn("Network", "Disconnect error: " + text)
|
||||
Logger.w("Network", "Disconnect error: " + text)
|
||||
}
|
||||
// Still trigger a scan even on error
|
||||
delayedScanTimer.interval = 5000
|
||||
@@ -599,8 +599,8 @@ Singleton {
|
||||
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
Logger.log("Network", `Forget network: "${forgetProcess.ssid}"`)
|
||||
Logger.log("Network", text.trim().replace(/[\r\n]/g, " "))
|
||||
Logger.i("Network", `Forget network: "${forgetProcess.ssid}"`)
|
||||
Logger.d("Network", text.trim().replace(/[\r\n]/g, " "))
|
||||
|
||||
// Update both cached and existing status immediately
|
||||
let nets = root.networks
|
||||
@@ -624,7 +624,7 @@ Singleton {
|
||||
onStreamFinished: {
|
||||
root.forgettingNetwork = ""
|
||||
if (text.trim() && !text.includes("No profiles found")) {
|
||||
Logger.warn("Network", "Forget error: " + text)
|
||||
Logger.w("Network", "Forget error: " + text)
|
||||
}
|
||||
// Still Trigger a scan even on error
|
||||
delayedScanTimer.interval = 5000
|
||||
|
||||
@@ -93,10 +93,10 @@ Singleton {
|
||||
id: runner
|
||||
running: false
|
||||
onStarted: {
|
||||
Logger.log("NightLight", "Wlsunset started:", runner.command)
|
||||
Logger.i("NightLight", "Wlsunset started:", runner.command)
|
||||
}
|
||||
onExited: function (code, status) {
|
||||
Logger.log("NightLight", "Wlsunset exited:", code, status)
|
||||
Logger.i("NightLight", "Wlsunset exited:", code, status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+16
-16
@@ -28,7 +28,7 @@ Item {
|
||||
updateWorkspaces()
|
||||
updateWindows()
|
||||
queryDisplayScales()
|
||||
Logger.log("NiriService", "Initialized successfully")
|
||||
Logger.i("NiriService", "Initialized successfully")
|
||||
}
|
||||
|
||||
// Update workspaces
|
||||
@@ -89,7 +89,7 @@ Item {
|
||||
CompositorService.onDisplayScalesUpdated(scales)
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.error("NiriService", "Failed to parse outputs:", e, line)
|
||||
Logger.e("NiriService", "Failed to parse outputs:", e, line)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -136,7 +136,7 @@ Item {
|
||||
|
||||
workspaceChanged()
|
||||
} catch (e) {
|
||||
Logger.error("NiriService", "Failed to parse workspaces:", e, line)
|
||||
Logger.e("NiriService", "Failed to parse workspaces:", e, line)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,7 +154,7 @@ Item {
|
||||
const windowsData = JSON.parse(line)
|
||||
recollectWindows(windowsData)
|
||||
} catch (e) {
|
||||
Logger.error("NiriService", "Failed to parse windows:", e, line)
|
||||
Logger.e("NiriService", "Failed to parse windows:", e, line)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -193,7 +193,7 @@ Item {
|
||||
queryDisplayScales()
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.error("NiriService", "Error parsing event stream:", e, data)
|
||||
Logger.e("NiriService", "Error parsing event stream:", e, data)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -300,7 +300,7 @@ Item {
|
||||
|
||||
windowListChanged()
|
||||
} catch (e) {
|
||||
Logger.error("NiriService", "Error handling WindowOpenedOrChanged:", e)
|
||||
Logger.e("NiriService", "Error handling WindowOpenedOrChanged:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ Item {
|
||||
windowListChanged()
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.error("NiriService", "Error handling WindowClosed:", e)
|
||||
Logger.e("NiriService", "Error handling WindowClosed:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ Item {
|
||||
const windowsData = eventData.windows
|
||||
recollectWindows(windowsData)
|
||||
} catch (e) {
|
||||
Logger.error("NiriService", "Error handling WindowsChanged:", e)
|
||||
Logger.e("NiriService", "Error handling WindowsChanged:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ Item {
|
||||
|
||||
activeWindowChanged()
|
||||
} catch (e) {
|
||||
Logger.error("NiriService", "Error handling WindowFocusChanged:", e)
|
||||
Logger.e("NiriService", "Error handling WindowFocusChanged:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,16 +378,16 @@ Item {
|
||||
|
||||
windowListChanged()
|
||||
} catch (e) {
|
||||
Logger.error("NiriService", "Error handling WindowLayoutChanged:", e)
|
||||
Logger.e("NiriService", "Error handling WindowLayoutChanged:", e)
|
||||
}
|
||||
}
|
||||
|
||||
function handleOverviewOpenedOrClosed(eventData) {
|
||||
try {
|
||||
overviewActive = eventData.is_open
|
||||
Logger.log("NiriService", "Overview opened or closed:", eventData.is_open)
|
||||
Logger.d("NiriService", "Overview opened or closed:", eventData.is_open)
|
||||
} catch (e) {
|
||||
Logger.error("NiriService", "Error handling OverviewOpenedOrClosed:", e)
|
||||
Logger.e("NiriService", "Error handling OverviewOpenedOrClosed:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ Item {
|
||||
try {
|
||||
Quickshell.execDetached(["niri", "msg", "action", "focus-workspace", workspace.idx.toString()])
|
||||
} catch (e) {
|
||||
Logger.error("NiriService", "Failed to switch workspace:", e)
|
||||
Logger.e("NiriService", "Failed to switch workspace:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,7 +404,7 @@ Item {
|
||||
try {
|
||||
Quickshell.execDetached(["niri", "msg", "action", "focus-window", "--id", window.id.toString()])
|
||||
} catch (e) {
|
||||
Logger.error("NiriService", "Failed to switch window:", e)
|
||||
Logger.e("NiriService", "Failed to switch window:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ Item {
|
||||
try {
|
||||
Quickshell.execDetached(["niri", "msg", "action", "close-window", "--id", window.id.toString()])
|
||||
} catch (e) {
|
||||
Logger.error("NiriService", "Failed to close window:", e)
|
||||
Logger.e("NiriService", "Failed to close window:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ Item {
|
||||
try {
|
||||
Quickshell.execDetached(["niri", "msg", "action", "quit", "--skip-confirmation"])
|
||||
} catch (e) {
|
||||
Logger.error("NiriService", "Failed to logout:", e)
|
||||
Logger.e("NiriService", "Failed to logout:", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ Singleton {
|
||||
adapter.notifications = items
|
||||
historyFileView.writeAdapter()
|
||||
} catch (e) {
|
||||
Logger.error("Notifications", "Save history failed:", e)
|
||||
Logger.e("Notifications", "Save history failed:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ Singleton {
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.error("Notifications", "Load failed:", e)
|
||||
Logger.e("Notifications", "Load failed:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@ Singleton {
|
||||
try {
|
||||
Quickshell.execDetached(["sh", "-c", `rm -rf "${Settings.cacheDirImagesNotifications}"*`])
|
||||
} catch (e) {
|
||||
Logger.error("Notifications", "Failed to clear cache directory:", e)
|
||||
Logger.e("Notifications", "Failed to clear cache directory:", e)
|
||||
}
|
||||
|
||||
historyList.clear()
|
||||
|
||||
@@ -24,7 +24,7 @@ Singleton {
|
||||
// Register this panel
|
||||
function registerPanel(panel) {
|
||||
registeredPanels[panel.objectName] = panel
|
||||
Logger.log("PanelService", "Registered:", panel.objectName)
|
||||
Logger.d("PanelService", "Registered:", panel.objectName)
|
||||
}
|
||||
|
||||
// Returns a panel
|
||||
|
||||
@@ -55,7 +55,7 @@ Singleton {
|
||||
try {
|
||||
powerProfiles.profile = p
|
||||
} catch (e) {
|
||||
Logger.error("PowerProfileService", "Failed to set profile:", e)
|
||||
Logger.e("PowerProfileService", "Failed to set profile:", e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,12 +65,12 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
Logger.log("ProgramChecker", "Detected Discord clients:", detectedClients.join(", "))
|
||||
Logger.i("ProgramChecker", "Detected Discord clients:", detectedClients.join(", "))
|
||||
}
|
||||
}
|
||||
|
||||
if (availableDiscordClients.length === 0) {
|
||||
Logger.log("ProgramChecker", "No Discord clients detected")
|
||||
Logger.d("ProgramChecker", "No Discord clients detected")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ Singleton {
|
||||
// Function to check a specific program
|
||||
function checkProgram(programProperty) {
|
||||
if (!programsToCheck.hasOwnProperty(programProperty)) {
|
||||
Logger.warn("ProgramChecker", "Unknown program property:", programProperty)
|
||||
Logger.w("ProgramChecker", "Unknown program property:", programProperty)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -172,14 +172,14 @@ Singleton {
|
||||
|
||||
// Manual function to test Discord detection (for debugging)
|
||||
function testDiscordDetection() {
|
||||
Logger.log("ProgramChecker", "Testing Discord detection...")
|
||||
Logger.log("ProgramChecker", "HOME:", Quickshell.env("HOME"))
|
||||
Logger.d("ProgramChecker", "Testing Discord detection...")
|
||||
Logger.d("ProgramChecker", "HOME:", Quickshell.env("HOME"))
|
||||
|
||||
// Test each client directory
|
||||
for (var i = 0; i < MatugenTemplates.discordClients.length; i++) {
|
||||
var client = MatugenTemplates.discordClients[i]
|
||||
var configDir = client.configPath.replace("~", Quickshell.env("HOME"))
|
||||
Logger.log("ProgramChecker", "Checking:", configDir)
|
||||
Logger.d("ProgramChecker", "Checking:", configDir)
|
||||
}
|
||||
|
||||
detectDiscordClient()
|
||||
|
||||
+10
-10
@@ -43,9 +43,9 @@ Item {
|
||||
queryDisplayScales()
|
||||
})
|
||||
initialized = true
|
||||
Logger.log("SwayService", "Initialized successfully")
|
||||
Logger.i("SwayService", "Initialized successfully")
|
||||
} catch (e) {
|
||||
Logger.error("SwayService", "Failed to initialize:", e)
|
||||
Logger.e("SwayService", "Failed to initialize:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ Item {
|
||||
|
||||
onExited: function (exitCode) {
|
||||
if (exitCode !== 0 || !accumulatedOutput) {
|
||||
Logger.error("SwayService", "Failed to query outputs, exit code:", exitCode)
|
||||
Logger.e("SwayService", "Failed to query outputs, exit code:", exitCode)
|
||||
accumulatedOutput = ""
|
||||
return
|
||||
}
|
||||
@@ -101,7 +101,7 @@ Item {
|
||||
CompositorService.onDisplayScalesUpdated(scales)
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.error("SwayService", "Failed to parse outputs:", e)
|
||||
Logger.e("SwayService", "Failed to parse outputs:", e)
|
||||
} finally {
|
||||
// Clear accumulated output for next query
|
||||
accumulatedOutput = ""
|
||||
@@ -147,7 +147,7 @@ Item {
|
||||
workspaces.append(wsData)
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.error("SwayService", "Error updating workspaces:", e)
|
||||
Logger.e("SwayService", "Error updating workspaces:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ Item {
|
||||
activeWindowChanged()
|
||||
}
|
||||
} catch (e) {
|
||||
Logger.error("SwayService", "Error updating windows:", e)
|
||||
Logger.e("SwayService", "Error updating windows:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ Item {
|
||||
try {
|
||||
workspace.handle.activate()
|
||||
} catch (e) {
|
||||
Logger.error("SwayService", "Failed to switch workspace:", e)
|
||||
Logger.e("SwayService", "Failed to switch workspace:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ Item {
|
||||
try {
|
||||
window.handle.activate()
|
||||
} catch (e) {
|
||||
Logger.error("SwayService", "Failed to switch window:", e)
|
||||
Logger.e("SwayService", "Failed to switch window:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ Item {
|
||||
try {
|
||||
window.handle.close()
|
||||
} catch (e) {
|
||||
Logger.error("SwayService", "Failed to close window:", e)
|
||||
Logger.e("SwayService", "Failed to close window:", e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ Item {
|
||||
try {
|
||||
Quickshell.execDetached(["swaymsg", "exit"])
|
||||
} catch (e) {
|
||||
Logger.error("SwayService", "Failed to logout:", e)
|
||||
Logger.e("SwayService", "Failed to logout:", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ Singleton {
|
||||
|
||||
// --------------------------------------------
|
||||
Component.onCompleted: {
|
||||
Logger.log("SystemStat", "Service started with interval:", root.sleepDuration, "ms")
|
||||
Logger.i("SystemStat", "Service started with interval:", root.sleepDuration, "ms")
|
||||
|
||||
// Kickoff the cpu name detection for temperature
|
||||
cpuTempNameReader.checkNext()
|
||||
@@ -121,11 +121,11 @@ Singleton {
|
||||
function checkNext() {
|
||||
if (currentIndex >= 16) {
|
||||
// Check up to hwmon10
|
||||
Logger.warn("No supported temperature sensor found")
|
||||
Logger.w("No supported temperature sensor found")
|
||||
return
|
||||
}
|
||||
|
||||
//Logger.log("SystemStat", "---- Probing: hwmon", currentIndex)
|
||||
//Logger.i("SystemStat", "---- Probing: hwmon", currentIndex)
|
||||
cpuTempNameReader.path = `/sys/class/hwmon/hwmon${currentIndex}/name`
|
||||
cpuTempNameReader.reload()
|
||||
}
|
||||
@@ -135,7 +135,7 @@ Singleton {
|
||||
if (root.supportedTempCpuSensorNames.includes(name)) {
|
||||
root.cpuTempSensorName = name
|
||||
root.cpuTempHwmonPath = `/sys/class/hwmon/hwmon${currentIndex}`
|
||||
Logger.log("SystemStat", `Found ${root.cpuTempSensorName} CPU thermal sensor at ${root.cpuTempHwmonPath}`)
|
||||
Logger.i("SystemStat", `Found ${root.cpuTempSensorName} CPU thermal sensor at ${root.cpuTempHwmonPath}`)
|
||||
} else {
|
||||
currentIndex++
|
||||
Qt.callLater(() => {
|
||||
@@ -386,9 +386,9 @@ Singleton {
|
||||
sum += root.intelTempValues[i]
|
||||
}
|
||||
root.cpuTemp = Math.round(sum / root.intelTempValues.length)
|
||||
//Logger.log("SystemStat", `Averaged ${root.intelTempValues.length} CPU thermal sensors: ${root.cpuTemp}°C`)
|
||||
//Logger.i("SystemStat", `Averaged ${root.intelTempValues.length} CPU thermal sensors: ${root.cpuTemp}°C`)
|
||||
} else {
|
||||
Logger.warn("SystemStat", "No temperature sensors found for coretemp")
|
||||
Logger.w("SystemStat", "No temperature sensors found for coretemp")
|
||||
root.cpuTemp = 0
|
||||
}
|
||||
return
|
||||
|
||||
@@ -22,7 +22,7 @@ Singleton {
|
||||
|
||||
// Don't create if no text
|
||||
if (!screen || !target || !text) {
|
||||
Logger.log("Tooltip", "No target or text")
|
||||
Logger.i("Tooltip", "No target or text")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ Singleton {
|
||||
|
||||
return newTooltip
|
||||
} else {
|
||||
Logger.error("Tooltip", "Failed to create tooltip instance")
|
||||
Logger.e("Tooltip", "Failed to create tooltip instance")
|
||||
}
|
||||
|
||||
return null
|
||||
|
||||
@@ -20,11 +20,11 @@ Singleton {
|
||||
|
||||
function checkForUpdates() {
|
||||
// TODO: Implement update checking logic
|
||||
Logger.log("UpdateService", "Checking for updates...")
|
||||
Logger.i("UpdateService", "Checking for updates...")
|
||||
}
|
||||
|
||||
function init() {
|
||||
// Ensure the singleton is created
|
||||
Logger.log("UpdateService", "Version:", root.currentVersion)
|
||||
Logger.i("UpdateService", "Version:", root.currentVersion)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ Singleton {
|
||||
|
||||
// -------------------------------------------------
|
||||
function init() {
|
||||
Logger.log("Wallpaper", "Service started")
|
||||
Logger.i("Wallpaper", "Service started")
|
||||
|
||||
translateModels()
|
||||
|
||||
@@ -247,11 +247,11 @@ Singleton {
|
||||
}
|
||||
|
||||
if (screenName === undefined) {
|
||||
Logger.warn("Wallpaper", "setWallpaper", "no screen specified")
|
||||
Logger.w("Wallpaper", "setWallpaper", "no screen specified")
|
||||
return
|
||||
}
|
||||
|
||||
//Logger.log("Wallpaper", "setWallpaper on", screenName, ": ", path)
|
||||
//Logger.i("Wallpaper", "setWallpaper on", screenName, ": ", path)
|
||||
|
||||
// Check if wallpaper actually changed
|
||||
var oldPath = currentWallpapers[screenName] || ""
|
||||
@@ -303,7 +303,7 @@ Singleton {
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
function setRandomWallpaper() {
|
||||
Logger.log("Wallpaper", "setRandomWallpaper")
|
||||
Logger.d("Wallpaper", "setRandomWallpaper")
|
||||
|
||||
if (Settings.data.wallpaper.enableMultiMonitorDirectories) {
|
||||
// Pick a random wallpaper per screen
|
||||
@@ -331,7 +331,7 @@ Singleton {
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
function toggleRandomWallpaper() {
|
||||
Logger.log("Wallpaper", "toggleRandomWallpaper")
|
||||
Logger.d("Wallpaper", "toggleRandomWallpaper")
|
||||
if (Settings.data.wallpaper.randomEnabled) {
|
||||
restartRandomWallpaperTimer()
|
||||
setRandomWallpaper()
|
||||
@@ -355,7 +355,7 @@ Singleton {
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
function refreshWallpapersList() {
|
||||
Logger.log("Wallpaper", "refreshWallpapersList")
|
||||
Logger.d("Wallpaper", "refreshWallpapersList")
|
||||
scanningCount = 0
|
||||
|
||||
// Force refresh by toggling the folder property on each FolderListModel
|
||||
@@ -429,7 +429,7 @@ Singleton {
|
||||
root.wallpaperLists[screenName] = files
|
||||
|
||||
scanningCount--
|
||||
Logger.log("Wallpaper", "List refreshed for", screenName, "count:", files.length)
|
||||
Logger.d("Wallpaper", "List refreshed for", screenName, "count:", files.length)
|
||||
root.wallpaperListChanged(screenName, files.length)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ Text {
|
||||
return ""
|
||||
}
|
||||
if (Icons.get(icon) === undefined) {
|
||||
Logger.warn("Icon", `"${icon}"`, "doesn't exist in the icons font")
|
||||
Logger.w("Icon", `"${icon}"`, "doesn't exist in the icons font")
|
||||
Logger.callStack()
|
||||
return Icons.get(Icons.defaultIcon)
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ Image {
|
||||
onImagePathChanged: {
|
||||
if (imagePath) {
|
||||
imageHash = Checksum.sha256(imagePath)
|
||||
// Logger.log("NImageCached", imagePath, imageHash)
|
||||
// Logger.i("NImageCached", imagePath, imageHash)
|
||||
} else {
|
||||
source = ""
|
||||
imageHash = ""
|
||||
|
||||
+2
-2
@@ -135,7 +135,7 @@ Loader {
|
||||
readonly property real verticalBarWidth: Style.barHeight
|
||||
|
||||
Component.onCompleted: {
|
||||
Logger.log("NPanel", "Opened", root.objectName, "on", screen.name)
|
||||
Logger.d("NPanel", "Opened", root.objectName, "on", screen.name)
|
||||
dimmingOpacity = Style.opacityHeavy
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ Loader {
|
||||
if (buttonName) {
|
||||
setPosition()
|
||||
}
|
||||
Logger.log("NPanel", "OnScreenChanged", root.screen.name)
|
||||
Logger.d("NPanel", "OnScreenChanged", root.screen.name)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -285,19 +285,19 @@ NBox {
|
||||
if (dialog) {
|
||||
dialog.open()
|
||||
} else {
|
||||
Logger.error("NSectionEditor", "Failed to create settings dialog instance")
|
||||
Logger.e("NSectionEditor", "Failed to create settings dialog instance")
|
||||
}
|
||||
}
|
||||
if (component.status === Component.Ready) {
|
||||
instantiateAndOpen()
|
||||
} else if (component.status === Component.Error) {
|
||||
Logger.error("NSectionEditor", component.errorString())
|
||||
Logger.e("NSectionEditor", component.errorString())
|
||||
} else {
|
||||
component.statusChanged.connect(function () {
|
||||
if (component.status === Component.Ready) {
|
||||
instantiateAndOpen()
|
||||
} else if (component.status === Component.Error) {
|
||||
Logger.error("NSectionEditor", component.errorString())
|
||||
Logger.e("NSectionEditor", component.errorString())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -49,8 +49,8 @@ ShellRoot {
|
||||
property bool settingsLoaded: false
|
||||
|
||||
Component.onCompleted: {
|
||||
Logger.log("Shell", "---------------------------")
|
||||
Logger.log("Shell", "Noctalia Hello!")
|
||||
Logger.i("Shell", "---------------------------")
|
||||
Logger.i("Shell", "Noctalia Hello!")
|
||||
}
|
||||
|
||||
Connections {
|
||||
@@ -79,7 +79,7 @@ ShellRoot {
|
||||
|
||||
sourceComponent: Item {
|
||||
Component.onCompleted: {
|
||||
Logger.log("Shell", "---------------------------")
|
||||
Logger.i("Shell", "---------------------------")
|
||||
WallpaperService.init()
|
||||
AppThemeService.init()
|
||||
ColorSchemeService.init()
|
||||
|
||||
Reference in New Issue
Block a user