add ipc to switch wallpaper from cli and move Bar to bar for more naming consistency
This commit is contained in:
parent
afc3c4419c
commit
f7dd518bf2
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
Colors.qml
|
Colors.qml
|
||||||
|
./settings/config.json
|
||||||
|
|||||||
38
Colors.qml
38
Colors.qml
@ -5,25 +5,25 @@ import Quickshell
|
|||||||
Singleton {
|
Singleton {
|
||||||
id: customColors
|
id: customColors
|
||||||
// Core Backgrounds
|
// Core Backgrounds
|
||||||
readonly property color background: "#1E1E2E"
|
readonly property color background: "#161616"
|
||||||
readonly property color foreground: "#CDD6F4"
|
readonly property color foreground: "#FFFFFF"
|
||||||
readonly property color cursor: "#CDD6F4"
|
readonly property color cursor: "#6F6F6F"
|
||||||
|
|
||||||
// The 16 Colors of the Apocalypse
|
// The 16 Colors of the Apocalypse
|
||||||
readonly property color color0: "#45475A"
|
readonly property color color0: "#262626"
|
||||||
readonly property color color1: "#F38BA8"
|
readonly property color color1: "#EE5396"
|
||||||
readonly property color color2: "#A6E3A1"
|
readonly property color color2: "#42BE65"
|
||||||
readonly property color color3: "#F9E2AF"
|
readonly property color color3: "#FFE97B"
|
||||||
readonly property color color4: "#89B4FA"
|
readonly property color color4: "#33B1FF"
|
||||||
readonly property color color5: "#F5C2E7"
|
readonly property color color5: "#FF7EB6"
|
||||||
readonly property color color6: "#94E2D5"
|
readonly property color color6: "#3DDBD9"
|
||||||
readonly property color color7: "#BAC2DE"
|
readonly property color color7: "#DDE1E6"
|
||||||
readonly property color color8: "#585B70"
|
readonly property color color8: "#393939"
|
||||||
readonly property color color9: "#F38BA8"
|
readonly property color color9: "#EE5396"
|
||||||
readonly property color color10: "#A6E3A1"
|
readonly property color color10: "#42BE65"
|
||||||
readonly property color color11: "#F9E2AF"
|
readonly property color color11: "#FFE97B"
|
||||||
readonly property color color12: "#89B4FA"
|
readonly property color color12: "#33B1FF"
|
||||||
readonly property color color13: "#F5C2E7"
|
readonly property color color13: "#FF7EB6"
|
||||||
readonly property color color14: "#94E2D5"
|
readonly property color color14: "#3DDBD9"
|
||||||
readonly property color color15: "#A6ADC8"
|
readonly property color color15: "#FFFFFF"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ Item {
|
|||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: trayRow
|
id: trayRow
|
||||||
|
spacing: 5
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Repeater {
|
Repeater {
|
||||||
id: trayRepeater
|
id: trayRepeater
|
||||||
12
modules/ipc/Ipc.qml
Normal file
12
modules/ipc/Ipc.qml
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -8,22 +8,22 @@ Singleton {
|
|||||||
id: settings
|
id: settings
|
||||||
property alias config: settingsAdapter
|
property alias config: settingsAdapter
|
||||||
onConfigChanged: {
|
onConfigChanged: {
|
||||||
|
console.log('config change detected, writing adapter');
|
||||||
settingsView.writeAdapter();
|
settingsView.writeAdapter();
|
||||||
}
|
}
|
||||||
FileView {
|
FileView {
|
||||||
id: settingsView
|
id: settingsView
|
||||||
|
|
||||||
|
onAdapterUpdated: writeAdapter()
|
||||||
|
|
||||||
path: "/home/lucy/.config/quickshell/settings/config.json"
|
path: "/home/lucy/.config/quickshell/settings/config.json"
|
||||||
watchChanges: true
|
watchChanges: true
|
||||||
Component.onCompleted: {
|
|
||||||
settingsView.writeAdapter();
|
|
||||||
}
|
|
||||||
|
|
||||||
adapter: JsonAdapter {
|
adapter: JsonAdapter {
|
||||||
id: settingsAdapter
|
id: settingsAdapter
|
||||||
property var currentWall: "/home/lucy/.walls/frierensuff.png"
|
property var currentWall: ""
|
||||||
property var barHeight: 28
|
property var barHeight: 28
|
||||||
property var font: "Google Sans Code"
|
property var font: "Google Sans"
|
||||||
property var fontSize: 14
|
property var fontSize: 14
|
||||||
property var rounding: 10
|
property var rounding: 10
|
||||||
property var wallDir: "/home/lucy/.walls"
|
property var wallDir: "/home/lucy/.walls"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"barHeight": 28,
|
"barHeight": 28,
|
||||||
"currentWall": "/home/lucy/.walls/frierensuff.png",
|
"currentWall": "/home/lucy/.walls/frierensuff.png",
|
||||||
"floating": true,
|
"floating": true,
|
||||||
"font": "Google Sans Code",
|
"font": "Google Sans",
|
||||||
"fontSize": 14,
|
"fontSize": 14,
|
||||||
"paddingSides": 10,
|
"paddingSides": 10,
|
||||||
"paddingTop": 10,
|
"paddingTop": 10,
|
||||||
|
|||||||
@ -2,11 +2,13 @@
|
|||||||
import Quickshell
|
import Quickshell
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import "./settings/"
|
import "./settings/"
|
||||||
import "./modules/Bar/"
|
import "./modules/bar/"
|
||||||
import "./modules/overlays/"
|
import "./modules/overlays/"
|
||||||
|
import "./modules/ipc/"
|
||||||
|
|
||||||
ShellRoot {
|
ShellRoot {
|
||||||
id: root
|
id: root
|
||||||
Bar {}
|
Bar {}
|
||||||
Wallpaper {}
|
Wallpaper {}
|
||||||
|
Ipc {}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user