Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
f964aa1
make dependencies readable in debian/control
archisman-panigrahi May 5, 2025
ff7cb0b
Automatically create a .deb file in GitHub release (#717)
archisman-panigrahi May 9, 2025
dd97369
Translated using Weblate (Chinese (Traditional Han script))
May 10, 2025
b587450
Merge branch 'origin/master' into Weblate.
weblate May 11, 2025
459ae9f
Translated using Weblate (Estonian)
May 12, 2025
ca052da
Translated using Weblate (Russian)
stokito May 11, 2025
b193551
Translated using Weblate (German)
ChrisB9 May 15, 2025
65ee965
utility: fix module detection
deltragon May 21, 2025
331a073
Merge pull request #718 from deltragon/fix-module-detection
deltragon May 21, 2025
2ccad0d
Translated using Weblate (Arabic)
May 21, 2025
5783f19
Merge branch 'origin/master' into Weblate.
weblate May 22, 2025
619d11d
Translated using Weblate (Chinese (Traditional Han script))
PeterDaveHello May 23, 2025
38c91ef
Translated using Weblate (Dutch)
Vistaus May 26, 2025
d4e9968
fix ci: call apt-get update before install
deltragon May 30, 2025
de504da
Merge pull request #721 from deltragon/fix-ci
deltragon May 30, 2025
b1cd67f
Translated using Weblate (Czech)
vikdevelop Jun 17, 2025
1824a2c
Merge branch 'origin/master' into Weblate.
weblate Jun 18, 2025
a5c33ed
Translated using Weblate (Chinese (Simplified Han script))
lalala-233 Jun 19, 2025
9fa7ab4
Translated using Weblate (Lithuanian)
welaq Jun 19, 2025
89b0ff8
Translated using Weblate (Danish)
lalala-233 Jun 19, 2025
7d18316
Translated using Weblate (Portuguese)
jviriato Jun 20, 2025
a3a244d
README: clarify instructions for installing from source
deltragon Jun 23, 2025
c444e44
Merge pull request #728 from deltragon/readme-install-from-source
deltragon Jun 23, 2025
91f47ef
typing: import gettext instead of global function
deltragon Jul 26, 2024
229b29d
Merge pull request #706 from deltragon/typing-gettext
deltragon Jun 23, 2025
8f656ac
style: use default theme for reset button for dark mode
deltragon Apr 24, 2025
80c509e
Merge pull request #707 from deltragon/style-reset-dark-mode
deltragon Jun 25, 2025
688fa5b
trayicon: do not block main thread with animation
deltragon Jun 25, 2025
e49e420
Merge pull request #729 from deltragon/trayicon-no-block
deltragon Jun 25, 2025
f23b26d
break screen shortcuts: implement on wayland
deltragon Jul 5, 2024
fd43b15
x11: disable shortcuts when buttons are disabled
deltragon May 9, 2025
001e83a
wayland: warn when custom shortcuts are set
deltragon May 9, 2025
37548f9
Merge pull request #716 from deltragon/gtk4-shortcuts
deltragon Jun 25, 2025
92c0380
Translated using Weblate (Tamil)
Jul 3, 2025
3c1103d
Merge branch 'origin/master' into Weblate.
weblate Jul 4, 2025
45a1138
Translated using Weblate (Italian)
Jul 12, 2025
8b9434f
utility: add name to worker threads
deltragon May 21, 2025
6a0bfa8
remove dead code
deltragon May 22, 2025
985aade
smartpause: ext_idle_notify: make more robust, log if unsupported
deltragon May 21, 2025
c0cb1b2
smartpause: refactor, separate out idle time implementations into cla…
deltragon May 29, 2025
396b18c
Merge pull request #720 from deltragon/smartpause-rework
deltragon Jul 23, 2025
213fa4a
pytest: test model.Break and model.BreakQueue
deltragon Aug 22, 2024
a610d24
add github workflow for pytest
deltragon Jun 30, 2025
5cc20c2
test_model: add types
deltragon Jun 30, 2025
158a59a
add instructions for testing to readme
deltragon Jun 30, 2025
180fc43
apply review suggestions
deltragon Jun 30, 2025
033ea9e
Merge pull request #733 from deltragon/pytest-breakqueue
deltragon Jul 23, 2025
0b7e988
Config: split loading out of constructor
deltragon Jul 23, 2025
c6732e1
remove dead code
deltragon Jun 8, 2025
7da4ecb
typing: add types to core and breakqueue
deltragon Jun 4, 2025
455f92e
core: make break_queue protected
deltragon Jun 8, 2025
5219062
tests: make random break tests independent of actual order
deltragon Jul 24, 2025
7ad97f0
typing: only instantiate BreakQueue when there are breaks
deltragon Jun 8, 2025
ce238c4
typing: BreakQueue: __current_break is always set
deltragon Jun 8, 2025
3fba4f0
Merge pull request #730 from deltragon/typing-breakqueue
deltragon Jul 24, 2025
92ec7aa
fix missing dependency on pytest job
deltragon Aug 2, 2025
b3ada1d
Merge pull request #735 from deltragon/ci-dep
deltragon Aug 2, 2025
c2629dd
update po files
deltragon Aug 2, 2025
b32bcda
Merge pull request #736 from deltragon/update-po
deltragon Aug 2, 2025
5c4bfc6
port cli handling and uniqueness to gtk
deltragon May 11, 2025
05bd45b
avoid circular dependency between translations and utility
deltragon May 11, 2025
01ebfa9
cli: --status: invoke on and print from primary instance
deltragon May 11, 2025
9638772
remove dead rpc + psutil uniqueness code
deltragon May 11, 2025
89c7520
remove settings for rpc server (updates config version to 6.0.4)
deltragon Aug 2, 2025
0a64b5f
remove docs and translations for rpc server
deltragon Aug 2, 2025
c5d3957
remove rpc messages from translation files
deltragon Aug 2, 2025
1af90f0
Merge pull request #722 from deltragon/cli-gtk-actions
deltragon Aug 2, 2025
9da3806
add option to postpone breaks in seconds
SebastianDorobantu Aug 3, 2025
da182ba
run validate_po.py and ruff things
SebastianDorobantu Aug 3, 2025
c760f8d
Translated using Weblate (Estonian)
Aug 3, 2025
b18589a
fix: ensure behavior defaults to minutes and correct random typo added
SebastianDorobantu Aug 4, 2025
569cb62
Merge pull request #737 from SebastianDorobantu/master
deltragon Aug 7, 2025
efce042
audiblealert: replace aplay with ffplay (ffmpeg)
deltragon Aug 7, 2025
60f5965
audiblealert: add volume control
deltragon Aug 7, 2025
69693c3
audiblealert: add fallback to other tools
deltragon Aug 7, 2025
bd2fdde
Translated using Weblate (Czech)
vikdevelop Aug 12, 2025
a2cfaf5
Merge branch 'origin/master' into Weblate.
weblate Aug 13, 2025
32224d6
Merge pull request #739 from deltragon/audiblealert-volume
deltragon Aug 17, 2025
0b305c8
core: rename __fire_start_break to __do_start_break
deltragon Aug 3, 2025
272be29
core: refactor: split out __do_pre_break, reorder
deltragon Aug 3, 2025
44e4f32
core: refactor __start_break into separate method
deltragon Aug 3, 2025
43b3a43
core: add callback to __wait_for instead of blocking
deltragon Aug 3, 2025
1c5ca1e
core: add __fire_hook method
deltragon Aug 3, 2025
52e5bb2
core: __wakeup_scheduler
deltragon Aug 3, 2025
03114f3
core: refactor: add _take_break_now flag
deltragon Aug 3, 2025
266ec70
core: remove lock as it is only used in the main thread
deltragon Jun 9, 2025
b5e422f
core: run on main thread with callbacks
deltragon Jun 9, 2025
2d18885
safeeyes: application: remove another needless sleep/thread
deltragon Jun 25, 2025
e688f23
Merge pull request #740 from deltragon/core-main-thread
deltragon Aug 17, 2025
c8c49bc
test SafeEyesCore: initial
deltragon Aug 25, 2024
a69d1b0
test SafeEyesCore: refactor out run_next_break method
deltragon Aug 25, 2024
565c77c
test SafeEyesCore: add handling for condvar, add explanation, check e…
deltragon Aug 25, 2024
ed13832
test SafeEyesCore: add test from https://github.com/slgobinath/SafeEy…
deltragon Aug 25, 2024
1b6ed49
reorder methods
deltragon Aug 25, 2024
cccd6a1
add dependency on time-machine
deltragon Aug 2, 2025
88babdf
core: add yield point when starting scheduler for the tests
deltragon Aug 3, 2025
253db1d
core: fix tests
deltragon Aug 3, 2025
23bcc92
test_core: add types
deltragon Aug 3, 2025
e93019e
test_core: remove useless test
deltragon Aug 3, 2025
cecbbe2
Merge pull request #641 from deltragon/pytest
deltragon Aug 17, 2025
3fb1509
donotdisturb: move shared code into method
deltragon Jun 22, 2025
4909fd8
donotdisturb: implement detection on KDE Plasma Wayland
deltragon Jun 22, 2025
32830e6
Merge pull request #727 from deltragon/kde-do-not-disturb
deltragon Aug 17, 2025
b4df993
document the plugin methods better
deltragon Jun 22, 2025
301be24
add types to TrayAction, make icon_path optional
deltragon Jun 22, 2025
b3e7c98
break screen: make toolbar focusable, fix glade structure
deltragon Jun 22, 2025
5fb7bad
add support for tray actions that don't disappear on click
deltragon Jun 22, 2025
e0d38fa
add support for plugin returning multiple tray actions
deltragon Jun 22, 2025
5bc3e16
screensaver: add tray action to lock screen now
deltragon Jun 22, 2025
1ded330
Merge pull request #726 from deltragon/lock-screen-now
deltragon Aug 17, 2025
f83d120
update translations
deltragon Aug 18, 2025
38fadf0
Translated using Weblate (Chinese (Simplified Han script))
lalala-233 Aug 18, 2025
a255ea6
Merge branch 'origin/master' into Weblate.
weblate Aug 18, 2025
009f1fb
settings dialog: reset button: fix config change
deltragon Aug 18, 2025
bec7a24
Merge pull request #742 from deltragon/reset-fix-config
deltragon Aug 18, 2025
e99d424
Translated using Weblate (Estonian)
Aug 18, 2025
dd7601c
Translated using Weblate (French)
Aug 18, 2025
fa19a32
Merge branch 'origin/master' into Weblate.
weblate Aug 19, 2025
1912a40
Translated using Weblate (Italian)
Aug 20, 2025
a1b375f
Translated using Weblate (Czech)
vikdevelop Aug 20, 2025
40dd51f
tests: core: drop debug prints
deltragon Aug 18, 2025
a642103
tests: core: properly unregister callback
deltragon Aug 18, 2025
40fbdb8
tests: core: add tests for idling
deltragon Aug 18, 2025
2c222d0
test: core: add broken idle test
deltragon Aug 18, 2025
f61257d
tests: core: fix error when logging
deltragon Aug 18, 2025
1174410
core: start/enable_safeeyes: remove unused reset_breaks param
deltragon Aug 18, 2025
c6f6a95
model: BreakQueue: rename reset to skip_long_break
deltragon Aug 18, 2025
e0eb988
tests: model: add broken test for skipping long break
deltragon Aug 18, 2025
f54317d
BreakQueue: skip upcoming long break right away
deltragon Aug 18, 2025
4b4178c
Merge pull request #741 from deltragon/skip-long-break-fix
deltragon Aug 21, 2025
3ed6324
settings: dont duplicate the active plugin config per setting
deltragon Aug 7, 2024
946aef4
settings: dialogs: set transient_for instead of application
deltragon Aug 21, 2025
4e5622b
Merge pull request #744 from deltragon/ui-misc-fixes
deltragon Aug 22, 2025
8cbcc7b
refactor: settings: split plugin item into separate class
deltragon Aug 7, 2024
51a1e00
refactor: settings: split break item into separate class
deltragon Aug 7, 2024
b267c26
settings: plugin settings items: split out common code
deltragon Aug 21, 2025
1699f3b
settings: refactor plugin settings items into classes
deltragon Aug 7, 2024
f5e76f3
break screen: split window instances into separate class
deltragon Aug 7, 2024
dd473be
Merge pull request #745 from deltragon/ui-split-classes
deltragon Aug 22, 2025
74db826
about dialog: migrate from Gtk.Builder to Gtk.Template
deltragon Jul 15, 2024
aab4f57
gtk template: required plugin dialog
deltragon Aug 4, 2024
a26fedf
gtk template: settings dialog (main window)
deltragon Aug 4, 2024
73eb8b0
gtk template: settings dialog (subdialogs)
deltragon Aug 7, 2024
b424091
gtk template: settings - plugin and break items
deltragon Aug 7, 2024
aa50b70
gtk template: settings - plugin settings items
deltragon Aug 7, 2024
ef748f4
gtk template: break screen
deltragon Aug 7, 2024
8deda22
about dialog: add types
deltragon Apr 24, 2025
ec87407
required plugin dialog: add types
deltragon Aug 18, 2025
feaa1ee
settings: add types
deltragon Aug 18, 2025
8bc91d0
break screen: add types
deltragon Aug 20, 2025
b885db0
remove unused create_gtk_builder helper
deltragon Aug 8, 2024
e1ddb74
Merge pull request #746 from deltragon/gtk4-template
deltragon Aug 22, 2025
513cc59
typing: add Context to gradually type
deltragon Jun 4, 2025
d375a4c
add context to core and model
deltragon Jun 4, 2025
b7adbf0
typing: context: add to break screen
deltragon Aug 21, 2025
d545223
typing: add Context to smartpause plugin
deltragon Jun 4, 2025
738b536
Merge pull request #747 from deltragon/typing-context
deltragon Aug 22, 2025
6fb6d61
trayicon: remove unused context arg
deltragon Aug 22, 2025
e9521b2
settings: xdg activation
deltragon Aug 22, 2025
051670e
about dialog: xdg activation
deltragon Aug 22, 2025
14c5601
add types, remove unused global
deltragon Aug 22, 2025
785db28
Merge pull request #748 from deltragon/xdg-activation
deltragon Aug 22, 2025
d702cb6
break screen: x11 keyboard locking: move threading
deltragon Aug 22, 2025
8ee1667
move another main thread call to the context/api
deltragon Aug 22, 2025
1a08010
break screen: remove now unneeded idle calls
deltragon Aug 22, 2025
3a626cb
trayicon: switch from thread to timer
deltragon Aug 22, 2025
6833bd5
Merge pull request #749 from deltragon/thread-fixes
deltragon Aug 22, 2025
c397e7c
update version to 3.0.0b4
deltragon Aug 22, 2025
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
40 changes: 40 additions & 0 deletions .github/workflows/build-deb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Debian Package

on:
push:
branches: [ release ]
workflow_dispatch:

jobs:
build-deb:
name: Build Debian Package
runs-on: ubuntu-24.04

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential python3-stdeb fakeroot dpkg-dev debhelper dh-python python3 python3-packaging python3-setuptools

- name: Build .deb package
run: |
DPKG_DEB_COMPRESSOR_TYPE=xz dpkg-buildpackage -us -uc -nc
mv ../*.deb .

- name: Upload .deb to GitHub Release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: "*.deb"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Save .deb as workflow artifact
if: github.event_name != 'release'
uses: actions/upload-artifact@v4
with:
name: deb-package
path: "*.deb"
4 changes: 3 additions & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: '3.13'
- run: sudo apt-get install -y libwayland-dev libcairo2-dev libgirepository-2.0-dev
- run: |
sudo apt-get update
sudo apt-get install -y libwayland-dev libcairo2-dev libgirepository-2.0-dev
- run: uv pip install -r pyproject.toml
- run: uv pip install --group types
- run: mypy safeeyes
36 changes: 36 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Workflow to run pytest
name: pytest

on: [push, pull_request]

permissions:
contents: read

env:
UV_SYSTEM_PYTHON: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1

jobs:
pytest:
name: pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: astral-sh/setup-uv@22695119d769bdb6f7032ad67b9bca0ef8c4a174 # v5.4.0
with:
enable-cache: true
cache-dependency-glob: ''
cache-suffix: '3.13'
- name: Setup Python
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: '3.13'
- name: Install OS dependencies
run: |
sudo apt-get update -yy
sudo apt-get install -yy --no-install-recommends libwayland-dev libcairo2-dev libgirepository-2.0-dev gir1.2-gtk-4.0
- run: uv pip install -r pyproject.toml
- run: uv pip install --group tests
- run: pytest
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install build wheel
sudo apt-get update
sudo apt-get install -y gettext

- name: Get Current Version
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
run: |
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install polib
sudo apt-get update
sudo apt-get install -y gettext

- name: Check translations
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ include README.md

graft safeeyes

prune safeeyes/tests

global-exclude *.py[cod]
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,18 @@ flatpak install flathub io.github.slgobinath.SafeEyes
Ensure to meet the following dependencies:

- gir1.2-notify-0.7
- gir1.2-gtk-4.0
- python3-babel
- python3-croniter
- python3-psutil
- python3-gi
- python3-packaging
- python3-xlib
- xprintidle (optional)
- wlrctl (wayland optional)
- python3-pywayland (optional for KDE/other wayland)
- xprintidle (optional for X11)
- wlrctl (optional for wayland/wlroots)
- Python 3.10+

**To install Safe Eyes:**
**To install Safe Eyes from PyPI:**

```bash
sudo pip3 install safeeyes
Expand Down Expand Up @@ -188,7 +190,6 @@ This method has the same caveats about icons/window icons as running from source
- Smart pause if system is idle
- Multi-screen support
- Customizable user interface
- RPC API to control externally
- Command-line arguments to control the running instance
- Customizable using plug-ins

Expand All @@ -208,7 +209,12 @@ To ensure that the coding and formatting guidelines are followed, install [ruff]

To ensure that any types are correct, install [mypy](https://github.com/python/mypy) and run `mypy safeeyes`.

The last three checks are also run in CI, so a PR must pass all the tests for it to be mmerged.
To ensure that the tests still pass, install [pytest](https://docs.pytest.org/en/stable/) and run `pytest`.

The last four checks are also run in CI, so a PR must pass all the tests for it to be mmerged.

It is also possible to use dependency groups to install the needed dependencies. When using a new enough version of pip, run `pip install --group types` to install all dependencies to run the type check.
The available dependency groups can be found in the `pyproject.toml` file.

## How to Release?

Expand Down
21 changes: 21 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
safeeyes (3.0.0b3) noble; urgency=medium

* Wayland support: break screen shortcuts, window activation, donotdisturb
detection

* Feature: Add option to postpone breaks by seconds rather than minutes

* Feature: screensaver: add tray action to lock screen now

* smartpause: Performance/Battery life improvements

* replace RPC server with native GTK commandline integration

* Internal refactoring to improve thread safety

* Internal: automated tests using pytest

* Internal: typechecking improvement

-- Mel Dafert <m@dafert.at> Fri, 22 Aug 2025 11:30:00 +0000

safeeyes (3.0.0b3) noble; urgency=medium

* Re-release due to broken github action
Expand Down
12 changes: 11 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ Homepage: https://github.com/slgobinath/SafeEyes/

Package: safeeyes
Architecture: all
Depends: ${misc:Depends}, ${python3:Depends}, python3 (>= 3.10.0), python3-xlib, gir1.2-notify-0.7, python3-babel, x11-utils, xprintidle, alsa-utils, python3-psutil, python3-croniter, python3-packaging, gir1.2-gtk-4.0
Depends: ${misc:Depends}, ${python3:Depends},
python3 (>= 3.10.0),
python3-xlib,
python3-babel,
x11-utils,
xprintidle,
alsa-utils,
python3-croniter,
python3-packaging,
gir1.2-notify-0.7,
gir1.2-gtk-4.0
Description: Prevent eye strain with Safe Eyes – an essential screen break reminder.
Safe Eyes is a simple tool to remind you to take periodic breaks for your eyes. This is essential for anyone spending more time on the computer to avoid eye strain and other physical problems.
.
Expand Down
22 changes: 16 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "safeeyes"
version = "3.0.0b3"
version = "3.0.0b4"
description = "Protect your eyes from eye strain using this continuous breaks reminder."
keywords = ["linux utility health eye-strain safe-eyes"]
readme = "README.md"
Expand All @@ -24,15 +24,14 @@ dependencies = [
"pywayland",
"PyGObject",
"babel",
"psutil",
"packaging",
"python-xlib",
]
requires-python = ">=3.10"

[project.urls]
Homepage = "https://github.com/slgobinath/SafeEyes"
Downloads = "https://github.com/slgobinath/SafeEyes/archive/v3.0.0b3.tar.gz"
Downloads = "https://github.com/slgobinath/SafeEyes/archive/v3.0.0b4.tar.gz"

[project.scripts]
safeeyes = "safeeyes.__main__:main"
Expand All @@ -46,12 +45,14 @@ build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
include=["safeeyes*"]
exclude=["safeeyes.tests*"]

[dependency-groups]
dev = [
{include-group = "lint"},
{include-group = "scripts"},
{include-group = "types"}
{include-group = "tests"},
{include-group = "types"},
]
lint = [
"ruff==0.11.2"
Expand All @@ -63,8 +64,12 @@ types = [
"mypy==1.15.0",
"PyGObject-stubs==2.13.0",
"types-croniter==5.0.1.20250322",
"types-psutil==7.0.0.20250218",
"types-python-xlib==0.33.0.20240407"
"types-python-xlib==0.33.0.20240407",
{include-group = "tests"},
]
tests = [
"pytest==8.3.5",
"time-machine==2.16.0",
]

[tool.mypy]
Expand All @@ -78,3 +83,8 @@ enable_error_code = [
"ignore-without-code",
"possibly-undefined"
]

[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
]
3 changes: 0 additions & 3 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
target-version = "py310"

# gettext
builtins = ["_"]

[lint]
select = ["E", "W", "F", "D2", "D3", "D4"]
ignore = [
Expand Down
Loading