Skip to content

Commit 4450649

Browse files
Merge pull request #600 from slgobinath/master
release 2.2.0
2 parents cca84ac + 27c98e7 commit 4450649

File tree

66 files changed

+1485
-122
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1485
-122
lines changed

README.md

+18-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<img src="safeeyes/platform/icons/hicolor/64x64/apps/io.github.slgobinath.SafeEyes.png" align="left">
2+
13
# Safe Eyes
24

35
[![Release](https://img.shields.io/github/v/release/slgobinath/SafeEyes)](https://github.com/slgobinath/SafeEyes/releases)
@@ -35,10 +37,19 @@ optional arguments:
3537

3638
## Installation guide
3739

38-
Safe Eyes is available in Ubuntu PPA, Arch AUR, Gentoo and Python PyPI. You can choose any installation source and install on any Linux system with Python 3.
40+
Safe Eyes is available on the official repositories of many popular the distributions.
41+
42+
<a href="https://repology.org/project/safeeyes/versions">
43+
<img src="https://repology.org/badge/vertical-allrepos/safeeyes.svg" alt="Packaging status" align="right">
44+
</a>
45+
46+
It is also available in Ubuntu PPA, Arch AUR, Gentoo and Python PyPI. You can choose any installation source and install on any Linux system with Python 3.
47+
3948

4049
### Ubuntu, Linux Mint and other Ubuntu Derivatives
4150

51+
The official Safe Eyes PPA hosts the latest version of safeeyes for Ubuntu 22.04 and above. On older versions of Ubuntu, an older version of Safe Eyes is available on the official repositories.
52+
4253
```bash
4354
sudo add-apt-repository ppa:safeeyes-team/safeeyes
4455
sudo apt update
@@ -100,6 +111,7 @@ Ensure to meet the following dependencies:
100111
- python3-psutil
101112
- xprintidle (optional)
102113
- wlrctl (wayland optional)
114+
- Python 3.10+
103115

104116
**To install Safe Eyes:**
105117

@@ -138,7 +150,7 @@ Some Linux systems like CentOS do not have matching dependencies available in th
138150
139151
python3 -m venv venv
140152
source venv/bin/activate
141-
pip3 install dbus-python safeeyes
153+
pip3 install safeeyes
142154
```
143155

144156
3. Start Safe Eyes from the terminal
@@ -168,13 +180,14 @@ Thirdparty plugins are available at another GitHub repository: [safeeyes-plugins
168180

169181
## How to Release?
170182

183+
0. Run `update-po.sh` to generate new translation files (which will be eventually updated by translators). Commit and push the changes to the master branch.
171184
1. Checkout the latest commits from the `master` branch
172185
2. Run `python3 -m safeeyes` to make sure nothing is broken
173186
3. Update the Safe Eyes version in the following places (Open the project in VSCode and search for the current version):
174-
- [setup.py](https://github.com/slgobinath/SafeEyes/blob/master/setup.py#L81)
175-
- [setup.py](https://github.com/slgobinath/SafeEyes/blob/master/setup.py#L88)
187+
- [setup.py](https://github.com/slgobinath/SafeEyes/blob/master/setup.py#L83)
188+
- [setup.py](https://github.com/slgobinath/SafeEyes/blob/master/setup.py#L90)
176189
- [safeeyes.py](https://github.com/slgobinath/SafeEyes/blob/master/safeeyes/safeeyes.py#L43)
177-
- [io.github.slgobinath.SafeEyes.metainfo.xml](https://github.com/slgobinath/SafeEyes/blob/master/safeeyes/platform/io.github.slgobinath.SafeEyes.metainfo.xml#L50)
190+
- [io.github.slgobinath.SafeEyes.metainfo.xml](https://github.com/slgobinath/SafeEyes/blob/master/safeeyes/platform/io.github.slgobinath.SafeEyes.metainfo.xml#L56)
178191
- [about_dialog.glade](https://github.com/slgobinath/SafeEyes/blob/master/safeeyes/glade/about_dialog.glade#L74)
179192
4. Update the [changelog](https://github.com/slgobinath/SafeEyes/blob/master/debian/changelog) (for Ubuntu release)
180193
5. Commit the changes to `master`

build.sh

-8
This file was deleted.

debian/changelog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
safeeyes (2.2.0) jammy; urgency=medium
2+
3+
* Limit consecutive skips
4+
5+
-- Archisman Panigrahi <[email protected]> Sun, 14 Jul 2024 09:30:12 -0400
6+
17
safeeyes (2.1.9) noble; urgency=medium
28

39
* Fix crash in smartpause

debian/control

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ Source: safeeyes
22
Section: utils
33
Priority: optional
44
Maintainer: Gobinath Loganathan <[email protected]>
5-
Build-Depends: debhelper (>= 10), dh-python, python3, python3-setuptools
5+
Build-Depends: debhelper (>= 10), dh-python, python3, python3-packaging, python3-setuptools
66
Standards-Version: 3.9.6
7-
X-Python3-Version: >= 3.5
7+
X-Python3-Version: >= 3.10
88
Homepage: https://github.com/slgobinath/SafeEyes/
99

1010
Package: safeeyes
1111
Architecture: all
12-
Depends: ${misc:Depends}, ${python3:Depends}, gir1.2-ayatanaappindicator3-0.1, python3 (>= 3.5.0), python3-xlib, python3-dbus, gir1.2-notify-0.7, python3-babel, x11-utils, xprintidle, alsa-utils, python3-psutil, python3-croniter
12+
Depends: ${misc:Depends}, ${python3:Depends}, gir1.2-ayatanaappindicator3-0.1, python3 (>= 3.10.0), python3-xlib, python3-dbus, gir1.2-notify-0.7, python3-babel, x11-utils, xprintidle, alsa-utils, python3-psutil, python3-croniter
1313
Description: Safe Eyes
1414
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.
1515
.

safeeyes/__main__.py

+1-24
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,14 @@
2525
import logging
2626
import signal
2727
import sys
28-
from threading import Timer
2928

30-
import gi
3129
import psutil
3230
from safeeyes import utility
3331
from safeeyes.model import Config
3432
from safeeyes.safeeyes import SafeEyes
3533
from safeeyes.safeeyes import SAFE_EYES_VERSION
3634
from safeeyes.rpc import RPCClient
3735

38-
gi.require_version('Gtk', '3.0')
39-
from gi.repository import Gtk
40-
4136
gettext.install('safeeyes', utility.LOCALE_PATH)
4237

4338

@@ -68,22 +63,6 @@ def __running():
6863
return False
6964

7065

71-
def __evaluate_arguments(args, safe_eyes):
72-
"""
73-
Evaluate the arguments and execute the operations.
74-
"""
75-
if args.about:
76-
utility.execute_main_thread(safe_eyes.show_about)
77-
elif args.disable:
78-
utility.execute_main_thread(safe_eyes.disable_safeeyes)
79-
elif args.enable:
80-
utility.execute_main_thread(safe_eyes.enable_safeeyes)
81-
elif args.settings:
82-
utility.execute_main_thread(safe_eyes.show_settings)
83-
elif args.take_break:
84-
utility.execute_main_thread(safe_eyes.take_break)
85-
86-
8766
def main():
8867
"""
8968
Start the Safe Eyes.
@@ -147,10 +126,8 @@ def main():
147126
sys.exit(0)
148127
elif not args.quit:
149128
logging.info("Starting Safe Eyes")
150-
safe_eyes = SafeEyes(system_locale, config)
129+
safe_eyes = SafeEyes(system_locale, config, args)
151130
safe_eyes.start()
152-
Timer(1.0, lambda: __evaluate_arguments(args, safe_eyes)).start()
153-
Gtk.main()
154131

155132

156133
if __name__ == '__main__':

safeeyes/config/locale/ar/LC_MESSAGES/safeeyes.po

+28
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,18 @@ msgstr "الإعدادات"
486486
msgid "Take a break now"
487487
msgstr "خُذ استراحة الآن"
488488

489+
#: plugins/trayicon
490+
msgid "Any break"
491+
msgstr ""
492+
493+
#: plugins/trayicon
494+
msgid "Short break"
495+
msgstr ""
496+
497+
#: plugins/trayicon
498+
msgid "Long break"
499+
msgstr ""
500+
489501
#: plugins/trayicon
490502
msgid "Until restart"
491503
msgstr "حتى إعادة التشغيل"
@@ -506,6 +518,22 @@ msgstr "أوقِف مشغلات الوسائط في شاشة فترة الاست
506518
msgid "Pause media"
507519
msgstr "أوقِف الوسائط"
508520

521+
# plugin/limitconsecutiveskipping
522+
msgid "Limit Consecutive Skipping"
523+
msgstr ""
524+
525+
# plugin/limitconsecutiveskipping
526+
msgid "How many skips or postpones are allowed in a row"
527+
msgstr ""
528+
529+
# plugin/limitconsecutiveskipping
530+
msgid "Limit how many breaks can be skipped or postponed in a row"
531+
msgstr ""
532+
533+
# plugin/limitconsecutiveskipping
534+
msgid "Skipped or postponed %d/%d breaks in a row"
535+
msgstr ""
536+
509537
# plugin/healthstats
510538
#~ msgid "Interval to reset statistics (in hours)"
511539
#~ msgstr "مهلة تصفير الإعدادات (ساعات)"

safeeyes/config/locale/bg/LC_MESSAGES/safeeyes.po

+28
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,18 @@ msgstr "Настройки"
472472
msgid "Take a break now"
473473
msgstr "Направете почивка сега"
474474

475+
#: plugins/trayicon
476+
msgid "Any break"
477+
msgstr ""
478+
479+
#: plugins/trayicon
480+
msgid "Short break"
481+
msgstr ""
482+
483+
#: plugins/trayicon
484+
msgid "Long break"
485+
msgstr ""
486+
475487
#: plugins/trayicon
476488
msgid "Until restart"
477489
msgstr "До рестартиране"
@@ -491,3 +503,19 @@ msgstr ""
491503
# plugin/mediacontrol
492504
msgid "Pause media"
493505
msgstr ""
506+
507+
# plugin/limitconsecutiveskipping
508+
msgid "Limit Consecutive Skipping"
509+
msgstr ""
510+
511+
# plugin/limitconsecutiveskipping
512+
msgid "How many skips or postpones are allowed in a row"
513+
msgstr ""
514+
515+
# plugin/limitconsecutiveskipping
516+
msgid "Limit how many breaks can be skipped or postponed in a row"
517+
msgstr ""
518+
519+
# plugin/limitconsecutiveskipping
520+
msgid "Skipped or postponed %d/%d breaks in a row"
521+
msgstr ""

safeeyes/config/locale/ca/LC_MESSAGES/safeeyes.po

+30-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ msgstr "Restablir"
171171

172172
# Settings dialog
173173
msgid "Are you sure you want to reset all settings to default?"
174-
msgstr "De veritat que voleu restablir les preferències als valors per defecte?"
174+
msgstr ""
175+
"De veritat que voleu restablir les preferències als valors per defecte?"
175176

176177
# Settings dialog
177178
msgid "Options"
@@ -475,6 +476,18 @@ msgstr "Configuració"
475476
msgid "Take a break now"
476477
msgstr ""
477478

479+
#: plugins/trayicon
480+
msgid "Any break"
481+
msgstr ""
482+
483+
#: plugins/trayicon
484+
msgid "Short break"
485+
msgstr ""
486+
487+
#: plugins/trayicon
488+
msgid "Long break"
489+
msgstr ""
490+
478491
#: plugins/trayicon
479492
msgid "Until restart"
480493
msgstr "Fins que es reinicïi"
@@ -494,3 +507,19 @@ msgstr ""
494507
# plugin/mediacontrol
495508
msgid "Pause media"
496509
msgstr ""
510+
511+
# plugin/limitconsecutiveskipping
512+
msgid "Limit Consecutive Skipping"
513+
msgstr ""
514+
515+
# plugin/limitconsecutiveskipping
516+
msgid "How many skips or postpones are allowed in a row"
517+
msgstr ""
518+
519+
# plugin/limitconsecutiveskipping
520+
msgid "Limit how many breaks can be skipped or postponed in a row"
521+
msgstr ""
522+
523+
# plugin/limitconsecutiveskipping
524+
msgid "Skipped or postponed %d/%d breaks in a row"
525+
msgstr ""

safeeyes/config/locale/cs/LC_MESSAGES/safeeyes.po

+28
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,18 @@ msgstr "Nastavení"
482482
msgid "Take a break now"
483483
msgstr "Udělat si přestávku"
484484

485+
#: plugins/trayicon
486+
msgid "Any break"
487+
msgstr ""
488+
489+
#: plugins/trayicon
490+
msgid "Short break"
491+
msgstr ""
492+
493+
#: plugins/trayicon
494+
msgid "Long break"
495+
msgstr ""
496+
485497
#: plugins/trayicon
486498
msgid "Until restart"
487499
msgstr "Do restartu"
@@ -502,6 +514,22 @@ msgstr "Pozastavit přehrávače médií z obrazovky přestávky"
502514
msgid "Pause media"
503515
msgstr "Pozastavit média"
504516

517+
# plugin/limitconsecutiveskipping
518+
msgid "Limit Consecutive Skipping"
519+
msgstr ""
520+
521+
# plugin/limitconsecutiveskipping
522+
msgid "How many skips or postpones are allowed in a row"
523+
msgstr ""
524+
525+
# plugin/limitconsecutiveskipping
526+
msgid "Limit how many breaks can be skipped or postponed in a row"
527+
msgstr ""
528+
529+
# plugin/limitconsecutiveskipping
530+
msgid "Skipped or postponed %d/%d breaks in a row"
531+
msgstr ""
532+
505533
# plugin/healthstats
506534
#~ msgid "Interval to reset statistics (in hours)"
507535
#~ msgstr "Interval pro resetování statistik (v hodinách)"

safeeyes/config/locale/da/LC_MESSAGES/safeeyes.po

+28
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,18 @@ msgstr "Indstillinger"
475475
msgid "Take a break now"
476476
msgstr "Hold pause nu"
477477

478+
#: plugins/trayicon
479+
msgid "Any break"
480+
msgstr ""
481+
482+
#: plugins/trayicon
483+
msgid "Short break"
484+
msgstr ""
485+
486+
#: plugins/trayicon
487+
msgid "Long break"
488+
msgstr ""
489+
478490
#: plugins/trayicon
479491
msgid "Until restart"
480492
msgstr "Indtil genstart"
@@ -495,6 +507,22 @@ msgstr "Pause multimedieafspillere fra pause skærm"
495507
msgid "Pause media"
496508
msgstr "Pause medier"
497509

510+
# plugin/limitconsecutiveskipping
511+
msgid "Limit Consecutive Skipping"
512+
msgstr ""
513+
514+
# plugin/limitconsecutiveskipping
515+
msgid "How many skips or postpones are allowed in a row"
516+
msgstr ""
517+
518+
# plugin/limitconsecutiveskipping
519+
msgid "Limit how many breaks can be skipped or postponed in a row"
520+
msgstr ""
521+
522+
# plugin/limitconsecutiveskipping
523+
msgid "Skipped or postponed %d/%d breaks in a row"
524+
msgstr ""
525+
498526
# plugin/healthstats
499527
#~ msgid "Interval to reset statistics (in hours)"
500528
#~ msgstr "Interval for nulstilling af statistik (i timer)"

0 commit comments

Comments
 (0)