Skip to content

Commit

Permalink
feat: add config parsing from config.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
jsonmaf1a authored Jul 14, 2024
1 parent 0f2a075 commit f0b6a4b
Show file tree
Hide file tree
Showing 16 changed files with 1,060 additions and 264 deletions.
168 changes: 85 additions & 83 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ fontdue = "0.9.2"
image = "0.25.1"
owned_ttf_parser = "0.24.0"
rayon = "1.10.0"
once_cell = "1.19.0"
regex = "1.10.5"
resvg = "0.42.0"
serde = "1.0.203"
Expand All @@ -20,4 +21,5 @@ tokio = { version = "1.38.0", features = ["full"] }
wayland-client = "0.31.3"
wayland-protocols = { version = "0.32.1", features = ["client", "wayland-client"] }
wayland-protocols-wlr = { version = "0.3.1", features = ["client", "wayland-client"] }
toml = "0.8.14"
zbus = "4.3.0"
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ cargo install --git https://github.com/noti-rs/noti/
### Running Noti

After installation, you can start Noti with:

```bash
noti
```
Expand All @@ -29,14 +30,23 @@ To enable Noti to start automatically with your Wayland session, add it to your
## Configuration

Noti can be configured via a configuration file located at `~/.config/noti/config.toml`. Below is an example configuration:

```toml
[general]
timeout = 2000
font = [ "JetBrainsMono Nerd Font", 16 ]
anchor = "top-right"
offset = [15, 15]

[display]
font = [ "JetBrainsMono Nerd", 10 ]
width = 300
height = 100
height = 150

[display]
image_size = 64

rounding = 10
padding = 8

timeout = 2000

[display.colors.normal]
background = "#1e1e2e"
Expand All @@ -46,16 +56,25 @@ foreground = "#99AEB3"
background = "#EBA0AC"
foreground = "#1E1E2E"

[display.border]
size = 4
color = "#000"

[[app]]
name = "Telegram"
[display]
name = "Telegram Desktop"
[app.display]
rounding = 8
markup = true

[app.display.body]
alignment = "center"
line_spacing = 5
```

## Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any changes. For major changes, please open an issue first to discuss what you would like to change

- Fork the repository
- Create your feature branch: `git checkout -b your-feature`
- Commit your changes: `git commit -am 'Add some feature'`
Expand Down
Loading

0 comments on commit f0b6a4b

Please sign in to comment.