updated a few apps + made tray being able to change icon with 10s timer
This commit is contained in:
@@ -18,7 +18,7 @@ declare -A MAP=(
|
||||
["brave-browser"]=""
|
||||
["chromium"]=""
|
||||
# E-Mail
|
||||
["Mozilla Thunderbird"]=""
|
||||
["org.mozilla.Thunderbird"]=""
|
||||
# Terminals
|
||||
["kitty"]=""
|
||||
["Alacritty"]=""
|
||||
@@ -62,6 +62,7 @@ declare -A MAP=(
|
||||
["Carla"]=""
|
||||
# Video
|
||||
["com.obsproject.Studio"]=""
|
||||
["hyprland-share-picker"]=""
|
||||
# Document Editor/Viewer
|
||||
["libreoffice-startcenter"]=""
|
||||
["libreoffice-base"]=""
|
||||
|
||||
@@ -89,10 +89,43 @@ Row { // Workspace Row
|
||||
width: bar.height*0.5
|
||||
height: bar.height*0.5
|
||||
|
||||
Component.onCompleted: {
|
||||
// Default to the original icon
|
||||
let src = modelData.icon;
|
||||
// Component.onCompleted: {
|
||||
// // Default to the original icon
|
||||
// let src = modelData.icon;
|
||||
// // console.log("########## icon: " + modelData.icon)
|
||||
|
||||
// // Check if there is a "?" in the URL (custom path)
|
||||
// if (src.includes('goxlr')) {
|
||||
// let pathMatch = src.match(/path=([^&]+)/);
|
||||
// if (pathMatch && pathMatch[1]) {
|
||||
|
||||
// let folderPath = pathMatch[1];
|
||||
// // Build a file:// URL pointing to the actual icon file
|
||||
// let segments = folderPath.split('/');
|
||||
// let fileName = segments[segments.length - 1] + "-icon.png";
|
||||
// console.log("########## filename: " + fileName)
|
||||
// console.log("########## icon: " + modelData.icon)
|
||||
// src = "file://" + pathMatch[1] + "/" + fileName;
|
||||
// }
|
||||
// }
|
||||
|
||||
// // Set the resolved source
|
||||
// iconImage.source = src;
|
||||
|
||||
// // console.log("Resolved icon source:", src);
|
||||
// }
|
||||
asynchronous: true
|
||||
cache: true
|
||||
}
|
||||
|
||||
Timer {
|
||||
interval: 10000
|
||||
running: true
|
||||
repeat: true
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
let src = modelData.icon;
|
||||
console.log("########## icon: " + modelData.icon)
|
||||
|
||||
// Check if there is a "?" in the URL (custom path)
|
||||
if (src.includes('goxlr')) {
|
||||
@@ -111,11 +144,7 @@ Row { // Workspace Row
|
||||
|
||||
// Set the resolved source
|
||||
iconImage.source = src;
|
||||
|
||||
// console.log("Resolved icon source:", src);
|
||||
}
|
||||
asynchronous: true
|
||||
cache: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user