SafeEyes/README.md

199 lines
6.9 KiB
Markdown
Raw Normal View History

<img src="https://raw.githubusercontent.com/slgobinath/SafeEyes/master/safeeyes/platform/icons/hicolor/64x64/apps/io.github.slgobinath.SafeEyes.png" align="left">
2024-07-06 21:25:21 +02:00
2016-10-15 06:11:27 +02:00
# Safe Eyes
2017-10-07 18:06:04 +02:00
2020-12-20 16:00:50 +01:00
[![Release](https://img.shields.io/github/v/release/slgobinath/SafeEyes)](https://github.com/slgobinath/SafeEyes/releases)
2017-10-07 18:06:04 +02:00
[![PyPI version](https://badge.fury.io/py/safeeyes.svg)](https://badge.fury.io/py/safeeyes)
2020-12-20 15:34:51 +01:00
[![Debian](https://badges.debian.net/badges/debian/unstable/safeeyes/version.svg)](https://packages.debian.org/unstable/safeeyes)
[![AUR](https://img.shields.io/aur/version/safeeyes)](https://aur.archlinux.org/packages/safeeyes)
[![Flathub](https://img.shields.io/flathub/v/io.github.slgobinath.SafeEyes)](https://flathub.org/apps/details/io.github.slgobinath.SafeEyes)
2017-10-07 18:06:04 +02:00
[![Translation status](https://hosted.weblate.org/widgets/safe-eyes/-/translations/svg-badge.svg)](https://hosted.weblate.org/engage/safe-eyes/?utm_source=widget)
2020-12-20 15:28:49 +01:00
[![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)
2017-10-07 18:06:04 +02:00
2019-10-19 03:25:57 +02:00
Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder.
2016-10-15 06:11:27 +02:00
Visit the official site: https://slgobinath.github.io/SafeEyes/ for more details.
2017-02-13 18:12:33 +01:00
2020-07-10 14:20:17 +02:00
## Safe Eyes command-line arguments
2018-03-30 20:23:56 +02:00
```text
2017-10-07 18:06:04 +02:00
usage: safeeyes [-h] [-a | -d | -e | -q | -s | -t] [--debug] [--version]
Safe Eyes protects your eyes from eye strain (asthenopia) by reminding you to
take breaks while you're working long hours at the computer.
optional arguments:
-h, --help show this help message and exit
-a, --about show the about dialog
-d, --disable disable the currently running safeeyes instance
-e, --enable enable the currently running safeeyes instance
-q, --quit quit the running safeeyes instance and exit
-s, --settings show the settings dialog
-t, --take-break take a break now
--debug start safeeyes in debug mode
2018-01-29 02:22:13 +01:00
--status print the status of running safeeyes instance and exit
2017-10-07 18:06:04 +02:00
--version show program's version number and exit
```
2017-04-22 15:00:28 +02:00
## Installation guide
2018-03-30 20:23:56 +02:00
2024-06-29 14:36:50 +02:00
Safe Eyes is available on the official repositories of many popular the distributions.
<a href="https://repology.org/project/safeeyes/versions">
<img src="https://repology.org/badge/vertical-allrepos/safeeyes.svg" alt="Packaging status" align="right">
</a>
2024-06-29 14:36:50 +02:00
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.
2017-10-17 23:45:06 +02:00
### Ubuntu, Linux Mint and other Ubuntu Derivatives
2018-03-30 20:23:56 +02:00
2024-07-14 17:16:54 +02:00
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. On older versions of Ubuntu, an older version of Safe Eyes is available on the official repositories.
2024-06-29 14:36:50 +02:00
2018-03-30 20:23:56 +02:00
```bash
sudo add-apt-repository ppa:safeeyes-team/safeeyes
2017-10-17 23:45:06 +02:00
sudo apt update
sudo apt install safeeyes
```
### Arch
2018-03-30 20:23:56 +02:00
```bash
2019-10-19 03:25:57 +02:00
yay -S safeeyes
2017-10-17 23:45:06 +02:00
```
### Gentoo
2018-03-30 20:23:56 +02:00
```bash
2017-10-17 23:45:06 +02:00
sudo emerge -av x11-misc/safeeyes
```
### Debian
2018-03-30 20:23:56 +02:00
```bash
2017-10-24 17:26:01 +02:00
sudo apt-get install safeeyes
```
2017-10-17 23:45:06 +02:00
### Fedora
2018-03-30 20:23:56 +02:00
```bash
sudo dnf install python3-psutil python3-packaging cairo-devel python3-devel gobject-introspection-devel cairo-gobject-devel
2017-10-17 23:45:06 +02:00
sudo pip3 install safeeyes
sudo gtk-update-icon-cache /usr/share/icons/hicolor
```
### OpenSUSE Tumbleweed
```bash
sudo zypper refresh
sudo zypper install safeeyes
```
2022-10-13 17:56:00 +02:00
### Alpine Linux
```bash
sudo apk add safeeyes
```
### Flatpak
```bash
flatpak install flathub io.github.slgobinath.SafeEyes
```
2017-10-17 23:45:06 +02:00
### Other Linux & Run from source
2018-03-30 20:23:56 +02:00
2017-10-17 23:45:06 +02:00
Ensure to meet the following dependencies:
2017-05-03 21:04:13 +02:00
- gir1.2-notify-0.7
- python3-psutil
- xprintidle (optional)
- wlrctl (wayland optional)
- Python 3.10+
2017-05-03 21:04:13 +02:00
2017-10-17 23:45:06 +02:00
**To install Safe Eyes:**
2018-03-30 20:23:56 +02:00
```bash
2017-10-17 23:45:06 +02:00
sudo pip3 install safeeyes
```
2018-03-30 20:23:56 +02:00
2017-10-17 23:45:06 +02:00
After installation, restart your system to update the icons,
**To run from source:**
2018-03-30 20:23:56 +02:00
```bash
2017-10-17 23:45:06 +02:00
git clone https://github.com/slgobinath/SafeEyes.git
cd SafeEyes
python3 -m safeeyes
```
2018-03-30 20:23:56 +02:00
2017-10-17 23:45:06 +02:00
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.
2019-10-19 03:25:57 +02:00
### Install in a virtual environment
2019-10-19 03:25:57 +02:00
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.
2019-10-19 03:25:57 +02:00
1. Install the necessary dependencies for CentOS 7
2019-10-19 03:25:57 +02:00
2020-05-15 01:08:23 +02:00
```bash
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
2019-10-19 03:25:57 +02:00
```
2. Create a virtual environment in your home folder
2020-05-15 01:08:23 +02:00
```bash
2019-10-19 03:25:57 +02:00
mkdir ~/safeeyes
cd ~/safeeyes/
python3 -m venv venv
2019-10-19 03:25:57 +02:00
source venv/bin/activate
pip3 install safeeyes
2019-10-19 03:25:57 +02:00
```
3. Start Safe Eyes from the terminal
2019-10-19 03:25:57 +02:00
2020-05-15 01:08:23 +02:00
```bash
2019-10-19 03:25:57 +02:00
cd ~/safeeyes & source venv/bin/activate
python3 -m safeeyes
```
For more details, please check the issue: [#329](https://github.com/slgobinath/SafeEyes/issues/329)
2017-10-08 16:54:44 +02:00
## Features
2018-03-30 20:23:56 +02:00
2020-05-15 01:08:23 +02:00
- Remind you to take breaks with exercises to reduce RSI
- Disable keyboard during breaks
- Notification before and after breaks
- 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
2017-10-08 16:54:44 +02:00
2017-10-17 23:45:06 +02:00
## Third-party Plugins
2018-03-30 20:23:56 +02:00
2017-10-17 23:45:06 +02:00
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.
2017-10-08 16:54:44 +02:00
2023-07-05 02:09:53 +02:00
## How to Release?
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.
2023-07-05 02:09:53 +02:00
1. Checkout the latest commits from the `master` branch
2. Run `python3 -m safeeyes` to make sure nothing is broken
3. Update the Safe Eyes version in the following places (Open the project in VSCode and search for the current version):
2024-07-14 15:32:21 +02:00
- [setup.py](https://github.com/slgobinath/SafeEyes/blob/master/setup.py#L83)
- [setup.py](https://github.com/slgobinath/SafeEyes/blob/master/setup.py#L90)
2023-07-05 02:09:53 +02:00
- [safeeyes.py](https://github.com/slgobinath/SafeEyes/blob/master/safeeyes/safeeyes.py#L43)
2024-07-14 15:32:21 +02:00
- [io.github.slgobinath.SafeEyes.metainfo.xml](https://github.com/slgobinath/SafeEyes/blob/master/safeeyes/platform/io.github.slgobinath.SafeEyes.metainfo.xml#L56)
2023-07-05 02:09:53 +02:00
- [about_dialog.glade](https://github.com/slgobinath/SafeEyes/blob/master/safeeyes/glade/about_dialog.glade#L74)
4. Update the [changelog](https://github.com/slgobinath/SafeEyes/blob/master/debian/changelog) (for Ubuntu release)
5. Commit the changes to `master`
6. Create a pull-request from `master` to `release`
7. Merge the PR to release **with merge commit** (Important to merge with merge commit)
2017-04-18 17:55:57 +02:00
## License
2016-10-15 06:11:27 +02:00
GNU General Public License v3