70 lines
2.1 KiB
Markdown
70 lines
2.1 KiB
Markdown
# 🖥️ i3 Wallpaper Manager
|
|
|
|
**i3 Wallpaper Manager** is a command-line tool designed to change the wallpaper depending of active workspaces on [i3](https://i3wm.org/). This tool works on one or multiple screens.
|
|
|
|
<video controls src="https://deblan.gitnet.page/i3-wallpaper-manager/demo.webm" type="video/webm" width="50%"></video>
|
|
|
|
_Thanks [AZProductions](https://github.com/AZProductions/AbstractCollection/)!_
|
|
|
|
## 📗 How to install the project
|
|
|
|
### Dependencies
|
|
|
|
- [Feh](https://feh.finalrewind.org/) (by default)
|
|
|
|
### Pre-compiled versions
|
|
|
|
Pre-compiled versions are available in the [Releases](https://gitnet.fr/deblan/i3-wallpaper-manager/releases). For Debian users, a package is also provided.
|
|
|
|
### From source
|
|
|
|
If you want to compile the project from source, you will need at least the GO compiler version 1.22. Clone the project and run the make command. The compiled output will be located in the `build` directory.
|
|
|
|
```
|
|
$ git clone https://gitnet.fr/deblan/i3-wallpaper-manager
|
|
$ make
|
|
```
|
|
|
|
## 🧪 How to use the project
|
|
|
|
To start, you need to create a configuration file in YAML format. This file consists of two keys: `default` to define the path of the default wallpaper, and `workspaces` which allows you to associate each workspace with its corresponding wallpaper.
|
|
|
|
```yaml
|
|
default: /home/alice/wallpapers/default.jpg
|
|
workspaces:
|
|
"Name of the workspace 1": /home/alice/wallpapers/1.jpg
|
|
"Name of the workspace 2": /home/alice/wallpapers/2.jpg
|
|
"Name of the workspace 3": /home/alice/wallpapers/3.jpg
|
|
```
|
|
|
|
Next, you simply need to run `i3-wallpaper-manager` and specify the path to the configuration file.
|
|
|
|
```bash
|
|
DISPLAY=:0 i3-wallpaper-manager /path/to/config.yaml
|
|
```
|
|
|
|
To run it when i3 starts, add this to your i3 configuration:
|
|
|
|
```bash
|
|
exec_always DISPLAY=:0 i3-wallpaper-manager /path/to/config.yaml
|
|
```
|
|
|
|
If you wish to use a program other than `feh`, set the `callback` parameter by specifying the path to your script.
|
|
|
|
```yaml
|
|
callback: /path/to/custom.sh
|
|
```
|
|
|
|
```bash
|
|
#!/bin/sh
|
|
# /path/to/custom.sh
|
|
|
|
SCREEN_1="$1"
|
|
WALLPAPER_1="$2"
|
|
|
|
SCREEN_2="$3"
|
|
WALLPAPER_2="$4"
|
|
# etc.
|
|
|
|
# Do stuff...
|
|
```
|