Skip to content

Commit 41ac8ea

Browse files
Merge pull request slgobinath#793 from slgobinath/master
New version 3.1.0
2 parents 76dab3e + 8250808 commit 41ac8ea

File tree

10 files changed

+51
-16
lines changed

10 files changed

+51
-16
lines changed

.github/workflows/build-deb.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Build Debian Package
22

33
on:
4+
pull_request:
5+
push:
46
release:
57
types: [published]
68
workflow_dispatch:
@@ -33,7 +35,6 @@ jobs:
3335
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3436

3537
- name: Save .deb as workflow artifact
36-
if: github.event_name != 'release'
3738
uses: actions/upload-artifact@v4
3839
with:
3940
name: deb-package

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ jobs:
3333
- run: |
3434
sudo apt-get update
3535
sudo apt-get install -y libwayland-dev libcairo2-dev libgirepository-2.0-dev
36-
- run: uv pip install -r pyproject.toml --extra wayland --extra x11
36+
- run: uv pip install -r pyproject.toml --extra wayland
3737
- run: uv pip install --group types
3838
- run: mypy safeeyes

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ It is also available in Ubuntu PPA, Arch AUR and Python PyPI. You can choose any
5050

5151
### Ubuntu, Linux Mint and other Ubuntu Derivatives
5252

