Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
989a40a
adds cli and find_devices/list option
Mar 15, 2024
70fe494
rename find_devices::list -> setup::wizard
Mar 15, 2024
b6ee98f
document wizard in help
Mar 15, 2024
544fe02
replaces monitoring device constants with those from config file
Mar 15, 2024
97b6ac6
use event paths from online_devices
Mar 15, 2024
3c0e967
renames
Mar 15, 2024
c89cabd
use evdev sys interface instead of evdev command
Mar 19, 2024
77a7585
block devices based also on name + fixes crash when stealing devices
Mar 19, 2024
a148924
fix serialize by replacing toml with ron
Mar 19, 2024
d37b785
remove duplicates from wizard + use name before unique name
Mar 19, 2024
b759118
adds install and remove commands
Mar 20, 2024
92e2ec7
fix work duration used where it should be break duration
Apr 7, 2024
3e2d8f0
refactor check_inputs.rs
Apr 7, 2024
d69c8ef
improve ParseError error msg
Apr 7, 2024
ba04386
refactor: remove error macro
Apr 8, 2024
022e911
expand doc comment
Apr 8, 2024
5bef0ef
Replaces panics with returning an error
Apr 8, 2024
ef1616c
implement install and remove via service-install lib
Apr 9, 2024
657cf5f
Merge branch 'remove_evtest_dep' into installer
Apr 9, 2024
0a58cc0
adds audit and release CI
Apr 9, 2024
4b6498b
commit to test CI
Apr 9, 2024
e7413d6
Merge pull request #1 from dvdsk/test_ci
Apr 9, 2024
4c03b43
fix missing crosscompile script by inlining it in workflow
Apr 9, 2024
3b19553
Merge branch 'CI'
Apr 9, 2024
58b8e5c
commit to test CI
Apr 9, 2024
9e7c93f
Merge pull request #2 from dvdsk/test_ci
Apr 9, 2024
dceb5c6
fix CI workflow syntax
Apr 9, 2024
b63f89d
Merge branch 'CI'
Apr 9, 2024
a271ead
Merge branch 'main' of github.com:dvdsk/break-enforcer-s
Apr 9, 2024
96a7fc4
commit to test CI
Apr 9, 2024
6499193
Merge pull request #3 from dvdsk/test_ci
Apr 9, 2024
021ec3c
remove unused targets from CI matrix
Apr 9, 2024
7376082
Merge branch 'CI'
Apr 9, 2024
7cd1108
commit to test CI
Apr 9, 2024
7df40a8
Merge pull request #4 from dvdsk/test_ci
Apr 9, 2024
76e85fb
remove unused targets from CI matrix
Apr 9, 2024
4eee681
Merge branch 'CI'
Apr 9, 2024
3f98787
commit to test CI
Apr 9, 2024
509f16c
Merge pull request #5 from dvdsk/test_ci
Apr 9, 2024
4b543e9
Merge branch 'main' of github.com:dvdsk/break-enforcer-s
Apr 9, 2024
2649144
fix tagging not working in CI
Apr 9, 2024
9b17b15
Merge branch 'CI'
Apr 9, 2024
337ec9f
fix notify text + use eventpath as unique device id
Apr 9, 2024
52a67b0
clippy pedantic
Apr 9, 2024
782592e
Merge branch 'remove_evtest_dep'
Apr 9, 2024
8e8e7d8
fix release action using wrong file
Apr 9, 2024
d3c81ae
remove dbg
Apr 9, 2024
425b593
Merge branch 'remove_evtest_dep'
Apr 9, 2024
9ca5da5
Merge branch 'CI'
Apr 9, 2024
b8459c4
fixes two more swaps of break and work time
Apr 10, 2024
1e05cbf
more clippy pedantic
Apr 10, 2024
4453fd9
fixes lock now working by opening event_path only once
Apr 10, 2024
36f24be
reverts incorrect breaktime/worktime swap
Apr 10, 2024
6569dae
removed device io watcher removed + clippy pedantic
Apr 10, 2024
4c007b1
Merge branch 'remove_evtest_dep'
Apr 10, 2024
6652679
fix arguments used by installer
Apr 11, 2024
820d7c8
Merge branch 'installer'
Apr 11, 2024
a582d94
make installer overwrite any existing binary
Apr 11, 2024
3b05c57
Merge branch 'installer'
Apr 11, 2024
e834a99
refactor run command to seperate module
Apr 12, 2024
081fb52
fixes parse error in cli
Apr 12, 2024
4d5c7f4
removes arg validation, didnt make sense
Apr 12, 2024
1f4fc75
removes arg validation, didnt make sense
Apr 12, 2024
83482f9
Merge branch 'remove_evtest_dep'
Apr 12, 2024
45844aa
Merge pull request #5 from dvdsk/main
Apr 12, 2024
0a57383
adds basic readme
Apr 12, 2024
cbabc4e
mouse stays blocked after program exits
Apr 12, 2024
40bdad7
fixes inotify returning early, fixes not all filters scanned when dev…
Apr 13, 2024
9cd21f0
clippy pedantic
Apr 13, 2024
3a68675
version increment
Apr 13, 2024
60bbfd2
fixes crash if grace>workdur
Apr 13, 2024
e910bb6
disallow single number duration without unit postfix
Apr 13, 2024
bf0b3f2
adds integrations (write status to file)
Apr 14, 2024
822e74f
bring service name in line with convension
Apr 14, 2024
0e534c5
fix CI
Apr 14, 2024
622881a
add idle time before break accounting + fix changelog
Apr 15, 2024
15a3f51
Merge branch 'main' of github.com:evavh/break-enforcer-s
Apr 15, 2024
fc73764
break time in file integration text
Apr 21, 2024
e4a6295
fixes lock warning notification
Apr 21, 2024
95b4637
new release
Apr 21, 2024
83477f1
before removing dbus integration
May 28, 2024
bd867bc
adds tcp based api to get idle time
May 31, 2024
8bf6eb1
fix tcp api server skipping perfectly fine ports to bind on
May 31, 2024
d3cab2b
adds options to status command
May 31, 2024
daf720b
status command now prints error and reconnects
Jun 1, 2024
308aa2c
Add default config path hint to help menu
evavh Jul 5, 2024
5c4350a
adds sound notification via aplay
Jul 26, 2024
d914031
increment version
Jul 26, 2024
fb37035
fix installer not setting up lock warnings
Jul 30, 2024
0e54afc
increment version
Jul 30, 2024
3cc1801
fix audio notification firing continuesly
Aug 4, 2024
dbf7180
fix outdated nightly compiler + port to new stabalized api
Aug 4, 2024
0ca91cb
switch to detailed tui installer
Aug 4, 2024
a5be0f8
Set rustfmt line length to 80 and autoformat
evavh Oct 11, 2024
0f90cfd
Add optional long break after cumulative work time
evavh Oct 11, 2024
29e90e4
Add long break reset to waiting for user activity
evavh Oct 12, 2024
45f004a
Add waiting for long break reset to status
evavh Oct 13, 2024
288d548
Add tracing for long break variables
evavh Oct 18, 2024
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
17 changes: 17 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Security audit
on:
pull_request:
# complemented with branch protection on main this will
# need to complete successfully before we auto deploy from main
branches: main
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v1.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
85 changes: 85 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Build and Release Stable

