Skip to content

Commit

Permalink
Update build script and instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
chase9 committed Apr 12, 2024
1 parent ca95eed commit d8c870f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 34 deletions.
67 changes: 38 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
![](https://img.shields.io/badge/Build%20with-Python-yellow)
![](https://img.shields.io/github/license/oskarsh/yin-yang)

Auto Night-mode for Linux, it supports popular Desktops like KDE, GNOME, Budgie
Auto Night-mode for Linux, it supports popular Desktops like KDE, GNOME, Budgie
and also themes your favourite editors like VSCode or Atom.

You might also want to take a look at our [**discussions page**](https://github.com/oskarsh/Yin-Yang/discussions), where we talk about the future of the app and other cool stuff!
Expand All @@ -16,53 +16,58 @@ You might also want to take a look at our [**discussions page**](https://github.

## Features

* Changes your themes at certain times or sunrise and sunset
* Supported Desktops:
* GNOME
* Budgie
* KDE Plasma
* Supported applications:
* VSCode, Atom, gedit
* Firefox & Brave
* Kvantum
* Konsole
* OnlyOffice
* and more...
* Miscellaneous:
* Wallpaper change
* Notifications on theme change
* Play a sound
* Ability to run custom scripts
- Changes your themes at certain times or sunrise and sunset
- Supported Desktops:
- GNOME
- Budgie
- KDE Plasma
- Supported applications:
- VSCode, Atom, gedit
- Firefox & Brave
- Kvantum
- Konsole
- OnlyOffice
- and more...
- Miscellaneous:
- Wallpaper change
- Notifications on theme change
- Play a sound
- Ability to run custom scripts

> To see planned features and the development status, visit the [project status page](https://github.com/oskarsh/Yin-Yang/projects?type=classic).
## Installation

### Arch-based distributions
Yin-Yang can be downloaded from AUR as [yin-yang](https://aur.archlinux.org/packages/yin-yang) package.

Yin-Yang can be downloaded from AUR as [yin-yang](https://aur.archlinux.org/packages/yin-yang) package.

### Source
Yin-Yang depends on `python-systemd` and `pyside6` from pypi. `python-systemd` requires you have installed the systemd-headers from your package manager. You also need python development headers (e.g. `python3-devel`).

Yin-Yang depends on `python-systemd` and `pyside6` from pypi. `python-systemd` requires you have installed the systemd-headers from your package manager. You also need python development headers (e.g. `python3-devel`) and the poetry build system for python.

For CentOS, RHEL, and Fedora:

```bash
sudo dnf install gcc systemd-devel python3-devel libnotify
```
sudo dnf install gcc systemd-devel python3-devel libnotify poetry
```

For OpenSUSE:

```bash
sudo zypper refresh
sudo zypper install gcc systemd-devel libnotify
sudo zypper install gcc systemd-devel libnotify python311-poetry
```

For Debian, Ubuntu, etc.

```bash
sudo apt update
sudo apt install libsystemd-dev gcc pkg-config python3-dev libnotify-bin
sudo apt install libsystemd-dev gcc pkg-config python3-dev libnotify-bin python3-poetry
```

Then you can install Yin-Yang in a python virtual environment:

```bash
# bash is necessary to run the source command
bash
Expand All @@ -73,11 +78,15 @@ cd Yin-Yang
./scripts/install.sh
```

For development, skip the install and instead create a venv in your home directory:
For development, skip the install and instead build python using Poetry. A virtual environment will be created for you:

```bash
python -m venv .venv
source .venv/bin/activate # this is for bash, there are similar scripts in the that directory for other shells like fish
pip install -r requirements.txt
# Install dependencies
poetry install --sync
# Load into virtual environment
poetry env use python
# Load Yin-Yang
poetry run python -m yin_yang
```

### Uninstall
Expand All @@ -88,7 +97,7 @@ Run `scripts/uninstall.sh` from a terminal and fill out the password.

Want to help out? Check out the wiki to learn how to contribute translations, plugins and more!

[![Generic badge](https://img.shields.io/badge/Visit-Wiki-BLUE.svg)](<https://github.com/oskarsh/Yin-Yang/wiki>)
[![Generic badge](https://img.shields.io/badge/Visit-Wiki-BLUE.svg)](https://github.com/oskarsh/Yin-Yang/wiki)

## Related or similar projects

Expand Down
12 changes: 7 additions & 5 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ echo "Uninstalling old version, if it exists"
./scripts/uninstall.sh

echo "Installing dependencies …"
# create virtual environment
python3 -m venv /opt/yin-yang/.venv
source /opt/yin-yang/.venv/bin/activate
/opt/yin-yang/.venv/bin/pip3 install --upgrade setuptools pip wheel
/opt/yin-yang/.venv/bin/pip3 install -r requirements.txt
# Tell Poetry not to use a keyring
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
# create virtual environment and install packages
poetry install --sync
poetry env use python
poetry build
pip install ./dist/yin_yang-*-py3-none-any.whl

echo "Installing yin yang"
#check if /opt/ directory exists else create
Expand Down

0 comments on commit d8c870f

Please sign in to comment.