Skip to content

Commit e34bd40

Browse files
authored
feat: configurator support (#97)
1 parent 5396b3c commit e34bd40

File tree

6 files changed

+204
-15
lines changed

6 files changed

+204
-15
lines changed

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
res/config_schema.json

Cargo.lock

+122-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ constcat = "0.5"
4141
nucleo = "0.5"
4242
futures = "0.3"
4343
include_dir = "0.7.4"
44-
4544
[dependencies.libcosmic]
4645
git = "https://github.com/pop-os/libcosmic"
4746
default-features = false
@@ -68,6 +67,7 @@ branch = "watch"
6867

6968
[dev-dependencies]
7069
serial_test = "3"
70+
configurator_schema = { git = "https://github.com/cosmic-utils/configurator.git" }
7171

7272

7373
[profile.release-lto]

justfile

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ bin-dst := base-dir / 'bin' / NAME
1616
desktop-dst := share-dst / 'applications' / APPID + '.desktop'
1717
icon-dst := share-dst / 'icons/hicolor/scalable/apps' / APPID + '-symbolic.svg'
1818
env-dst := rootdir / 'etc/profile.d' / NAME + '.sh'
19+
schema-dst := share-dst / 'configurator' / APPID + '.json'
1920

2021
default: build-release
2122

@@ -32,11 +33,15 @@ install:
3233
install -Dm0644 res/env.sh {{env-dst}}
3334

3435

36+
install-schema:
37+
install -Dm0644 res/config_schema.json {{schema-dst}}
38+
3539
uninstall:
3640
rm {{bin-dst}}
3741
rm {{desktop-dst}}
3842
rm {{icon-dst}}
3943
rm {{env-dst}}
44+
rm {{schema-dst}}
4045

4146
clean:
4247
cargo clean

res/config_schema.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Config",
4+
"type": "object",
5+
"properties": {
6+
"private_mode": {
7+
"description": "Disable the clipboard manager",
8+
"default": false,
9+
"type": "boolean"
10+
},
11+
"maximum_entries_lifetime": {
12+
"description": "In second",
13+
"default": 30,
14+
"type": [
15+
"integer",
16+
"null"
17+
],
18+
"format": "uint64",
19+
"minimum": 0.0
20+
},
21+
"maximum_entries_number": {
22+
"default": 500,
23+
"type": [
24+
"integer",
25+
"null"
26+
],
27+
"format": "uint32",
28+
"minimum": 0.0
29+
},
30+
"horizontal": {
31+
"description": "Enable horizontal layout",
32+
"default": false,
33+
"type": "boolean"
34+
},
35+
"unique_session": {
36+
"description": "Reset the database at each login",
37+
"default": false,
38+
"type": "boolean"
39+
}
40+
},
41+
"X_CONFIGURATOR_SOURCE_HOME_PATH": ".config/cosmic/io.github.wiiznokes.cosmic-ext-applet-clipboard-manager/v2",
42+
"X_CONFIGURATOR_FORMAT": "cosmic_ron"
43+
}

0 commit comments

Comments
 (0)