mirror of
https://github.com/pnx/dotfiles
synced 2026-11-22 22:06:46 +01:00
add quickshell config
This commit is contained in:
parent
d2394e3c7a
commit
200a1e3b59
12 changed files with 435 additions and 0 deletions
21
quickshell/components/Workspace/WorkspaceButton.qml
Normal file
21
quickshell/components/Workspace/WorkspaceButton.qml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import ".."
|
||||
|
||||
Button {
|
||||
property bool indicatorTop: true
|
||||
property int indicatorHeight: 2
|
||||
property color indicatorColor
|
||||
|
||||
id: root
|
||||
|
||||
Rectangle {
|
||||
anchors {
|
||||
top: root.indicatorTop ? parent.top : undefined
|
||||
bottom: !root.indicatorTop ? parent.buttom : undefined
|
||||
}
|
||||
implicitHeight: parent.indicatorHeight
|
||||
implicitWidth: parent.implicitWidth
|
||||
color: root.indicatorColor
|
||||
}
|
||||
}
|
||||
41
quickshell/components/Workspace/WorkspaceList.qml
Normal file
41
quickshell/components/Workspace/WorkspaceList.qml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Hyprland
|
||||
|
||||
RowLayout {
|
||||
SystemPalette { id: pal }
|
||||
|
||||
property color buttonTextColor: pal.text
|
||||
property color buttonBackgroundColor: "transparent"
|
||||
property color buttonIndicatorColor: "transparent"
|
||||
property color buttonIndicatorFocusColor: pal.accent
|
||||
property color buttonIndicatorUrgentColor: pal.highlightedText
|
||||
|
||||
id: root
|
||||
spacing: 0
|
||||
|
||||
Repeater {
|
||||
model: Hyprland.workspaces
|
||||
WorkspaceButton {
|
||||
required property HyprlandWorkspace modelData
|
||||
|
||||
Layout.fillHeight: true
|
||||
|
||||
indicatorTop: false
|
||||
text: modelData.name
|
||||
implicitWidth: root.height
|
||||
|
||||
color: root.buttonBackgroundColor
|
||||
textColor: root.buttonTextColor
|
||||
indicatorColor: modelData.urgent
|
||||
? root.buttonIndicatorUrgentColor
|
||||
: (
|
||||
modelData.focused
|
||||
? root.buttonIndicatorFocusColor
|
||||
: root.buttonIndicatorColor
|
||||
)
|
||||
|
||||
onClicked: modelData.activate()
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue