This commit is contained in:
lucy 2026-06-04 12:02:39 +02:00
commit 7d2d2b93ff
3 changed files with 17 additions and 80 deletions

62
2
View file

@ -1,62 +0,0 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Hyprland
import Quickshell.Widgets
import QtQuick
import QtQuick.Layouts
import qs
import qs.widgets
import qs.settings
Rectangle {
id: root
required property ShellScreen barScreen
required property double moduleHeight
property HyprlandMonitor hyprBarScreen: Hyprland.monitorFor(root.barScreen)
radius: Config.rounding
color: 'transparent'
implicitWidth: wsLayout.implicitWidth
implicitHeight: moduleHeight
RowLayout {
id: wsLayout
anchors.centerIn: root
anchors.horizontalCenter: parent.horizontalCenter
spacing: 0
Repeater {
id: wsRepeater
model: 11
delegate: Rectangle {
id: wsWrapper
implicitHeight: root.moduleHeight
implicitWidth: 16
parent: wsLayout
color: 'transparent'
radius: Config.rounding
visible: Hyprland.workspaces?.values[modelData].monitor == root.hyprBarScreen
required property var modelData
StyledText {
anchors.centerIn: parent
text: wsWrapper.modelData
color: Hyprland.workspaces?.values[modelData].active ? Colors.base0D : Colors.base04
opacity: parent.modelData.active ? 1.0 : 0.5
}
Behavior on implicitWidth {
NumberAnimation {
easing.type: Easing.InOutBack
easing.amplitude: 2
duration: 400
easing.overshoot: 2
}
}
MouseArea {
id: clickHandler
anchors.fill: parent
acceptedButtons: Qt.LeftButton
cursorShape: Qt.PointingHandCursor
onClicked: parent.modelData.activate()
}
}
}
}
}

View file

@ -3,24 +3,24 @@ import QtQuick
QtObject {
// --- The Backgrounds (Darkest to Lightest) ---
readonly property color base00: "#272e33" // Default Background
readonly property color base01: "#2e383c" // Lighter Background (Status bars, panels)
readonly property color base02: "#414b50" // Selection Background
readonly property color base03: "#859289" // Comments, Invisibles, line highlighting
readonly property color base00: "#1e1e2e" // Default Background
readonly property color base01: "#181825" // Lighter Background (Status bars, panels)
readonly property color base02: "#313244" // Selection Background
readonly property color base03: "#45475a" // Comments, Invisibles, line highlighting
// --- The Foregrounds (Darkest to Lightest) ---
readonly property color base04: "#9da9a0" // Dark Foreground (Used for status bars)
readonly property color base05: "#d3c6aa" // Default Foreground, Caret
readonly property color base06: "#edeada" // Light Foreground (Rarely used)
readonly property color base07: "#fffbef" // Lightest Foreground
readonly property color base04: "#585b70" // Dark Foreground (Used for status bars)
readonly property color base05: "#cdd6f4" // Default Foreground, Caret
readonly property color base06: "#f5e0dc" // Light Foreground (Rarely used)
readonly property color base07: "#b4befe" // Lightest Foreground
// --- The Accent Colors ---
readonly property color base08: "#e67e80" // Red (Variables, errors)
readonly property color base09: "#e69875" // Orange (Integers, booleans, constants)
readonly property color base0A: "#dbbc7f" // Yellow (Classes, search text bg, warnings)
readonly property color base0B: "#a7c080" // Green (Strings, success states)
readonly property color base0C: "#83c092" // Cyan (Support, regex, escape chars)
readonly property color base0D: "#7fbbb3" // Blue (Functions, methods, headings)
readonly property color base0E: "#d699b6" // Purple/Mauve (Keywords, storage, selectors)
readonly property color base0F: "#9da9a0" // Brown/Flamingo (Deprecated, embedded tags)
readonly property color base08: "#f38ba8" // Red (Variables, errors)
readonly property color base09: "#fab387" // Orange (Integers, booleans, constants)
readonly property color base0A: "#f9e2af" // Yellow (Classes, search text bg, warnings)
readonly property color base0B: "#a6e3a1" // Green (Strings, success states)
readonly property color base0C: "#94e2d5" // Cyan (Support, regex, escape chars)
readonly property color base0D: "#89b4fa" // Blue (Functions, methods, headings)
readonly property color base0E: "#cba6f7" // Purple/Mauve (Keywords, storage, selectors)
readonly property color base0F: "#f2cdcd" // Brown/Flamingo (Deprecated, embedded tags)
}

View file

@ -41,8 +41,7 @@ Rectangle {
StyledText {
anchors.centerIn: parent
text: wsWrapper.modelData.id > 10 ? wsWrapper.modelData.id > 20 ? wsWrapper.modelData.id - 20 : wsWrapper.modelData.id - 10 : wsWrapper.modelData.id
color: wsWrapper.active ? Colors.base0D : Colors.base02
opacity: wsWrapper.vacant ? wsWrapper.active ? 1.0 : 0.5 : 1.0
color: wsWrapper.active ? Colors.base0D : Colors.base04
font.bold: wsWrapper.active
}
MouseArea {