diff --git a/.gitignore b/.gitignore index b57c86c..c024beb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ Colors.qml +./settings/config.json diff --git a/Colors.qml b/Colors.qml index aba1af7..c1ba3b8 100644 --- a/Colors.qml +++ b/Colors.qml @@ -5,25 +5,25 @@ import Quickshell Singleton { id: customColors // Core Backgrounds - readonly property color background: "#1E1E2E" - readonly property color foreground: "#CDD6F4" - readonly property color cursor: "#CDD6F4" + readonly property color background: "#161616" + readonly property color foreground: "#FFFFFF" + readonly property color cursor: "#6F6F6F" // 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" + readonly property color color0: "#262626" + readonly property color color1: "#EE5396" + readonly property color color2: "#42BE65" + readonly property color color3: "#FFE97B" + readonly property color color4: "#33B1FF" + readonly property color color5: "#FF7EB6" + readonly property color color6: "#3DDBD9" + readonly property color color7: "#DDE1E6" + readonly property color color8: "#393939" + readonly property color color9: "#EE5396" + readonly property color color10: "#42BE65" + readonly property color color11: "#FFE97B" + readonly property color color12: "#33B1FF" + readonly property color color13: "#FF7EB6" + readonly property color color14: "#3DDBD9" + readonly property color color15: "#FFFFFF" } diff --git a/modules/Bar/Bar.qml b/modules/bar/Bar.qml similarity index 100% rename from modules/Bar/Bar.qml rename to modules/bar/Bar.qml diff --git a/modules/Bar/Battery.qml b/modules/bar/Battery.qml similarity index 100% rename from modules/Bar/Battery.qml rename to modules/bar/Battery.qml diff --git a/modules/Bar/Clock.qml b/modules/bar/Clock.qml similarity index 100% rename from modules/Bar/Clock.qml rename to modules/bar/Clock.qml diff --git a/modules/Bar/PowerProfiles.qml b/modules/bar/PowerProfiles.qml similarity index 100% rename from modules/Bar/PowerProfiles.qml rename to modules/bar/PowerProfiles.qml diff --git a/modules/Bar/SystemTray.qml b/modules/bar/SystemTray.qml similarity index 95% rename from modules/Bar/SystemTray.qml rename to modules/bar/SystemTray.qml index 574ecec..1e7d383 100644 --- a/modules/Bar/SystemTray.qml +++ b/modules/bar/SystemTray.qml @@ -11,6 +11,7 @@ Item { Row { id: trayRow + spacing: 5 anchors.verticalCenter: parent.verticalCenter Repeater { id: trayRepeater diff --git a/modules/Bar/Title.qml b/modules/bar/Title.qml similarity index 100% rename from modules/Bar/Title.qml rename to modules/bar/Title.qml diff --git a/modules/Bar/TrayItem.qml b/modules/bar/TrayItem.qml similarity index 100% rename from modules/Bar/TrayItem.qml rename to modules/bar/TrayItem.qml diff --git a/modules/Bar/Volume.qml b/modules/bar/Volume.qml similarity index 100% rename from modules/Bar/Volume.qml rename to modules/bar/Volume.qml diff --git a/modules/Bar/Workspaces.qml b/modules/bar/Workspaces.qml similarity index 100% rename from modules/Bar/Workspaces.qml rename to modules/bar/Workspaces.qml diff --git a/modules/ipc/Ipc.qml b/modules/ipc/Ipc.qml new file mode 100644 index 0000000..2beeca3 --- /dev/null +++ b/modules/ipc/Ipc.qml @@ -0,0 +1,12 @@ +import Quickshell +import QtQuick +import Quickshell.Io +import "../../settings/" + +IpcHandler { + id: ipcHandler + target: "settings" + function setWall(newWall: string): void { + Settings.config.currentWall = newWall; + } +} diff --git a/settings/Settings.qml b/settings/Settings.qml index 02dd731..91073db 100644 --- a/settings/Settings.qml +++ b/settings/Settings.qml @@ -8,22 +8,22 @@ Singleton { id: settings property alias config: settingsAdapter onConfigChanged: { + console.log('config change detected, writing adapter'); settingsView.writeAdapter(); } FileView { id: settingsView + onAdapterUpdated: writeAdapter() + path: "/home/lucy/.config/quickshell/settings/config.json" watchChanges: true - Component.onCompleted: { - settingsView.writeAdapter(); - } adapter: JsonAdapter { id: settingsAdapter - property var currentWall: "/home/lucy/.walls/frierensuff.png" + property var currentWall: "" property var barHeight: 28 - property var font: "Google Sans Code" + property var font: "Google Sans" property var fontSize: 14 property var rounding: 10 property var wallDir: "/home/lucy/.walls" diff --git a/settings/config.json b/settings/config.json index e4c5765..cf4fd94 100644 --- a/settings/config.json +++ b/settings/config.json @@ -2,7 +2,7 @@ "barHeight": 28, "currentWall": "/home/lucy/.walls/frierensuff.png", "floating": true, - "font": "Google Sans Code", + "font": "Google Sans", "fontSize": 14, "paddingSides": 10, "paddingTop": 10, diff --git a/shell.qml b/shell.qml index 79d7067..89177ab 100644 --- a/shell.qml +++ b/shell.qml @@ -2,11 +2,13 @@ import Quickshell import QtQuick import "./settings/" -import "./modules/Bar/" +import "./modules/bar/" import "./modules/overlays/" +import "./modules/ipc/" ShellRoot { id: root Bar {} Wallpaper {} + Ipc {} }