Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config watch #5

Merged
merged 7 commits into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading