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