added quickshell config
This commit is contained in:
44
dotfiles/.config/quickshell/modules/bar/Workspaces.qml
Normal file
44
dotfiles/.config/quickshell/modules/bar/Workspaces.qml
Normal file
@@ -0,0 +1,44 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Hyprland
|
||||
import "../../config"
|
||||
|
||||
RowLayout {
|
||||
id: root
|
||||
property var screen
|
||||
|
||||
spacing: 4
|
||||
|
||||
Repeater {
|
||||
model: Hyprland.workspaces
|
||||
|
||||
delegate: Rectangle {
|
||||
id: pill
|
||||
required property var modelData
|
||||
visible: modelData.monitor && root.screen && modelData.monitor.name === root.screen.name
|
||||
|
||||
implicitWidth: 26
|
||||
implicitHeight: 22
|
||||
radius: Appearance.radiusSmall
|
||||
color: modelData.urgent ? Colors.urgent
|
||||
: modelData.active ? Colors.primary
|
||||
: "transparent"
|
||||
|
||||
Behavior on color { ColorAnimation { duration: Appearance.animationDuration } }
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: modelData.name
|
||||
font.family: Appearance.fontFamily
|
||||
font.pixelSize: Appearance.fontSizeSmall
|
||||
color: modelData.active ? Colors.primaryText : Colors.foreground
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: Hyprland.dispatch("workspace " + modelData.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user