Skip to content

Commit ff6c395

Browse files
committed
merge master
2 parents a54c164 + 2707ea0 commit ff6c395

File tree

73 files changed

+1244
-628
lines changed

Some content is hidden

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

73 files changed

+1244
-628
lines changed

.github/FUNDING.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Create Tag
3434
uses: mathieudutour/[email protected]
3535
with:
36-
custom_tag: "v${{steps.get_current_version.outputs.project_version}}"
36+
custom_tag: "${{steps.get_current_version.outputs.project_version}}"
3737
github_token: ${{ secrets.GH_API_SECRET }}
3838

3939
- name: Build Changelog

.github/workflows/translations.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Check translations
2+
3+
# Drop permissions to minimum for security
4+
permissions:
5+
contents: read
6+
7+
on:
8+
pull_request:
9+
push:
10+
workflow_dispatch:
11+
12+
jobs:
13+
check_translations:
14+
name: Check translations
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Set up Python 3.11
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: 3.11
23+
24+
- name: Install runtime dependencies
25+
run: |
26+
python3 -m pip install --upgrade pip setuptools wheel
27+
python3 -m pip install polib
28+
29+
- name: Check translations
30+
run: |
31+
python3 validate_po.py

README.md

Lines changed: 35 additions & 15 deletions
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)
@@ -7,7 +9,6 @@
79
[![Flathub](https://img.shields.io/flathub/v/io.github.slgobinath.SafeEyes)](https://flathub.org/apps/details/io.github.slgobinath.SafeEyes)
810
[![Translation status](https://hosted.weblate.org/widgets/safe-eyes/-/translations/svg-badge.svg)](https://hosted.weblate.org/engage/safe-eyes/?utm_source=widget)
911
[![Awesome Humane Tech](https://raw.githubusercontent.com/humanetech-community/awesome-humane-tech/main/humane-tech-badge.svg?sanitize=true)](https://github.com/humanetech-community/awesome-humane-tech)
10-
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/slgobinath)
1112

1213
Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder.
1314

@@ -36,12 +37,21 @@ optional arguments:
3637

3738
## Installation guide
3839

39-
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+
[![Packaging status](https://repology.org/badge/vertical-allrepos/safeeyes.svg)](https://repology.org/project/safeeyes/versions)
43+
44+
45+
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.
46+
47+
4048

4149
### Ubuntu, Linux Mint and other Ubuntu Derivatives
4250

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+
4353
```bash
44-
sudo add-apt-repository ppa:slgobinath/safeeyes
54+
sudo add-apt-repository ppa:safeeyes-team/safeeyes
4555
sudo apt update
4656
sudo apt install safeeyes
4757
```
@@ -121,11 +131,11 @@ python3 -m safeeyes
121131
Safe Eyes installers install the required icons to `/usr/share/icons/hicolor`. When you run Safe Eyes from source without, some icons may not appear.
122132

123133

124-
### Install in Virtual Environment
134+
### Install in a virtual environment
125135

126-
Some Linux systems like Cent OS do not have matching dependencies available in their repository. In such systems, you can install and use Safe Eyes in a Python Virtual Environment. The following instruction was tested on Cent OS 7.
136+
Some Linux systems like CentOS do not have matching dependencies available in their repository. In such systems, you can install and use Safe Eyes in a Python virtual environment.
127137

128-
1. Install the necessary dependencies
138+
1. Install the necessary dependencies for CentOS 7
129139

130140
```bash
131141
sudo yum install python3-devel dbus dbus-devel cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel gobject-introspection-devel cairo-gobject-devel
@@ -137,13 +147,12 @@ Some Linux systems like Cent OS do not have matching dependencies available in t
137147
mkdir ~/safeeyes
138148
cd ~/safeeyes/
139149
140-
pip3 install virtualenv --user
141-
virtualenv --no-site-packages venv
150+
python3 -m venv venv
142151
source venv/bin/activate
143-
pip3 install dbus-python safeeyes
152+
pip3 install safeeyes
144153
```
145154

146-
3. Start Safe Eyes from terminal
155+
3. Start Safe Eyes from the terminal
147156

148157
```bash
149158
cd ~/safeeyes & source venv/bin/activate
@@ -168,12 +177,23 @@ For more details, please check the issue: [#329](https://github.com/slgobinath/S
168177

169178
Thirdparty plugins are available at another GitHub repository: [safeeyes-plugins](https://github.com/slgobinath/safeeyes-plugins). More details about how to write your own plugin and how to install third-party plugin are available there.
170179

171-
## License
180+
## How to Release?
172181

173-
GNU General Public License v3
182+
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.
183+
1. Checkout the latest commits from the `master` branch
184+
2. Run `python3 -m safeeyes` to make sure nothing is broken
185+
3. Update the Safe Eyes version in the following places (Open the project in VSCode and search for the current version):
186+
- [setup.py](https://github.com/slgobinath/SafeEyes/blob/master/setup.py#L81)
187+
- [setup.py](https://github.com/slgobinath/SafeEyes/blob/master/setup.py#L88)
188+
- [safeeyes.py](https://github.com/slgobinath/SafeEyes/blob/master/safeeyes/safeeyes.py#L43)
189+
- [io.github.slgobinath.SafeEyes.metainfo.xml](https://github.com/slgobinath/SafeEyes/blob/master/safeeyes/platform/io.github.slgobinath.SafeEyes.metainfo.xml#L50)
190+
- [about_dialog.glade](https://github.com/slgobinath/SafeEyes/blob/master/safeeyes/glade/about_dialog.glade#L74)
191+
4. Update the [changelog](https://github.com/slgobinath/SafeEyes/blob/master/debian/changelog) (for Ubuntu release)
192+
5. Commit the changes to `master`
193+
6. Create a pull-request from `master` to `release`
194+
7. Merge the PR to release **with merge commit** (Important to merge with merge commit)
174195

175-
## IDE Support
176196

177-
<p align="center">Thanks to JetBrains for offering IDE support to develop this Open Source project.</p>
197+
## License
178198

179-
<p align="center"><a href="https://www.jetbrains.com/?from=SafeEyes"><img src="https://raw.githubusercontent.com/JetBrains/logos/master/web/jetbrains/jetbrains.svg?sanitize=true" width="64" align="center"></a></p>
199+
GNU General Public License v3

build.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

debian/changelog

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
safeeyes (2.1.5-0) lunar; urgency=high
1+
safeeyes (2.1.9) noble; urgency=medium
2+
3+
* Fix crash in smartpause
4+
5+
-- Gobinath Loganathan <[email protected]> Tue, 18 Jun 2024 20:25:00 -0400
6+
7+
safeeyes (2.1.8) noble; urgency=medium
8+
9+
* Support Python 3.12
10+
11+
-- Archisman Panigrahi <[email protected]> Mon, 29 Apr 2024 02:09:48 -0400
12+
13+
safeeyes (2.1.6-0) lunar; urgency=high
14+
* Support Python 3.11
15+
216
* Minor bug fixes
317

418
* Fix the ecd ..rror if there is no long break

debian/control

Lines changed: 3 additions & 3 deletions
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
66
Standards-Version: 3.9.6
7-
X-Python3-Version: >= 3.5
7+
X-Python3-Version: >= 3.12
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.12.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

Lines changed: 2 additions & 25 deletions
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.
@@ -111,7 +90,7 @@ def main():
11190
args = parser.parse_args()
11291

11392
# Initialize the logging
114-
utility.intialize_logging(args.debug)
93+
utility.initialize_logging(args.debug)
11594
utility.initialize_platform()
11695
config = Config()
11796

@@ -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

Lines changed: 12 additions & 0 deletions
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 "حتى إعادة التشغيل"

0 commit comments

Comments
 (0)