on:
push:
# complemented with branch protection on main this will
# run on any pull request merge
branches: main

env:
CARGO_TERM_COLOR: always

permissions:
contents: write

jobs:
compile:
strategy:
matrix:
target:
- x86_64-unknown-linux-musl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
target: ${{ matrix.target }}
toolchain: stable

- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
compilers/
key: ${{ runner.os }}-compile-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}

- name: add target
run: rustup target add ${{ matrix.target }}

- name: compile
run: cargo build --target ${{ matrix.target }} --release

- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: target/${{ matrix.target }}/release/break-enforcer

release:
runs-on: ubuntu-latest
needs:
- compile
strategy:
matrix:
target:
- x86_64-unknown-linux-musl
steps:
- uses: actions/checkout@v4
- name: Download the binaries
uses: actions/download-artifact@v4
- name: find tag
id: tag
run: |
VERSION=$(grep '^version =' Cargo.toml | head -n 1 | awk '{print $3}' | tr -d '"' | tr -d "\n")
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Found version: $VERSION"
- name: rename bins
run: |
suffix=`echo ${{ matrix.target }} | cut -d "-" -f 1`
mv ${{ matrix.target }}/break-enforcer break-enforcer_$suffix
- name: changelog as release body
run: cat CHANGELOG.md | awk '/^## /{if (++c == 2) {exit}} c == 1' | tail -n +2 > ${{ github.workspace }}-CHANGELOG.txt
- name: Release
uses: "softprops/action-gh-release@v1"
with:
body_path: ${{ github.workspace }}-CHANGELOG.txt
prerelease: false
name: Release ${{ env.VERSION }}
files: |
break-enforcer_*
tag_name: ${{ env.VERSION }}
12 changes: 12 additions & 0 deletions .github/workflows/schedualed-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Schedualled security audit
on:
schedule:
- cron: '0 0 * * *'
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v1.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

## [0.3.0] - 2024-04-21

### Changes
- Time idle before a break is subtracted from the break time
- User is notified if staying idle for longer will reset the work period

## [0.2.2] - 2024-04-15

### Added
- Status file, use it to get the current status of `break_enforcer`. Useful in
a bar of a window manager or when writing a widget.

### Fixes
- No longer crashing if grace/warn for lock duration smaller then work duration

### Changes
- Durations consisting of a single number without postfix unit or a colon in
front are no longer allowed. These where usually the result of a user
forgetting the unit. This led to way shorter break/work times then intended
- Grace duration is now `lock_warning` and is optional (omitting it will prevent
a notification being send when the break/lock is close.

## [0.2.1] - 2024-04-13

### Fixed
- Removed and then readded devices are locked when appropriate

## [0.2.0] - 2024-04-09

### Added
- Installer and Uninstaller (remove). Sets up a service to run on boot.

## [0.1.0]
Init release
Loading