Skip to content

Commit

Permalink
feat: configurator support
Browse files Browse the repository at this point in the history
  • Loading branch information
wiiznokes committed Oct 23, 2024
1 parent 5396b3c commit 10428da
Show file tree
Hide file tree
Showing 5 changed files with 203 additions and 15 deletions.
136 changes: 122 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ constcat = "0.5"
nucleo = "0.5"
futures = "0.3"
include_dir = "0.7.4"

[dependencies.libcosmic]
git = "https://github.com/pop-os/libcosmic"
default-features = false
Expand All @@ -68,6 +67,7 @@ branch = "watch"

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


[profile.release-lto]
Expand Down
5 changes: 5 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ bin-dst := base-dir / 'bin' / NAME
desktop-dst := share-dst / 'applications' / APPID + '.desktop'
icon-dst := share-dst / 'icons/hicolor/scalable/apps' / APPID + '-symbolic.svg'
env-dst := rootdir / 'etc/profile.d' / NAME + '.sh'
schema-dst := share-dst / 'configurator' / APPID + '.json'

default: build-release

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


install-schema:
install -Dm0644 res/config_schema.json {{schema-dst}}

uninstall:
rm {{bin-dst}}
rm {{desktop-dst}}
rm {{icon-dst}}
rm {{env-dst}}
rm {{schema-dst}}

clean:
cargo clean
Expand Down
43 changes: 43 additions & 0 deletions res/config_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Config",
"type": "object",
"properties": {
"private_mode": {
"description": "Disable the clipboard manager",
"default": false,
"type": "boolean"
},
"maximum_entries_lifetime": {
"description": "In second",
"default": 30,
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"maximum_entries_number": {
"default": 500,
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"horizontal": {
"description": "Enable horizontal layout",
"default": false,
"type": "boolean"
},
"unique_session": {
"description": "Reset the database at each login",
"default": false,
"type": "boolean"
}
},
"X_CONFIGURATOR_SOURCE_HOME_PATH": ".config/cosmic/io.github.wiiznokes.cosmic-ext-applet-clipboard-manager/v2",
"X_CONFIGURATOR_FORMAT": "cosmic_ron"
}
Loading

0 comments on commit 10428da

Please sign in to comment.