Skip to content

Commit

Permalink
Merge pull request #5 from amadejkastelic/config-watch
Browse files Browse the repository at this point in the history
Config watch
  • Loading branch information
amadejkastelic authored Sep 14, 2024
2 parents d018498 + 3e1007d commit 8ea87c4
Show file tree
Hide file tree
Showing 12 changed files with 420 additions and 109 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

name: Rustfmt

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Test

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

env:
CARGO_TERM_COLOR: always
Expand Down
181 changes: 179 additions & 2 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hyprlux"
version = "0.1.1"
version = "0.1.2"
edition = "2021"

[dependencies]
Expand All @@ -10,6 +10,7 @@ hyprland = { git = "https://github.com/hyprland-community/hyprland-rs", branch =
"silent",
] }
log = "0.4.22"
notify = "6.1.1"
regex = "1.10.6"
serde = { version = "1.0", features = ["derive"] }
strfmt = "0.2.4"
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ And configure it:
programs.hyprlux = {
enable = true;
systemd = {
enable = true;
target = "hyprland-session.target";
};
night_light = {
enabled = true;
start_time = "22:00";
Expand All @@ -51,16 +56,12 @@ And configure it:
];
};
}
```
Add it to your exec-once to automatically start it with Hyprland:
```nix
exec-once=hyprlux > /tmp/hyprlux.log 2>&1
```
## Building
Run `cargo build`
## TODO
- [ ] Toggle night light based on location and time of day
- [ ] Allow config reload
- [x] Allow config reload
- [ ] Allow stop and resume
- [ ] Publish to aur and crate
- [x] Add nix module systemd service support
Loading

0 comments on commit 8ea87c4

Please sign in to comment.