Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d0841d2c9b | |||
| af2deabca4 | |||
| 1edb82a057 | |||
| 1a77043a71 | |||
| 69e20c89ee | |||
| 549025dfe7 | |||
| fface10081 |
@@ -14,6 +14,14 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Cache Cargo registry and build
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
target
|
||||||
|
key: cargo-${{ hashFiles('Cargo.lock') }}
|
||||||
|
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cargo fmt --check
|
run: cargo fmt --check
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name: release
|
|||||||
"on":
|
"on":
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "v*.*.*"
|
- "v[0-9]*.[0-9]*.[0-9]*"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
release_url="https://gitea.forust.xyz/api/v1/repos/forust/gosleep/releases"
|
release_url="https://gitea.forust.xyz/api/v1/repos/forust/gosleep/releases"
|
||||||
existing="$(curl -fsS \
|
existing="$(curl -fsS \
|
||||||
"${release_url}/tags/${tag}" \
|
"${release_url}/tags/${tag}" \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" || true)"
|
-H "Authorization: token ${GITEA_TOKEN}")" || existing='{}'
|
||||||
release_id="$(printf '%s' "$existing" | jq -r '.id // empty')"
|
release_id="$(printf '%s' "$existing" | jq -r '.id // empty')"
|
||||||
|
|
||||||
if [ -z "$release_id" ]; then
|
if [ -z "$release_id" ]; then
|
||||||
@@ -112,14 +112,15 @@ jobs:
|
|||||||
-X DELETE "${release_url}/${release_id}/assets/${asset_id}" \
|
-X DELETE "${release_url}/${release_id}/assets/${asset_id}" \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}"
|
-H "Authorization: token ${GITEA_TOKEN}"
|
||||||
fi
|
fi
|
||||||
|
encoded="$(printf '%s' "$name" | jq -sRr @uri)"
|
||||||
curl -fsS \
|
curl -fsS \
|
||||||
-X POST "${release_url}/${release_id}/assets?name=${name}" \
|
-X POST "${release_url}/${release_id}/assets?name=${encoded}" \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
-F "attachment=@${asset}"
|
-F "attachment=@${asset}"
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: gosleep-timer-linux-amd64
|
name: gosleep-timer-linux-amd64
|
||||||
path: dist/*
|
path: dist/*
|
||||||
|
|||||||
@@ -4,6 +4,41 @@ All notable changes to this project are documented here.
|
|||||||
|
|
||||||
The project uses semantic versioning. Tags are formatted as `vMAJOR.MINOR.PATCH`.
|
The project uses semantic versioning. Tags are formatted as `vMAJOR.MINOR.PATCH`.
|
||||||
|
|
||||||
|
## [1.3.1] - 2026-07-12
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added `mute_input` action to toggle microphone mute via `wpctl`/`pactl`.
|
||||||
|
- Added `inhibit_sleep` config option to run `systemd-inhibit` during the timer.
|
||||||
|
- Added `monitor` action with backend selection (hyprland, niri, sway, kde, gnome, x11) to turn off displays.
|
||||||
|
- Added `notify` action to send desktop notification on timer finish.
|
||||||
|
- Added `suspend`, `hibernate`, `hybrid-sleep` power modes.
|
||||||
|
- Added workspace backend support for `sway` and `i3`.
|
||||||
|
- Added custom `workspace command` override.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Lock action refactored with backend selection: `loginctl`, `hyprlock`, `swaylock`, `i3lock`, `gnome`, `kde`, `xscreensaver`.
|
||||||
|
- Editor command now correctly splits `VISUAL`/`EDITOR` into program and arguments.
|
||||||
|
- Timer action loop checks the stop flag between actions.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- History now records `partial` status when some actions fail instead of bailing entirely.
|
||||||
|
|
||||||
|
## [1.2.2] - 2026-07-05
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Updated Ratatui to 0.30.2 to remove the unmaintained `paste` transitive dependency and pick up the fixed `lru` dependency line.
|
||||||
|
- Replaced deprecated `serde_yaml`/`unsafe-libyaml` with the pure-Rust `noyalib` YAML parser.
|
||||||
|
|
||||||
|
## [1.2.1] - 2026-07-05
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Updated the TUI running screen to center a larger termdown-style ASCII time-left display above progress and post-countdown commands.
|
||||||
|
|
||||||
## [1.2.0] - 2026-07-05
|
## [1.2.0] - 2026-07-05
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
@@ -42,6 +77,9 @@ The project uses semantic versioning. Tags are formatted as `vMAJOR.MINOR.PATCH`
|
|||||||
- Added YAML configuration, CLI `init`, `preview`, and `run` commands.
|
- Added YAML configuration, CLI `init`, `preview`, and `run` commands.
|
||||||
- Added Gitea CI and tag-based release workflows.
|
- Added Gitea CI and tag-based release workflows.
|
||||||
|
|
||||||
|
[1.3.1]: https://gitea.forust.xyz/forust/gosleep/releases/tag/v1.3.1
|
||||||
|
[1.2.2]: https://gitea.forust.xyz/forust/gosleep/releases/tag/v1.2.2
|
||||||
|
[1.2.1]: https://gitea.forust.xyz/forust/gosleep/releases/tag/v1.2.1
|
||||||
[1.2.0]: https://gitea.forust.xyz/forust/gosleep/releases/tag/v1.2.0
|
[1.2.0]: https://gitea.forust.xyz/forust/gosleep/releases/tag/v1.2.0
|
||||||
[1.1.3]: https://gitea.forust.xyz/forust/gosleep/releases/tag/v1.1.3
|
[1.1.3]: https://gitea.forust.xyz/forust/gosleep/releases/tag/v1.1.3
|
||||||
[1.1.2]: https://gitea.forust.xyz/forust/gosleep/releases/tag/v1.1.2
|
[1.1.2]: https://gitea.forust.xyz/forust/gosleep/releases/tag/v1.1.2
|
||||||
|
|||||||
Generated
+1107
-174
File diff suppressed because it is too large
Load Diff
+6
-4
@@ -1,11 +1,13 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "gosleep-timer"
|
name = "gosleep-timer"
|
||||||
version = "1.2.0"
|
version = "1.3.1"
|
||||||
|
authors = ["forust"]
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.85"
|
rust-version = "1.88"
|
||||||
description = "Terminal sleep timer for Linux desktop actions, with YAML config and a Rust TUI"
|
description = "Terminal sleep timer for Linux desktop actions, with YAML config and a Rust TUI"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://gitea.forust.xyz/forust/gosleep"
|
repository = "https://gitea.forust.xyz/forust/gosleep"
|
||||||
|
homepage = "https://gitea.forust.xyz/forust/gosleep"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
keywords = ["timer", "tui", "linux", "desktop", "sleep"]
|
keywords = ["timer", "tui", "linux", "desktop", "sleep"]
|
||||||
categories = ["command-line-utilities"]
|
categories = ["command-line-utilities"]
|
||||||
@@ -18,9 +20,9 @@ path = "src/main.rs"
|
|||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
clap = { version = "4.5", features = ["derive"] }
|
clap = { version = "4.5", features = ["derive"] }
|
||||||
crossterm = "0.29"
|
crossterm = "0.29"
|
||||||
ratatui = "0.29"
|
ratatui = "0.30.2"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_yaml = "0.9"
|
noyalib = "0.0.13"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Rust TUI sleep timer for Linux desktop actions.
|
|||||||
- Single Rust binary, independent of Python.
|
- Single Rust binary, independent of Python.
|
||||||
- Ratatui/Crossterm terminal UI.
|
- Ratatui/Crossterm terminal UI.
|
||||||
- YAML config at `~/.config/gosleep-timer/config.yaml` or `$XDG_CONFIG_HOME/gosleep-timer/config.yaml`.
|
- YAML config at `~/.config/gosleep-timer/config.yaml` or `$XDG_CONFIG_HOME/gosleep-timer/config.yaml`.
|
||||||
- CLI commands for initialization, preview, and direct timer runs.
|
- CLI commands for init, status, validate, edit, preview, run, history, and stats.
|
||||||
- Time-left display and progress bar.
|
- Time-left display and progress bar.
|
||||||
- Wrapped command preview for smaller terminals.
|
- Wrapped command preview for smaller terminals.
|
||||||
- Linux desktop action support for niri, Hyprland, KDE, playerctl, brightnessctl/light, PipeWire/PulseAudio, systemd, and custom shell commands.
|
- Linux desktop action support for niri, Hyprland, KDE, playerctl, brightnessctl/light, PipeWire/PulseAudio, systemd, and custom shell commands.
|
||||||
@@ -145,6 +145,8 @@ actions:
|
|||||||
value: 30
|
value: 30
|
||||||
mute:
|
mute:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
mute_input:
|
||||||
|
enabled: false
|
||||||
lock:
|
lock:
|
||||||
enabled: false
|
enabled: false
|
||||||
command: loginctl lock-session
|
command: loginctl lock-session
|
||||||
@@ -224,7 +226,8 @@ Release tags must match the package version:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
git tag -a vMAJOR.MINOR.PATCH -m "gosleep-timer vMAJOR.MINOR.PATCH"
|
git tag -a vMAJOR.MINOR.PATCH -m "gosleep-timer vMAJOR.MINOR.PATCH"
|
||||||
git push origin main --tags
|
git push origin main
|
||||||
|
git push origin vMAJOR.MINOR.PATCH
|
||||||
```
|
```
|
||||||
|
|
||||||
## Releases
|
## Releases
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ version=1.1.4
|
|||||||
Update:
|
Update:
|
||||||
|
|
||||||
- `Cargo.toml`: `package.version`
|
- `Cargo.toml`: `package.version`
|
||||||
- `Cargo.lock`: package version, regenerated by Cargo
|
- `Cargo.lock`: run `cargo build --release` (without `--locked`) to regenerate
|
||||||
- `VERSION`
|
- `VERSION`
|
||||||
- `CHANGELOG.md`
|
- `CHANGELOG.md`
|
||||||
|
|
||||||
|
|||||||
+626
-88
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user