fixes to workspace without apps
This commit is contained in:
@@ -111,7 +111,7 @@ MouseArea {
|
||||
BatteryState.start()
|
||||
}
|
||||
|
||||
console.log("battery available:", hasBattery)
|
||||
// console.log("battery available:", hasBattery)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ Row { // Workspace Row
|
||||
active: modelData.monitor === thisMonitor
|
||||
sourceComponent: Rectangle { //workspace
|
||||
// visible: modelData.monitor === thisMonitor
|
||||
width: Math.max(workspaceNum.width + workspaceText.width+Config.spacing*2, bar.height)
|
||||
width: workspaceText.text.length === 0 ? Math.max(workspaceNum.width + Config.spacing*2, workspaceNum.height + Config.spacing) : Math.max(workspaceNum.width + workspaceText.width + Config.spacing*2, bar.height)
|
||||
height: workspaceNum.height + Config.spacing
|
||||
radius: Config.small_radius
|
||||
color: (
|
||||
@@ -52,13 +52,16 @@ Row { // Workspace Row
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: Hyprland.dispatch("workspace " + modelData.id)
|
||||
onClicked: {
|
||||
Hyprland.dispatch("workspace " + modelData.id)
|
||||
// console.log("workspaceText: " + workspaceText.text.length)
|
||||
}
|
||||
|
||||
Row {
|
||||
id: workspaceRow
|
||||
anchors.centerIn: parent
|
||||
spacing: Math.floor(bar.height/8)
|
||||
leftPadding: Math.floor(bar.height/4)
|
||||
leftPadding: workspaceText.text.length === 0 ? 0 : Math.floor(bar.height / 4)
|
||||
|
||||
Text {
|
||||
id: workspaceNum
|
||||
@@ -95,8 +98,12 @@ Row { // Workspace Row
|
||||
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
workspaceText.text = this.text
|
||||
// console.log("workspaceScript output:", this.text)
|
||||
if (this.text.length > 1) {
|
||||
workspaceText.text = this.text
|
||||
} else {
|
||||
workspaceText.text = ""
|
||||
}
|
||||
// console.log("workspaceScript output:", workspaceText.text, workspaceText.text.length)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Io
|
||||
|
||||
import "../../states/wallpaper" as Global
|
||||
import "../../states/wallpaperdir" as Global
|
||||
|
||||
|
||||
Item { // container, invisible
|
||||
|
||||
Reference in New Issue
Block a user