Load only correct Workspaces not hide incorrect ones + some new apps

This commit is contained in:
Hannes
2026-02-25 17:43:57 +01:00
parent 5c979a932d
commit 56ac967679
2 changed files with 74 additions and 55 deletions
+5 -2
View File
@@ -6,7 +6,7 @@ if [[ -z "$ID" ]]; then
echo "Usage: $0 Number"
exit 1
fi
# Command Helper: hyprctl clients -j | jq '.[] | select(.workspace.id == 4)'
# Command Helper: hyprctl clients -j | jq '.[] | select(.workspace.id == 1)'
# Icons: https://www.nerdfonts.com/cheat-sheet
declare -A MAP=(
# Youtube
@@ -27,7 +27,7 @@ declare -A MAP=(
["mpv"]=""
["ffplay"]=""
# Chats
["Discord"]=""
["discord"]=""
["vesktop"]=""
["Signal"]="󰭹"
["xyz.chatboxapp.app"]=""
@@ -71,6 +71,7 @@ declare -A MAP=(
["libreoffice-writer"]=""
["com.github.flxzt.rnote"]="󱩼"
["com.github.xournalpp.xournalpp"]="󱩼"
["qpdfview.local.qpdfview"]="󱩼"
# Hardware
["Mission Center"]=""
["QDirStat"]="󰋊"
@@ -88,6 +89,8 @@ declare -A MAP=(
["nm-connection-editor"]="󱛆"
# Calculator
["Calculator"]="󰪚"
# VPN
["Proton VPN"]="󰌾"
)
# APPS=$(hyprctl clients -j | jq -r ".[] | select(.workspace.id == $ID) | .initialTitle")
+20 -4
View File
@@ -10,11 +10,27 @@ Row { // Workspace Row
required property HyprlandMonitor thisMonitor
spacing: 8
// Get infos of Type Unknown
// Repeater {
// model: Hyprland.workspaces
// Rectangle {
// Component.onCompleted: {
// console.log("roles:")
// console.log("id:", modelData.id)
// console.log("monitor:", modelData.monitor)
// console.log("monitorId:", modelData.monitorId)
// console.log("name:", modelData.name)
// }
// }
// }
Repeater { // repeats workspaces
model: Hyprland.workspaces
Rectangle { //workspace
visible: modelData.monitor === thisMonitor
Loader {
active: modelData.monitor === thisMonitor
sourceComponent: Rectangle { //workspace
// visible: modelData.monitor === thisMonitor
width: (workspaceNum.width + 16) < (workspaceNum.height + 8) ? workspaceNum.height + 8 : workspaceNum.width + 16
height: workspaceNum.height + 8
radius: 4
@@ -71,7 +87,7 @@ Row { // Workspace Row
onTriggered: workspaceContent.running = true
}
}
}
}
Text {