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" echo "Usage: $0 Number"
exit 1 exit 1
fi 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 # Icons: https://www.nerdfonts.com/cheat-sheet
declare -A MAP=( declare -A MAP=(
# Youtube # Youtube
@@ -27,7 +27,7 @@ declare -A MAP=(
["mpv"]="" ["mpv"]=""
["ffplay"]="" ["ffplay"]=""
# Chats # Chats
["Discord"]="" ["discord"]=""
["vesktop"]="" ["vesktop"]=""
["Signal"]="󰭹" ["Signal"]="󰭹"
["xyz.chatboxapp.app"]="" ["xyz.chatboxapp.app"]=""
@@ -71,6 +71,7 @@ declare -A MAP=(
["libreoffice-writer"]="" ["libreoffice-writer"]=""
["com.github.flxzt.rnote"]="󱩼" ["com.github.flxzt.rnote"]="󱩼"
["com.github.xournalpp.xournalpp"]="󱩼" ["com.github.xournalpp.xournalpp"]="󱩼"
["qpdfview.local.qpdfview"]="󱩼"
# Hardware # Hardware
["Mission Center"]="" ["Mission Center"]=""
["QDirStat"]="󰋊" ["QDirStat"]="󰋊"
@@ -88,6 +89,8 @@ declare -A MAP=(
["nm-connection-editor"]="󱛆" ["nm-connection-editor"]="󱛆"
# Calculator # Calculator
["Calculator"]="󰪚" ["Calculator"]="󰪚"
# VPN
["Proton VPN"]="󰌾"
) )
# APPS=$(hyprctl clients -j | jq -r ".[] | select(.workspace.id == $ID) | .initialTitle") # 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 required property HyprlandMonitor thisMonitor
spacing: 8 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 Repeater { // repeats workspaces
model: Hyprland.workspaces model: Hyprland.workspaces
Loader {
Rectangle { //workspace active: modelData.monitor === thisMonitor
visible: modelData.monitor === thisMonitor sourceComponent: Rectangle { //workspace
// visible: modelData.monitor === thisMonitor
width: (workspaceNum.width + 16) < (workspaceNum.height + 8) ? workspaceNum.height + 8 : workspaceNum.width + 16 width: (workspaceNum.width + 16) < (workspaceNum.height + 8) ? workspaceNum.height + 8 : workspaceNum.width + 16
height: workspaceNum.height + 8 height: workspaceNum.height + 8
radius: 4 radius: 4
@@ -71,7 +87,7 @@ Row { // Workspace Row
onTriggered: workspaceContent.running = true onTriggered: workspaceContent.running = true
} }
} }
}
} }
Text { Text {