From 093be827d4f85ce3184c9a8590bcb2fed05adef0 Mon Sep 17 00:00:00 2001 From: lucy Date: Wed, 14 Jan 2026 23:18:18 +0100 Subject: [PATCH] base layout for new shell --- .qmlls.ini | 1 + Colors.qml | 29 ++++++++++++++++++++++++++ modules/Bar/Bar.qml | 42 ++++++++++++++++++++++++++++++++++++++ modules/Bar/Workspaces.qml | 0 qmldir | 1 + reusables/CustomText.qml | 9 ++++++++ settings/Settings.qml | 31 ++++++++++++++++++++++++++++ settings/config.json | 7 +++++++ settings/qmldir | 1 + shell.qml | 9 ++++++++ 10 files changed, 130 insertions(+) create mode 120000 .qmlls.ini create mode 100644 Colors.qml create mode 100644 modules/Bar/Bar.qml create mode 100644 modules/Bar/Workspaces.qml create mode 100644 qmldir create mode 100644 reusables/CustomText.qml create mode 100644 settings/Settings.qml create mode 100644 settings/config.json create mode 100644 settings/qmldir create mode 100644 shell.qml diff --git a/.qmlls.ini b/.qmlls.ini new file mode 120000 index 0000000..2d149fd --- /dev/null +++ b/.qmlls.ini @@ -0,0 +1 @@ +/run/user/1000/quickshell/vfs/1b52f593d70d8ccef6fc467cf768a2ef/.qmlls.ini \ No newline at end of file diff --git a/Colors.qml b/Colors.qml new file mode 100644 index 0000000..aba1af7 --- /dev/null +++ b/Colors.qml @@ -0,0 +1,29 @@ +pragma Singleton +import QtQuick +import Quickshell + +Singleton { + id: customColors + // Core Backgrounds + readonly property color background: "#1E1E2E" + readonly property color foreground: "#CDD6F4" + readonly property color cursor: "#CDD6F4" + + // The 16 Colors of the Apocalypse + readonly property color color0: "#45475A" + readonly property color color1: "#F38BA8" + readonly property color color2: "#A6E3A1" + readonly property color color3: "#F9E2AF" + readonly property color color4: "#89B4FA" + readonly property color color5: "#F5C2E7" + readonly property color color6: "#94E2D5" + readonly property color color7: "#BAC2DE" + readonly property color color8: "#585B70" + readonly property color color9: "#F38BA8" + readonly property color color10: "#A6E3A1" + readonly property color color11: "#F9E2AF" + readonly property color color12: "#89B4FA" + readonly property color color13: "#F5C2E7" + readonly property color color14: "#94E2D5" + readonly property color color15: "#A6ADC8" +} diff --git a/modules/Bar/Bar.qml b/modules/Bar/Bar.qml new file mode 100644 index 0000000..0fa8552 --- /dev/null +++ b/modules/Bar/Bar.qml @@ -0,0 +1,42 @@ +import Quickshell +import QtQuick +import "../../settings/" +import "../../" +import "../../reusables/" +import QtQuick.Layouts + +PanelWindow { + id: root + color: Colors.background + anchors { + top: true + left: true + right: true + } + implicitHeight: Settings.config.barHeight + Row { + id: leftStuff + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + CustomText { + text: "workspaces here" + } + } + + Row { + id: centerStuff + anchors.centerIn: parent + CustomText { + text: "windowtitle here" + } + } + + Row { + id: rightStuff + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + CustomText { + text: "status shit goes here" + } + } +} diff --git a/modules/Bar/Workspaces.qml b/modules/Bar/Workspaces.qml new file mode 100644 index 0000000..e69de29 diff --git a/qmldir b/qmldir new file mode 100644 index 0000000..b7cddb9 --- /dev/null +++ b/qmldir @@ -0,0 +1 @@ +singleton Colors 1.0 Colors.qml diff --git a/reusables/CustomText.qml b/reusables/CustomText.qml new file mode 100644 index 0000000..196d4d0 --- /dev/null +++ b/reusables/CustomText.qml @@ -0,0 +1,9 @@ +import QtQuick +import "../settings/" +import "../" + +Text { + color: Colors.foreground + font.family: Settings.config.font + font.pixelSize: Settings.config.fontSize +} diff --git a/settings/Settings.qml b/settings/Settings.qml new file mode 100644 index 0000000..d0c9588 --- /dev/null +++ b/settings/Settings.qml @@ -0,0 +1,31 @@ +pragma Singleton +pragma ComponentBehavior: Bound +import QtQuick +import Quickshell +import Quickshell.Io + +Singleton { + id: settings + property alias config: settingsAdapter + onConfigChanged: { + settingsView.writeAdapter(); + } + FileView { + id: settingsView + + path: "/home/lucy/.config/quickshell/settings/config.json" + watchChanges: true + Component.onCompleted: { + settingsView.writeAdapter(); + } + + adapter: JsonAdapter { + id: settingsAdapter + property var barHeight: 28 + property var font: "JetBrainsMono Nerd Font" + property var fontSize: 14 + property var rounding: 10 + property var wallDir: "/home/lucy/.walls" + } + } +} diff --git a/settings/config.json b/settings/config.json new file mode 100644 index 0000000..4cd70c0 --- /dev/null +++ b/settings/config.json @@ -0,0 +1,7 @@ +{ + "barHeight": 28, + "font": "JetBrainsMono Nerd Font", + "fontSize": 14, + "rounding": 10, + "wallDir": "/home/lucy/.walls" +} diff --git a/settings/qmldir b/settings/qmldir new file mode 100644 index 0000000..8f02997 --- /dev/null +++ b/settings/qmldir @@ -0,0 +1 @@ +singleton Settings 1.0 Settings.qml diff --git a/shell.qml b/shell.qml new file mode 100644 index 0000000..8f55e84 --- /dev/null +++ b/shell.qml @@ -0,0 +1,9 @@ +import Quickshell +import QtQuick +import "./settings/" +import "./modules/Bar/" + +ShellRoot { + id: root + Bar {} +}