commit d0900383e3112c40e5a067dd1450b2beea18a7e6 Author: lucy Date: Thu May 14 16:17:08 2026 +0200 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dfbea23 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.qmlls.ini diff --git a/Colors.qml b/Colors.qml new file mode 100644 index 0000000..6729df2 --- /dev/null +++ b/Colors.qml @@ -0,0 +1,26 @@ +pragma Singleton +import QtQuick + +QtObject { + // --- The Backgrounds (Darkest to Lightest) --- + readonly property color base00: "#282828" // Default Background + readonly property color base01: "#3c3836" // Lighter Background (Status bars, panels) + readonly property color base02: "#504945" // Selection Background + readonly property color base03: "#665c54" // Comments, Invisibles, line highlighting + + // --- The Foregrounds (Darkest to Lightest) --- + readonly property color base04: "#928374" // Dark Foreground (Used for status bars) + readonly property color base05: "#ebdbb2" // Default Foreground, Caret + readonly property color base06: "#fbf1c7" // Light Foreground (Rarely used) + readonly property color base07: "#f9f5d7" // Lightest Foreground + + // --- The Accent Colors --- + readonly property color base08: "#cc241d" // Red (Variables, errors) + readonly property color base09: "#d65d0e" // Orange (Integers, booleans, constants) + readonly property color base0A: "#d79921" // Yellow (Classes, search text bg, warnings) + readonly property color base0B: "#98971a" // Green (Strings, success states) + readonly property color base0C: "#689d6a" // Cyan (Support, regex, escape chars) + readonly property color base0D: "#458588" // Blue (Functions, methods, headings) + readonly property color base0E: "#b16286" // Purple/Mauve (Keywords, storage, selectors) + readonly property color base0F: "#9d0006" // Brown/Flamingo (Deprecated, embedded tags) +} diff --git a/modules/bar/ActiveWindow.qml b/modules/bar/ActiveWindow.qml new file mode 100644 index 0000000..3bb588a --- /dev/null +++ b/modules/bar/ActiveWindow.qml @@ -0,0 +1,22 @@ +import Quickshell.Widgets +import Quickshell.Hyprland +import QtQuick +import qs +import qs.widgets + +ClippingWrapperRectangle { + id: root + clip: true + color: Colors.base01 + required property int barHeight + readonly property double vertMargin: barHeight / 4 - 4 + topMargin: vertMargin + bottomMargin: vertMargin + leftMargin: 8 + rightMargin: 8 + child: StyledText { + text: Hyprland.activeToplevel?.title ?? "Desktop" + width: Math.min(implicitWidth, 50) + elide: Text.ElideRight + } +} diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml new file mode 100644 index 0000000..2c72f86 --- /dev/null +++ b/modules/bar/Bar.qml @@ -0,0 +1,38 @@ +import QtQuick +import QtQuick.Layouts +import Quickshell + +import qs + +Variants { + model: Quickshell.screens + delegate: PanelWindow { + id: root + required property var modelData + screen: modelData + anchors { + top: true + left: true + right: true + } + implicitHeight: 30 + color: Colors.base00 + RowLayout { + id: leftLayout + spacing: 5 + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: 10 + Ws { + barScreen: root.modelData + barHeight: root.implicitHeight + } + ActiveWindow { + barHeight: root.implicitHeight + } + } + RowLayout { + id: rightLayout + } + } +} diff --git a/modules/bar/Ws.qml b/modules/bar/Ws.qml new file mode 100644 index 0000000..9b9ff61 --- /dev/null +++ b/modules/bar/Ws.qml @@ -0,0 +1,36 @@ +pragma ComponentBehavior: Bound +import Quickshell +import Quickshell.Hyprland +import Quickshell.Widgets +import QtQuick +import QtQuick.Layouts +import qs +import qs.widgets + +WrapperRectangle { + id: root + required property ShellScreen barScreen + required property int barHeight + readonly property double vertMargin: barHeight / 4 - 4 + color: Colors.base01 + topMargin: vertMargin + bottomMargin: vertMargin + leftMargin: 8 + rightMargin: 8 + RowLayout { + Repeater { + id: wsRepeater + model: Hyprland.workspaces + delegate: WrapperRectangle { + id: wsWrapper + color: 'transparent' + visible: modelData.monitor == Hyprland.monitorFor(root.barScreen) + required property var modelData + child: StyledText { + text: wsWrapper.modelData.id + opacity: wsWrapper.modelData.active ? 1.0 : 0.6 + } + } + } + } +} diff --git a/shell.qml b/shell.qml new file mode 100644 index 0000000..f7e18de --- /dev/null +++ b/shell.qml @@ -0,0 +1,6 @@ +import Quickshell +import qs.modules.bar + +ShellRoot { + Bar {} +} diff --git a/widgets/StyledText.qml b/widgets/StyledText.qml new file mode 100644 index 0000000..17cc97f --- /dev/null +++ b/widgets/StyledText.qml @@ -0,0 +1,8 @@ +import QtQuick +import qs + +Text { + font.family: "Adwaita Mono Nerd Font" + font.pixelSize: 12 + color: Colors.base07 +}