initial commit
This commit is contained in:
commit
d0900383e3
7 changed files with 137 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
.qmlls.ini
|
||||
26
Colors.qml
Normal file
26
Colors.qml
Normal file
|
|
@ -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)
|
||||
}
|
||||
22
modules/bar/ActiveWindow.qml
Normal file
22
modules/bar/ActiveWindow.qml
Normal file
|
|
@ -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
|
||||
}
|
||||
}
|
||||
38
modules/bar/Bar.qml
Normal file
38
modules/bar/Bar.qml
Normal file
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
36
modules/bar/Ws.qml
Normal file
36
modules/bar/Ws.qml
Normal file
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
6
shell.qml
Normal file
6
shell.qml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import Quickshell
|
||||
import qs.modules.bar
|
||||
|
||||
ShellRoot {
|
||||
Bar {}
|
||||
}
|
||||
8
widgets/StyledText.qml
Normal file
8
widgets/StyledText.qml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import QtQuick
|
||||
import qs
|
||||
|
||||
Text {
|
||||
font.family: "Adwaita Mono Nerd Font"
|
||||
font.pixelSize: 12
|
||||
color: Colors.base07
|
||||
}
|
||||
Loading…
Reference in a new issue