This project is a remake of indicator-stickynotes using pop-os/libcosmic and targeting the Cosmic DE
There are two components in sticky-notes
- notes-service is a core application to deal with notes and settings
- notes-applet is an applet in Cosmic Panel providing main menu for notes-service
Other details is to be provided when version 0.1.0 has come
- rust. The recommended way to install with rustup is a good choice:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- casey/just. Because the project sticky-notes is built with cargo and rust compiler the good choice to install just is
cargo install just
- library xkbcommon (Otherwise the compilation error will occur: "The system library
xkbcommonrequired by cratesmithay-client-toolkitwas not found"). The command to install the library in Ubuntu or Pop!_OS
sudo apt install libxkbcommon-dev
- Open terminal
- Create working directory to host the project code and temporary files. Example
mkdir ~/build
cd ~/build
- Clone the project
git clone https://github.com/0xAAE/sticky-notes.git
cd sticky-notes
- Build release version
just release
- (optional) Run to test everything is good in terminal
just run-service
Stop notes-service in terminal with Ctrl-C
- Install sticky-notes
sudo just install
The path to configuration is ~/.config/cosmic/com.github.aae/sticky_notes/v1.
Each value is stored in a separate file having following names.
❗ highly desired
To provide a full pathname to notes-service binary file. It is used by the notes-applet to automatically launch the notes-service if it is not detected after start.
Value type: string (i.e. surrounded with double quotes)
Example: "/home/user/.bin/notes-service"
Default value: "/usr/local/bin/notes-service"
optional
When notes-applet starts it connects the notes-service. If connecting fails the applet launches the service (defined in service_bin), then it waits some time and retries to connect after that again. This parameter defines in milliseconds how long the applet will wait before retrying to connect the service.
Value type: integer
Example: 2_000
Default value: 1_000
optional
To provide a pathname to indicator-stickynotes database file relative to user's home directory. It is used for importing notes when
- no database detected on startup
- command
Importselected in notes-applet menu
Value type: string (i.e. surrounded with double quotes)
Example: ".config/indicator-stickynotes"
Default value: ".config/indicator-stickynotes"
optional
Overrides the width and height of the window to restore notes.
Value type: integer
Example: 1024
Default values: restore_notes_width is 480 and restore_notes_height is 400
optional
Overrides the width and height of the window to edit selected note style.
Value type: integer
Example: 1024
Default values: edit_style_width is 480 and edit_style_height is 800
optional
Overrides the width and height of the window to display application info.
Value type: integer
Example: 1024
Default values: about_width is 480 and about_height is 840
optional
Overrides the minimum width and the minimum height of the note sticky window. If user manually violates minimum values (making window tiny) they will be accepted until the next start. The next start the minimum values will be applied. If default values are too large, one might override them setting these parameters.
Value type: integer
Example: 32
Default values: note_min_width is 64 and mote_min_height is 64
optional
Overrides the size of icons in the sticky window toolbar.
Value type: integer
Example: 32
Default value: 16
❗ auto generated
Contains sticky-notes database.
Value type: JSON string (i.e. in double quotes).
❗ Edit carefully otherwise it won't be read properly. It is highly recommended to edit notes in sticky windows and settings
There are two components must start
- notes-service
- notes-applet
☝️ The notes-applet automatically launches notes-service if it is not detected and if service_bin parameter is set in config. User might setup service_bin once and require to launch only notes-applet then.
A justfile is included by default for the casey/just command runner.
justdoes the same as
just check
just debug
just rund-applet
just debugbuilds both notes-applet and notes-service with debug profilejust releasebuilds both notes-applet and notes-service with release profilejust checkruns clippy on the project to check for linter warningscargo testinvokes all unit tests
just rund-servicebuilds and runs the notes-service with debug profilejust rund-appletbuilds and runs the notes-applet with debug profilejust run-servicebuilds and runs the notes-service with release profilejust run-appletbuilds and runs the notes-applet with release profile
sudo just installinstalls the project into the systemsudo just uninstalluninstalls the project from the system