53-
The [Official PPA for Safe Eyes](https://launchpad.net/~safeeyes-team/+archive/ubuntu/safeeyes) hosts the latest version of safeeyes **for Ubuntu 22.04 and above**.
53+
The [Official PPA for Safe Eyes](https://launchpad.net/~safeeyes-team/+archive/ubuntu/safeeyes) hosts the latest (as much as allowed by dependencies) version of safeeyes **for Ubuntu 22.04 and above**.
5454
```bash
5555
sudo add-apt-repository ppa:safeeyes-team/safeeyes
5656
sudo apt update
@@ -87,7 +87,7 @@ Available on the [praiskup/safeeyes](https://copr.fedorainfracloud.org/coprs/pra
8787
sudo dnf -y copr enable praiskup/safeeyes
8888
sudo dnf -y install python3-safeeyes
8989
```
90-
For smart pause plugin, you may have to install the latest xprintidle from: [alonid/xprintidle](https://copr.fedorainfracloud.org/coprs/alonid/xprintidle/)
90+
For smartpause in Wayland, install the `python3-pywayland` package (in case the installer does not automatically install it as a dependency). For smart pause plugin in X11, you may have to install the latest xprintidle from: [alonid/xprintidle](https://copr.fedorainfracloud.org/coprs/alonid/xprintidle/).
9191

9292
### OpenSUSE Tumbleweed
9393

debian/changelog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
safeeyes (3.1.0) noble; urgency=medium
2+
3+
* Ensure compatibility with older Wayland
4+
5+
* Made xlib a mandatory dependency so that it does not break in x11.
6+
7+
-- Archisman Panigrahi <[email protected]> Sun, 21 Sep 2025 15:28:01 +0000
8+
19
safeeyes (3.0.1) noble; urgency=medium
210

311
* bugfix release

debian/control

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Depends: ${misc:Depends}, ${python3:Depends},
1717
python3-packaging,
1818
gir1.2-notify-0.7,
1919
gir1.2-gtk-4.0,
20-
ffmpeg | pipewire
20+
ffmpeg | pipewire,
21+
python3-xlib
2122
Recommends:
22-
python3-xlib,
2323
python3-pywayland
2424
Suggests:
2525
xprintidle

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[project]
22
name = "safeeyes"
3-
version = "3.0.1"
3+
version = "3.1.0"
44
description = "Protect your eyes from eye strain using this continuous breaks reminder."
5-
license = "GPL-3.0-or-later"
5+
license = {text = "GPL-3.0-or-later"}
66
keywords = ["linux utility health eye-strain safe-eyes"]
77
readme = "README.md"
88
authors = [
@@ -24,20 +24,20 @@ dependencies = [
2424
"PyGObject",
2525
"babel",
2626
"packaging",
27+
"python-xlib"
2728
]
2829
requires-python = ">=3.10"
2930

3031
[project.urls]
3132
Homepage = "https://github.com/slgobinath/SafeEyes"
32-
Downloads = "https://github.com/slgobinath/SafeEyes/archive/v3.0.1.tar.gz"
33+
Downloads = "https://github.com/slgobinath/SafeEyes/archive/v3.1.0.tar.gz"
3334

3435
[project.scripts]
3536
safeeyes = "safeeyes.__main__:main"
3637

3738
[project.optional-dependencies]
3839
healthstats = ["croniter"]
3940
wayland = ["pywayland"]
40-
x11 = ["python-xlib"]
4141

4242
[build-system]
4343
requires = ["setuptools"]

safeeyes/glade/about_dialog.glade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ along with this program. If not, see &lt;https://www.gnu.org/licenses/&gt;.</pr
6464
<property name="valign">center</property>
6565
<property name="margin-top">10</property>
6666
<property name="margin-bottom">10</property>
67-
<property name="label">Safe Eyes 3.0.1</property>
67+
<property name="label">Safe Eyes 3.1.0</property>
6868
<property name="justify">center</property>
6969
<property name="hexpand">1</property>
7070
<property name="vexpand">1</property>

safeeyes/platform/io.github.slgobinath.SafeEyes.metainfo.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
<url type="homepage">https://slgobinath.github.io/SafeEyes/</url>
5454

5555
<releases>
56+
<release version="3.1.0" date="2025-09-21" />
5657
<release version="3.0.1" date="2025-09-11" />
5758
<release version="3.0.0" date="2025-08-24" />
5859
<release version="3.0.0~b6" date="2025-08-24" />

safeeyes/plugins/smartpause/ext_idle_notify.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,25 @@
2727

2828
from pywayland.client import Display
2929
from pywayland.protocol.wayland.wl_seat import WlSeat
30-
from pywayland.protocol.ext_idle_notify_v1 import (
31-
ExtIdleNotifierV1,
32-
ExtIdleNotificationV1,
33-
)
30+
31+
32+
if typing.TYPE_CHECKING:
33+
from pywayland.protocol.ext_idle_notify_v1 import (
34+
ExtIdleNotifierV1,
35+
ExtIdleNotificationV1,
36+
)
37+
38+
try:
39+
from pywayland.protocol.ext_idle_notify_v1 import (
40+
ExtIdleNotifierV1,
41+
ExtIdleNotificationV1,
42+
)
43+
except Exception as e:
44+
logging.warning("The ext_idle_notify_v1 feature is not available. Exception: %s", e)
45+
logging.warning("This is likely due to an older version of Wayland.")
46+
EXT_IDLE_NOTIFY_IMPORT_ERROR = True
47+
else:
48+
EXT_IDLE_NOTIFY_IMPORT_ERROR = False
3449

3550
from .interface import IdleMonitorInterface
3651
from safeeyes import utility

safeeyes/plugins/smartpause/plugin.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,18 @@ def on_start() -> None:
159159
elif use_swayidle:
160160
idle_monitor = IdleMonitorSwayidle()
161161
elif use_ext_idle_notify:
162-
from .ext_idle_notify import IdleMonitorExtIdleNotify
162+
from .ext_idle_notify import (
163+
IdleMonitorExtIdleNotify,
164+
EXT_IDLE_NOTIFY_IMPORT_ERROR,
165+
)
163166

167+
if EXT_IDLE_NOTIFY_IMPORT_ERROR:
168+
logging.warning(
169+
"SmartPause plugin disabled:"
170+
" ext_idle_notify_v1 not available on this system."
171+
)
172+
idle_monitor_unsupported = True
173+
return
164174
idle_monitor = IdleMonitorExtIdleNotify()
165175
else:
166176
idle_monitor = IdleMonitorX11()

0 commit comments

Comments
 (0)