init commit
This commit is contained in:
commit
e4c4dfbc78
1
.qmlls.ini
Symbolic link
1
.qmlls.ini
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/run/user/1000/quickshell/vfs/1b52f593d70d8ccef6fc467cf768a2ef/.qmlls.ini
|
||||||
59
ThemeLoader.qml
Normal file
59
ThemeLoader.qml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
pragma ComponentBehavior: Bound
|
||||||
|
pragma Singleton
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Io
|
||||||
|
|
||||||
|
Singleton {
|
||||||
|
id: root
|
||||||
|
property alias colors: loader
|
||||||
|
|
||||||
|
FileView {
|
||||||
|
id: loader
|
||||||
|
|
||||||
|
// create color properties, initialize them to black and helper color array
|
||||||
|
property var colors: text().split('\n')
|
||||||
|
property var base00: "#000000"
|
||||||
|
property var base01: "#000000"
|
||||||
|
property var base02: "#000000"
|
||||||
|
property var base03: "#000000"
|
||||||
|
property var base04: "#000000"
|
||||||
|
property var base05: "#000000"
|
||||||
|
property var base06: "#000000"
|
||||||
|
property var base07: "#000000"
|
||||||
|
property var base08: "#000000"
|
||||||
|
property var base09: "#000000"
|
||||||
|
property var base0A: "#000000"
|
||||||
|
property var base0B: "#000000"
|
||||||
|
property var base0C: "#000000"
|
||||||
|
property var base0D: "#000000"
|
||||||
|
property var base0E: "#000000"
|
||||||
|
property var base0F: "#000000"
|
||||||
|
property bool ready: false
|
||||||
|
|
||||||
|
path: "file:///home/lucy/.config/stylix/palette.json"
|
||||||
|
|
||||||
|
onLoaded: {
|
||||||
|
// assign values to colors after the json file has been loaded to avoid errors
|
||||||
|
base00 = "#" + colors[1].split(':')[1].slice(2, 8);
|
||||||
|
base01 = "#" + colors[2].split(':')[1].slice(2, 8);
|
||||||
|
base02 = "#" + colors[3].split(':')[1].slice(2, 8);
|
||||||
|
base03 = "#" + colors[4].split(':')[1].slice(2, 8);
|
||||||
|
base04 = "#" + colors[5].split(':')[1].slice(2, 8);
|
||||||
|
base05 = "#" + colors[6].split(':')[1].slice(2, 8);
|
||||||
|
base06 = "#" + colors[7].split(':')[1].slice(2, 8);
|
||||||
|
base07 = "#" + colors[8].split(':')[1].slice(2, 8);
|
||||||
|
base08 = "#" + colors[9].split(':')[1].slice(2, 8);
|
||||||
|
base09 = "#" + colors[10].split(':')[1].slice(2, 8);
|
||||||
|
base0A = "#" + colors[11].split(':')[1].slice(2, 8);
|
||||||
|
base0B = "#" + colors[12].split(':')[1].slice(2, 8);
|
||||||
|
base0C = "#" + colors[13].split(':')[1].slice(2, 8);
|
||||||
|
base0D = "#" + colors[14].split(':')[1].slice(2, 8);
|
||||||
|
base0E = "#" + colors[15].split(':')[1].slice(2, 8);
|
||||||
|
base0F = "#" + colors[16].split(':')[1].slice(2, 8);
|
||||||
|
ready = true;
|
||||||
|
}
|
||||||
|
adapter: JsonAdapter {
|
||||||
|
id: themeAdapter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
0
Widgets/CIcon.qml
Normal file
0
Widgets/CIcon.qml
Normal file
10
Widgets/CText.qml
Normal file
10
Widgets/CText.qml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import Quickshell
|
||||||
|
import QtQuick
|
||||||
|
import qs
|
||||||
|
import qs.settings
|
||||||
|
|
||||||
|
Text {
|
||||||
|
font.family: Settings.config.font
|
||||||
|
font.pixelSize: Settings.config.fontSize
|
||||||
|
color: ThemeLoader.colors.base05
|
||||||
|
}
|
||||||
15
modules/Bar/Bar.qml
Normal file
15
modules/Bar/Bar.qml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import Quickshell
|
||||||
|
import QtQuick
|
||||||
|
import qs.settings
|
||||||
|
import qs
|
||||||
|
|
||||||
|
PanelWindow {
|
||||||
|
id: root
|
||||||
|
anchors {
|
||||||
|
top: true
|
||||||
|
left: true
|
||||||
|
right: true
|
||||||
|
}
|
||||||
|
implicitHeight: Settings.config.barHeight
|
||||||
|
color: ThemeLoader.colors.base00
|
||||||
|
}
|
||||||
22
settings/Settings.qml
Normal file
22
settings/Settings.qml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
pragma Singleton
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Io
|
||||||
|
|
||||||
|
Singleton {
|
||||||
|
id: root
|
||||||
|
property alias config: settingsAdapter
|
||||||
|
FileView {
|
||||||
|
id: settingsView
|
||||||
|
path: "file:///home/lucy/.config/qs.json"
|
||||||
|
onAdapterUpdated: writeAdapter()
|
||||||
|
onDataChanged: writeAdapter()
|
||||||
|
adapter: JsonAdapter {
|
||||||
|
id: settingsAdapter
|
||||||
|
property int barHeight: 40
|
||||||
|
property int rounding
|
||||||
|
property bool floating
|
||||||
|
property string font
|
||||||
|
property string fontSize
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user