summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md7
-rw-r--r--config/BarConfig.qml1
-rw-r--r--config/Config.qml2
-rw-r--r--config/GeneralConfig.qml10
-rw-r--r--modules/bar/popouts/Audio.qml2
-rw-r--r--modules/launcher/items/CalcItem.qml2
-rw-r--r--modules/launcher/services/Apps.qml2
7 files changed, 21 insertions, 5 deletions
diff --git a/README.md b/README.md
index 6ae452a..0771a5c 100644
--- a/README.md
+++ b/README.md
@@ -151,12 +151,17 @@ All configuration options are in `~/.config/caelestia/shell.json`.
```json
{
+ "general": {
+ "apps": {
+ "terminal": ["foot"],
+ "audio": ["pavucontrol"]
+ }
+ },
"background": {
"enabled": true
},
"bar": {
"dragThreshold": 20,
- "externalAudioProgram": ["pavucontrol"],
"persistent": true,
"showOnHover": true,
"status": {
diff --git a/config/BarConfig.qml b/config/BarConfig.qml
index 4801f1a..498b2f5 100644
--- a/config/BarConfig.qml
+++ b/config/BarConfig.qml
@@ -4,7 +4,6 @@ JsonObject {
property bool persistent: true
property bool showOnHover: true
property int dragThreshold: 20
- property list<string> externalAudioProgram: ["pavucontrol"]
property Workspaces workspaces: Workspaces {}
property Status status: Status {}
property Sizes sizes: Sizes {}
diff --git a/config/Config.qml b/config/Config.qml
index 8756a12..ea7f3f4 100644
--- a/config/Config.qml
+++ b/config/Config.qml
@@ -7,6 +7,7 @@ import Quickshell.Io
Singleton {
id: root
+ property alias general: adapter.general
property alias background: adapter.background
property alias bar: adapter.bar
property alias border: adapter.border
@@ -30,6 +31,7 @@ Singleton {
JsonAdapter {
id: adapter
+ property GeneralConfig general: GeneralConfig {}
property BackgroundConfig background: BackgroundConfig {}
property BarConfig bar: BarConfig {}
property BorderConfig border: BorderConfig {}
diff --git a/config/GeneralConfig.qml b/config/GeneralConfig.qml
new file mode 100644
index 0000000..4e2a5fb
--- /dev/null
+++ b/config/GeneralConfig.qml
@@ -0,0 +1,10 @@
+import Quickshell.Io
+
+JsonObject {
+ property Apps apps: Apps {}
+
+ component Apps: JsonObject {
+ property list<string> terminal: ["foot"]
+ property list<string> audio: ["pavucontrol"]
+ }
+}
diff --git a/modules/bar/popouts/Audio.qml b/modules/bar/popouts/Audio.qml
index 7afacb4..6714eb8 100644
--- a/modules/bar/popouts/Audio.qml
+++ b/modules/bar/popouts/Audio.qml
@@ -43,7 +43,7 @@ ColumnLayout {
StateLayer {
function onClicked(): void {
root.wrapper.hasCurrent = false;
- Quickshell.execDetached(["app2unit", "--", ...Config.bar.externalAudioProgram]);
+ Quickshell.execDetached(["app2unit", "--", ...Config.general.apps.audio]);
}
}
diff --git a/modules/launcher/items/CalcItem.qml b/modules/launcher/items/CalcItem.qml
index 2e3c901..84c66a7 100644
--- a/modules/launcher/items/CalcItem.qml
+++ b/modules/launcher/items/CalcItem.qml
@@ -111,7 +111,7 @@ Item {
color: Colours.palette.m3onTertiary
function onClicked(): void {
- Quickshell.execDetached(["app2unit", "--", "foot", "fish", "-C", `exec qalc -i '${root.math}'`]);
+ Quickshell.execDetached(["app2unit", "--", ...Config.general.apps.terminal, "fish", "-C", `exec qalc -i '${root.math}'`]);
root.list.visibilities.launcher = false;
}
}
diff --git a/modules/launcher/services/Apps.qml b/modules/launcher/services/Apps.qml
index bfa2f87..b6999fd 100644
--- a/modules/launcher/services/Apps.qml
+++ b/modules/launcher/services/Apps.qml
@@ -13,7 +13,7 @@ Searcher {
function launch(entry: DesktopEntry): void {
if (entry.runInTerminal)
Quickshell.execDetached({
- command: ["app2unit", "--", "foot", `${Quickshell.shellDir}/assets/wrap_term_launch.sh`, ...entry.command],
+ command: ["app2unit", "--", ...Config.general.apps.terminal, `${Quickshell.shellDir}/assets/wrap_term_launch.sh`, ...entry.command],
workingDirectory: entry.workingDirectory
});
else