Cleanup all the console.log
Also renamed Github to GitHub
This commit is contained in:
parent
f62a0e5f83
commit
0d196b2917
11 changed files with 47 additions and 47 deletions
|
|
@ -68,7 +68,7 @@ NLoader {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
antialiasing: true
|
antialiasing: true
|
||||||
renderTarget: Canvas.FramebufferObject
|
renderTarget: Canvas.FramebufferObject
|
||||||
onPaint: function () {
|
onPaint: {
|
||||||
const ctx = getContext("2d")
|
const ctx = getContext("2d")
|
||||||
ctx.reset()
|
ctx.reset()
|
||||||
ctx.clearRect(0, 0, width, height)
|
ctx.clearRect(0, 0, width, height)
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ Item {
|
||||||
trayPanel.show()
|
trayPanel.show()
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
console.log("Tray: no menu available for", modelData.id, "or trayMenu not set")
|
console.log("[Tray] no menu available for", modelData.id, "or trayMenu not set")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ NLoader {
|
||||||
|
|
||||||
// Ensure panel shows itself once created
|
// Ensure panel shows itself once created
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
console.log("[DemoPanel] Component completed, showing panel...")
|
console.log("[DemoPanel] Component completed, showing panel")
|
||||||
show()
|
show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -127,7 +127,7 @@ NLoader {
|
||||||
label: "Label"
|
label: "Label"
|
||||||
description: "Description"
|
description: "Description"
|
||||||
onToggled: function (value) {
|
onToggled: function (value) {
|
||||||
console.log("NToggle: " + value)
|
console.log("[DemoPanel] NToggle:", value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -150,7 +150,7 @@ NLoader {
|
||||||
optionsLabels: ["Cat", "Dog", "Bird", "Monkey", "Fish", "Turtle", "Elephant", "Tiger"]
|
optionsLabels: ["Cat", "Dog", "Bird", "Monkey", "Fish", "Turtle", "Elephant", "Tiger"]
|
||||||
currentKey: "cat"
|
currentKey: "cat"
|
||||||
onSelected: function (value) {
|
onSelected: function (value) {
|
||||||
console.log("NComboBox: selected " + value)
|
console.log("[DemoPanel] NComboBox: selected ", value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,13 @@ import qs.Widgets
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property string latestVersion: Github.latestVersion
|
property string latestVersion: GitHub.latestVersion
|
||||||
property string currentVersion: "v1.2.1" // Fallback version
|
property string currentVersion: "v1.2.1" // Fallback version
|
||||||
property var contributors: Github.contributors
|
property var contributors: GitHub.contributors
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
// Initialize the Github service
|
// Initialize the GitHub service
|
||||||
Github.init()
|
GitHub.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ Singleton {
|
||||||
|
|
||||||
function onMutedChanged() {
|
function onMutedChanged() {
|
||||||
root._muted = (sink?.audio.muted ?? true)
|
root._muted = (sink?.audio.muted ?? true)
|
||||||
console.log("[Audio] onMuteChanged " + root._muted)
|
console.log("[Audio] onMuteChanged:", root._muted)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Singleton {
|
||||||
|
|
||||||
property string githubDataFile: Quickshell.env("NOCTALIA_GITHUB_FILE") || (Settings.cacheDir + "github.json")
|
property string githubDataFile: Quickshell.env("NOCTALIA_GITHUB_FILE") || (Settings.cacheDir + "github.json")
|
||||||
property int githubUpdateFrequency: 60 * 60 // 1 hour expressed in seconds
|
property int githubUpdateFrequency: 60 * 60 // 1 hour expressed in seconds
|
||||||
property var data: adapter // Used to access via Github.data.xxx.yyy
|
property var data: adapter // Used to access via GitHub.data.xxx.yyy
|
||||||
property bool isFetchingData: false
|
property bool isFetchingData: false
|
||||||
|
|
||||||
// Public properties for easy access
|
// Public properties for easy access
|
||||||
|
|
@ -32,7 +32,7 @@ Singleton {
|
||||||
onLoadFailed: function (error) {
|
onLoadFailed: function (error) {
|
||||||
if (error.toString().includes("No such file") || error === 2) {
|
if (error.toString().includes("No such file") || error === 2) {
|
||||||
// File doesn't exist, create it with default values
|
// File doesn't exist, create it with default values
|
||||||
console.log("[Github] Creating new cache file...")
|
console.log("[GitHub] Creating new cache file")
|
||||||
writeAdapter()
|
writeAdapter()
|
||||||
// Fetch data after a short delay to ensure file is created
|
// Fetch data after a short delay to ensure file is created
|
||||||
Qt.callLater(() => {
|
Qt.callLater(() => {
|
||||||
|
|
@ -59,11 +59,11 @@ Singleton {
|
||||||
function loadFromCache() {
|
function loadFromCache() {
|
||||||
const now = Date.now()
|
const now = Date.now()
|
||||||
if (!data.timestamp || (now - data.timestamp > githubUpdateFrequency * 1000)) {
|
if (!data.timestamp || (now - data.timestamp > githubUpdateFrequency * 1000)) {
|
||||||
console.log("[Github] Cache expired or missing, fetching new data from GitHub...")
|
console.log("[GitHub] Cache expired or missing, fetching new data from GitHub...")
|
||||||
fetchFromGitHub()
|
fetchFromGitHub()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log("[Github] Loading cached GitHub data (age: " + Math.round((now - data.timestamp) / 60000) + " minutes)")
|
console.log("[GitHub] Loading cached GitHub data (age:", Math.round((now - data.timestamp) / 60000),"minutes)")
|
||||||
|
|
||||||
if (data.version) {
|
if (data.version) {
|
||||||
root.latestVersion = data.version
|
root.latestVersion = data.version
|
||||||
|
|
@ -76,7 +76,7 @@ Singleton {
|
||||||
// --------------------------------
|
// --------------------------------
|
||||||
function fetchFromGitHub() {
|
function fetchFromGitHub() {
|
||||||
if (isFetchingData) {
|
if (isFetchingData) {
|
||||||
console.warn("[Github] GitHub data is still fetching")
|
console.warn("[GitHub] GitHub data is still fetching")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -122,15 +122,15 @@ Singleton {
|
||||||
const version = data.tag_name
|
const version = data.tag_name
|
||||||
root.data.version = version
|
root.data.version = version
|
||||||
root.latestVersion = version
|
root.latestVersion = version
|
||||||
console.log("[Github] Latest version fetched from GitHub:", version)
|
console.log("[GitHub] Latest version fetched from GitHub:", version)
|
||||||
} else {
|
} else {
|
||||||
console.log("[Github] No tag_name in GitHub response")
|
console.log("[GitHub] No tag_name in GitHub response")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log("[Github] Empty response from GitHub API")
|
console.log("[GitHub] Empty response from GitHub API")
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("[Github] Failed to parse version:", e)
|
console.error("[GitHub] Failed to parse version:", e)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if both processes are done
|
// Check if both processes are done
|
||||||
|
|
@ -152,14 +152,14 @@ Singleton {
|
||||||
const data = JSON.parse(response)
|
const data = JSON.parse(response)
|
||||||
root.data.contributors = data || []
|
root.data.contributors = data || []
|
||||||
root.contributors = root.data.contributors
|
root.contributors = root.data.contributors
|
||||||
console.log("[Github] Contributors fetched from GitHub:", root.contributors.length)
|
console.log("[GitHub] Contributors fetched from GitHub:", root.contributors.length)
|
||||||
} else {
|
} else {
|
||||||
console.log("[Github] Empty response from GitHub API for contributors")
|
console.log("[GitHub] Empty response from GitHub API for contributors")
|
||||||
root.data.contributors = []
|
root.data.contributors = []
|
||||||
root.contributors = []
|
root.contributors = []
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("[Github] Failed to parse contributors:", e)
|
console.error("[GitHub] Failed to parse contributors:", e)
|
||||||
root.data.contributors = []
|
root.data.contributors = []
|
||||||
root.contributors = []
|
root.contributors = []
|
||||||
}
|
}
|
||||||
|
|
@ -90,7 +90,7 @@ Singleton {
|
||||||
if ((data.latitude === "") || (data.longitude === "") || (data.name !== Settings.data.location.name)) {
|
if ((data.latitude === "") || (data.longitude === "") || (data.name !== Settings.data.location.name)) {
|
||||||
|
|
||||||
_geocodeLocation(Settings.data.location.name, function (latitude, longitude) {
|
_geocodeLocation(Settings.data.location.name, function (latitude, longitude) {
|
||||||
console.log("[Location] Geocoded " + Settings.data.location.name + " to: " + latitude + " / " + longitude)
|
console.log("[Location] Geocoded", Settings.data.location.name, "to:", latitude, "/", longitude)
|
||||||
|
|
||||||
// Save location name
|
// Save location name
|
||||||
data.name = Settings.data.location.name
|
data.name = Settings.data.location.name
|
||||||
|
|
|
||||||
|
|
@ -38,11 +38,6 @@ Singleton {
|
||||||
}
|
}
|
||||||
|
|
||||||
FileView {
|
FileView {
|
||||||
|
|
||||||
// TBC ? needed for SWWW only ?
|
|
||||||
// Qt.callLater(function () {
|
|
||||||
// WallpaperManager.setCurrentWallpaper(settings.currentWallpaper, true);
|
|
||||||
// })
|
|
||||||
path: settingsFile
|
path: settingsFile
|
||||||
watchChanges: true
|
watchChanges: true
|
||||||
onFileChanged: reload()
|
onFileChanged: reload()
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ Singleton {
|
||||||
loadWallpapers()
|
loadWallpapers()
|
||||||
// Only set initial wallpaper if it's not empty
|
// Only set initial wallpaper if it's not empty
|
||||||
if (currentWallpaper !== "") {
|
if (currentWallpaper !== "") {
|
||||||
console.log("Wallpapers: Initializing with wallpaper:", currentWallpaper)
|
console.log("[WP] initializing with:", currentWallpaper)
|
||||||
setCurrentWallpaper(currentWallpaper, true)
|
setCurrentWallpaper(currentWallpaper, true)
|
||||||
}
|
}
|
||||||
// Don't start random wallpaper during initialization
|
// Don't start random wallpaper during initialization
|
||||||
|
|
@ -34,7 +34,7 @@ Singleton {
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeWallpaper(path) {
|
function changeWallpaper(path) {
|
||||||
console.log("Wallpapers: changeWallpaper called with:", path)
|
console.log("[WP] changing to:", path)
|
||||||
setCurrentWallpaper(path, false)
|
setCurrentWallpaper(path, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -54,7 +54,7 @@ Singleton {
|
||||||
changeWallpaperProcess.running = true
|
changeWallpaperProcess.running = true
|
||||||
} else {
|
} else {
|
||||||
// Fallback: update the settings directly for non-SWWW mode
|
// Fallback: update the settings directly for non-SWWW mode
|
||||||
console.log("Non-SWWW mode: Setting wallpaper directly")
|
//console.log("[WP] Not using Swww, setting wallpaper directly")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (randomWallpaperTimer.running) {
|
if (randomWallpaperTimer.running) {
|
||||||
|
|
@ -97,7 +97,7 @@ Singleton {
|
||||||
|
|
||||||
function startSWWWDaemon() {
|
function startSWWWDaemon() {
|
||||||
if (Settings.data.wallpaper.swww.enabled) {
|
if (Settings.data.wallpaper.swww.enabled) {
|
||||||
console.log("SWWW: Attempting to start swww-daemon...")
|
console.log("[SWWW] Requesting swww-daemon")
|
||||||
startDaemonProcess.running = true
|
startDaemonProcess.running = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -144,10 +144,10 @@ Singleton {
|
||||||
}
|
}
|
||||||
|
|
||||||
onExited: function (exitCode, exitStatus) {
|
onExited: function (exitCode, exitStatus) {
|
||||||
console.log("SWWW: Process finished with exit code:", exitCode, "status:", exitStatus)
|
console.log("[SWWW] Process finished with exit code:", exitCode, "status:", exitStatus)
|
||||||
if (exitCode !== 0) {
|
if (exitCode !== 0) {
|
||||||
console.log("SWWW: Process failed. Make sure swww-daemon is running with: swww-daemon")
|
console.log("[SWWW] Process failed. Make sure swww-daemon is running with: swww-daemon")
|
||||||
console.log("SWWW: You can start it with: swww-daemon --format xrgb")
|
console.log("[SWWW] You can start it with: swww-daemon --format xrgb")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -157,6 +157,11 @@ Singleton {
|
||||||
command: ["wallust", "run", currentWallpaper, "-u", "-k", "-d", "Assets/Wallust"]
|
command: ["wallust", "run", currentWallpaper, "-u", "-k", "-d", "Assets/Wallust"]
|
||||||
workingDirectory: Quickshell.shellDir
|
workingDirectory: Quickshell.shellDir
|
||||||
running: false
|
running: false
|
||||||
|
stdout: StdioCollector {
|
||||||
|
onStreamFinished: {
|
||||||
|
// console.log(this.text)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
|
|
@ -165,15 +170,15 @@ Singleton {
|
||||||
running: false
|
running: false
|
||||||
|
|
||||||
onStarted: {
|
onStarted: {
|
||||||
console.log("SWWW: Daemon start process initiated")
|
console.log("[SWWW] Daemon start process initiated")
|
||||||
}
|
}
|
||||||
|
|
||||||
onExited: function (exitCode, exitStatus) {
|
onExited: function (exitCode, exitStatus) {
|
||||||
console.log("SWWW: Daemon start process finished with exit code:", exitCode)
|
console.log("[SWWW] Daemon start process finished with exit code:", exitCode)
|
||||||
if (exitCode === 0) {
|
if (exitCode === 0) {
|
||||||
console.log("SWWW: Daemon started successfully")
|
console.log("[SWWW] Daemon started successfully")
|
||||||
} else {
|
} else {
|
||||||
console.log("SWWW: Failed to start daemon. It might already be running.")
|
console.log("[SWWW] Failed to start daemon, may already be running")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ Singleton {
|
||||||
property var hlWorkspaces: Hyprland.workspaces.values
|
property var hlWorkspaces: Hyprland.workspaces.values
|
||||||
// Detect which compositor we're using
|
// Detect which compositor we're using
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
console.log("WorkspaceManager initializing...")
|
console.log("[WS] Initializing workspaces service")
|
||||||
detectCompositor()
|
detectCompositor()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -25,27 +25,27 @@ Singleton {
|
||||||
try {
|
try {
|
||||||
try {
|
try {
|
||||||
if (Hyprland.eventSocketPath) {
|
if (Hyprland.eventSocketPath) {
|
||||||
console.log("Detected Hyprland compositor")
|
console.log("[WS] Detected Hyprland compositor")
|
||||||
isHyprland = true
|
isHyprland = true
|
||||||
isNiri = false
|
isNiri = false
|
||||||
initHyprland()
|
initHyprland()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("Hyprland not available:", e)
|
console.log("[WS] Hyprland not available:", e)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof Niri !== "undefined") {
|
if (typeof Niri !== "undefined") {
|
||||||
console.log("Detected Niri service")
|
console.log("[WS] Detected Niri service")
|
||||||
isHyprland = false
|
isHyprland = false
|
||||||
isNiri = true
|
isNiri = true
|
||||||
initNiri()
|
initNiri()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("No supported compositor detected")
|
console.log("[WS] Could not detect any supported compositor")
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Error detecting compositor:", e)
|
console.error("[WS] Error detecting compositor:", e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -102,7 +102,7 @@ Singleton {
|
||||||
}
|
}
|
||||||
workspacesChanged()
|
workspacesChanged()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Error updating Hyprland workspaces:", e)
|
console.error("[WS] Error updating Hyprland workspaces:", e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ Loader {
|
||||||
sourceComponent: content
|
sourceComponent: content
|
||||||
|
|
||||||
// onLoaded: {
|
// onLoaded: {
|
||||||
// console.log("NLoader onLoaded: " + item.toString());
|
// console.log("[NLoader] onLoaded:", item.toString());
|
||||||
// }
|
// }
|
||||||
onActiveChanged: {
|
onActiveChanged: {
|
||||||
if (active && item && item.show) {
|
if (active && item && item.show) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue