Skip to content

Commit 8758ed0

Browse files
committed
Add settings file
1 parent 558417d commit 8758ed0

File tree

16 files changed

+76
-31
lines changed

16 files changed

+76
-31
lines changed

.config/quickshell/Settings.qml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
pragma Singleton
2+
3+
import QtQuick
4+
import Quickshell
5+
6+
Singleton {
7+
readonly property var colors: QtObject {
8+
readonly property color bg: "#aa000000"
9+
readonly property color fg: "#b0b4bc"
10+
readonly property color muted: "#aa4e4e4e"
11+
readonly property color dark: Qt.darker(muted, 1.5)
12+
readonly property color cyan: "#0db9d7"
13+
readonly property color red: "#cc0000"
14+
readonly property color blue: "#7aa2f7"
15+
readonly property color yellow: "#ffd700"
16+
readonly property color green: "#9ece6a"
17+
readonly property color purple: "#bf00ff"
18+
}
19+
20+
readonly property var workspaces: QtObject {
21+
readonly property string one: ""
22+
readonly property string two: ""
23+
readonly property string three: ""
24+
readonly property string four: ""
25+
readonly property string five: ""
26+
readonly property string six: "󰉕"
27+
readonly property string seven: ""
28+
readonly property string eight: ""
29+
readonly property string nine: ""
30+
readonly property string ten: ""
31+
}
32+
33+
readonly property string font: "Hack Nerd Font"
34+
35+
readonly property int fontSize: 14
36+
readonly property int radius: 8
37+
readonly property int duration: 250
38+
39+
readonly property int barHeight: 30
40+
readonly property int barExtraPadding: 16
41+
42+
}

.config/quickshell/shell.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import Quickshell
22
import QtQuick
33

4+
import qs.topbar
5+
46
ShellRoot {
57

68
Component.onCompleted: {
Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,43 @@ import Quickshell.Services.UPower
99
import QtQuick
1010
import QtQuick.Layouts
1111

12-
import qs.components
12+
import "../" // Settings.qml
13+
import "components"
1314

1415
PanelWindow {
1516
id: root
1617

17-
property color colBg: "#aa000000"
18-
property color colFg: "#b0b4bc"
19-
property color colMuted: "#aa4e4e4e"
20-
property color colDark: Qt.darker(colMuted, 1.5)
21-
property color colCyan: "#0db9d7"
22-
property color colRed: "#cc0000"
23-
property color colBlue: "#7aa2f7"
24-
property color colYellow: "#ffd700"
25-
property color colGreen: "#9ece6a"
26-
property color colPurple: "#bf00ff"
27-
28-
property string ws01: ""
29-
property string ws02: ""
30-
property string ws03: ""
31-
property string ws04: ""
32-
property string ws05: ""
33-
property string ws06: "󰉕"
34-
property string ws07: ""
35-
property string ws08: ""
36-
property string ws09: ""
37-
property string ws10: ""
38-
39-
property string fontFamily: "Hack Nerd Font"
40-
41-
property int fontSize: 14
42-
property var screen: Quickshell.screens[0]
43-
property int cornerRadius: 8
44-
property int barHeight: 30
45-
property int extraPadding: 16
46-
property int animDuration: 250
18+
property color colBg: Settings.colors.bg ?? "#aa000000"
19+
property color colFg: Settings.colors.fg ?? "#b0b4bc"
20+
property color colMuted: Settings.colors.muted ?? "#aa4e4e4e"
21+
property color colDark: Settings.colors.dark ?? Qt.darker(colMuted, 1.5)
22+
property color colCyan: Settings.colors.cyan ?? "#0db9d7"
23+
property color colRed: Settings.colors.red ?? "#cc0000"
24+
property color colBlue: Settings.colors.blue ?? "#7aa2f7"
25+
property color colYellow: Settings.colors.yellow ?? "#ffd700"
26+
property color colGreen: Settings.colors.green ?? "#9ece6a"
27+
property color colPurple: Settings.colors.purple ?? "#bf00ff"
28+
29+
property string ws01: Settings.workspaces.one ?? ""
30+
property string ws02: Settings.workspaces.two ?? ""
31+
property string ws03: Settings.workspaces.three ?? ""
32+
property string ws04: Settings.workspaces.four ?? ""
33+
property string ws05: Settings.workspaces.five ?? ""
34+
property string ws06: Settings.workspaces.six ?? "󰉕"
35+
property string ws07: Settings.workspaces.seven ?? ""
36+
property string ws08: Settings.workspaces.eight ?? ""
37+
property string ws09: Settings.workspaces.tine ?? ""
38+
property string ws10: Settings.workspaces.ten ?? ""
39+
40+
property string fontFamily: Settings.font ?? "Hack Nerd Font"
41+
property int fontSize: Settings.fontSize ?? 14
42+
43+
property int cornerRadius: Settings.radius ?? 8
44+
property int barHeight: Settings.barHeight ?? 30
45+
property int extraPadding: Settings.barExtraPadding ?? 16
46+
property int animDuration: Settings.duration ?? 250
4747

48+
property var screen: Quickshell.screens[0]
4849
property bool ecoMode: false
4950

5051
implicitWidth: screen.width - extraPadding
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)