refactor: implement component-based architecture for enhanced maintainability
- Reorganize directory structure into core/, features/, and themes/ - Colocate application Nix logic, configs, scripts, and theme overrides - Implement 'Inversion of Control' for theming: apps now pull theme-specific layouts - Update flake.nix and shared library paths to match the new structure - Document the new Feature-Centric architecture in README.md
This commit is contained in:
99
themes/engine/sddm/nomarchy/Main.qml
Normal file
99
themes/engine/sddm/nomarchy/Main.qml
Normal file
@@ -0,0 +1,99 @@
|
||||
import QtQuick 2.0
|
||||
import SddmComponents 2.0
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
width: 640
|
||||
height: 480
|
||||
color: "#000000"
|
||||
|
||||
property string currentUser: userModel.lastUser
|
||||
property int sessionIndex: {
|
||||
for (var i = 0; i < sessionModel.rowCount(); i++) {
|
||||
var name = (sessionModel.data(sessionModel.index(i, 0), Qt.DisplayRole) || "").toString()
|
||||
if (name.toLowerCase().indexOf("uwsm") !== -1)
|
||||
return i
|
||||
}
|
||||
return Math.max(0, sessionModel.lastIndex)
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: sddm
|
||||
function onLoginFailed() {
|
||||
errorMessage.text = "Login failed"
|
||||
password.text = ""
|
||||
password.focus = true
|
||||
}
|
||||
function onLoginSucceeded() {
|
||||
errorMessage.text = ""
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
anchors.centerIn: parent
|
||||
spacing: root.height * 0.04
|
||||
width: parent.width
|
||||
|
||||
Image {
|
||||
source: "logo.svg"
|
||||
width: root.width * 0.35
|
||||
height: Math.round(width * sourceSize.height / sourceSize.width)
|
||||
fillMode: Image.PreserveAspectFit
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
Row {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: root.width * 0.007
|
||||
|
||||
Text {
|
||||
text: "\uf023"
|
||||
color: "#ffffff"
|
||||
font.family: "JetBrainsMono Nerd Font"
|
||||
font.pixelSize: root.height * 0.025
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: root.width * 0.17
|
||||
height: root.height * 0.04
|
||||
color: "#000000"
|
||||
border.color: "#ffffff"
|
||||
border.width: 1
|
||||
clip: true
|
||||
|
||||
TextInput {
|
||||
id: password
|
||||
anchors.fill: parent
|
||||
anchors.margins: root.height * 0.008
|
||||
verticalAlignment: TextInput.AlignVCenter
|
||||
echoMode: TextInput.Password
|
||||
font.family: "JetBrainsMono Nerd Font"
|
||||
font.pixelSize: root.height * 0.02
|
||||
font.letterSpacing: root.height * 0.004
|
||||
passwordCharacter: "\u2022"
|
||||
color: "#ffffff"
|
||||
focus: true
|
||||
|
||||
Keys.onPressed: {
|
||||
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
|
||||
sddm.login(root.currentUser, password.text, root.sessionIndex)
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: errorMessage
|
||||
text: ""
|
||||
color: "#f7768e"
|
||||
font.family: "JetBrainsMono Nerd Font"
|
||||
font.pixelSize: root.height * 0.018
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: password.forceActiveFocus()
|
||||
}
|
||||
64
themes/engine/sddm/nomarchy/logo.svg
Normal file
64
themes/engine/sddm/nomarchy/logo.svg
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="157.40488mm"
|
||||
height="162.48518mm"
|
||||
viewBox="0 0 157.40488 162.48518"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
xml:space="preserve"
|
||||
inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
|
||||
sodipodi:docname="icon.svg"
|
||||
inkscape:export-filename="logo.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="0.82803284"
|
||||
inkscape:cx="216.175"
|
||||
inkscape:cy="452.27675"
|
||||
inkscape:window-width="1914"
|
||||
inkscape:window-height="1012"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer1"><inkscape:page
|
||||
x="0"
|
||||
y="-1.1741086e-21"
|
||||
width="157.40488"
|
||||
height="162.48518"
|
||||
id="page2"
|
||||
margin="0"
|
||||
bleed="0" /></sodipodi:namedview><defs
|
||||
id="defs1" /><g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-28.332214,-25.599269)"><g
|
||||
id="g4"
|
||||
transform="translate(3.1953242,-22.686801)"
|
||||
style="fill:#000088;fill-opacity:1"><path
|
||||
style="fill:#000088;fill-opacity:1;stroke-width:0.264583"
|
||||
d="M 25.136891,85.823024 25.557592,210.77125 88.452409,174.38061 67.417351,160.49747 57.110174,166.38729 V 105.80633 Z"
|
||||
id="path1" /><path
|
||||
style="fill:#000088;fill-opacity:1;stroke-width:0.264583"
|
||||
d="M 67.728991,112.41131 182.54178,185.60757 153.16137,202.85259 67.830432,148.17947 Z"
|
||||
id="path2" /><path
|
||||
style="fill:#000088;fill-opacity:1;stroke-width:0.264583"
|
||||
d="M 139.74857,145.88014 140.00405,110.4959 54.800856,56.333749 25.675926,73.32329 Z"
|
||||
id="path3" /><path
|
||||
style="fill:#000088;fill-opacity:1;stroke-width:0.264583"
|
||||
d="M 182.2863,172.70573 V 48.286069 l -62.59305,36.406166 20.82177,13.668277 10.21927,-5.74834 0.12774,60.165978 z"
|
||||
id="path4" /></g></g></svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
7
themes/engine/sddm/nomarchy/metadata.desktop
Normal file
7
themes/engine/sddm/nomarchy/metadata.desktop
Normal file
@@ -0,0 +1,7 @@
|
||||
[SddmGreeterTheme]
|
||||
Name=Nomarchy
|
||||
Description=Minimal terminal-style login theme matching the Limine bootloader aesthetic
|
||||
Author=Nomarchy
|
||||
Type=sddm-theme
|
||||
Interface=Qt5
|
||||
Version=1.0
|
||||
1
themes/engine/sddm/nomarchy/theme.conf
Normal file
1
themes/engine/sddm/nomarchy/theme.conf
Normal file
@@ -0,0 +1 @@
|
||||
[General]
|
||||
Reference in New Issue
Block a user