Compare commits
2 Commits
328dfa1786
...
225538148d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
225538148d | ||
|
|
553a7b3ad4 |
@@ -8,6 +8,7 @@ Text {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
// Nerd Font Bluetooth icon (nf-fa-bluetooth)
|
// Nerd Font Bluetooth icon (nf-fa-bluetooth)
|
||||||
|
// cheat sheet: https://www.nerdfonts.com/cheat-sheet
|
||||||
property string iconGlyph: "\udb80\udcaf"
|
property string iconGlyph: "\udb80\udcaf"
|
||||||
property string connectedIconGlyph: "\udb80\udcb1"
|
property string connectedIconGlyph: "\udb80\udcb1"
|
||||||
property string disconnectedIconGlyph: "\udb80\udcaf"
|
property string disconnectedIconGlyph: "\udb80\udcaf"
|
||||||
|
|||||||
@@ -28,37 +28,8 @@ Item {
|
|||||||
id: workspaceHelpers
|
id: workspaceHelpers
|
||||||
}
|
}
|
||||||
|
|
||||||
// =====================
|
WorkspacesList {
|
||||||
// LEFT: Workspaces
|
id: workspacesList
|
||||||
// =====================
|
|
||||||
RowLayout {
|
|
||||||
spacing: 10
|
|
||||||
|
|
||||||
Repeater {
|
|
||||||
model: 10
|
|
||||||
|
|
||||||
Text {
|
|
||||||
required property int index
|
|
||||||
|
|
||||||
property int wsId: index + 1
|
|
||||||
property var ws: workspaceHelpers.getWorkspace(wsId)
|
|
||||||
|
|
||||||
text: wsId
|
|
||||||
|
|
||||||
color: workspaceHelpers.isWorkspaceActive(wsId) ? Colors.md3.primary : (ws ? Colors.md3.on_background : Colors.md3.on_secondary)
|
|
||||||
|
|
||||||
font {
|
|
||||||
family: Constants.fontFamily
|
|
||||||
pixelSize: Constants.fontSize
|
|
||||||
bold: true
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: Hyprland.dispatch("workspace " + wsId)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Spacer
|
// Spacer
|
||||||
|
|||||||
35
quickshell/ui/WorkspacesList.qml
Normal file
35
quickshell/ui/WorkspacesList.qml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import Quickshell.Hyprland
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
import "../constants"
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
model: 10
|
||||||
|
|
||||||
|
Text {
|
||||||
|
required property int index
|
||||||
|
|
||||||
|
property int wsId: index + 1
|
||||||
|
property var ws: workspaceHelpers.getWorkspace(wsId)
|
||||||
|
|
||||||
|
text: wsId
|
||||||
|
|
||||||
|
color: workspaceHelpers.isWorkspaceActive(wsId) ? Colors.md3.primary : (ws ? Colors.md3.on_background : Colors.md3.on_secondary)
|
||||||
|
|
||||||
|
font {
|
||||||
|
family: Constants.fontFamily
|
||||||
|
pixelSize: Constants.fontSize
|
||||||
|
bold: true
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: Hyprland.dispatch("workspace " + wsId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user