2023-10-15 02:59:11 +00:00
|
|
|
# sway-autostart-i3ipc
|
2023-10-15 02:45:56 +00:00
|
|
|
|
|
|
|
A smart but also lazy login autostart manager for i3/Sway.
|
2023-10-15 02:48:56 +00:00
|
|
|
Will conditionally exec other things defined in a YML dict.
|
2023-10-15 02:45:56 +00:00
|
|
|
|
|
|
|
Required i3/Sway config line:
|
2023-10-15 02:56:39 +00:00
|
|
|
|
2023-10-15 02:51:33 +00:00
|
|
|
```bash
|
2023-10-15 05:16:05 +00:00
|
|
|
exec path/to/startup.py
|
2023-10-15 02:51:33 +00:00
|
|
|
```
|
2023-10-15 02:45:56 +00:00
|
|
|
|
2023-10-15 05:23:01 +00:00
|
|
|
## Requirements
|
|
|
|
|
2023-10-15 15:46:23 +00:00
|
|
|
### Fedora / EL
|
2023-10-15 05:23:01 +00:00
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo dnf -yq install python3-{i3ipc,pyxdg,pyyaml,systemd}
|
|
|
|
```
|
|
|
|
|
2023-10-15 15:46:23 +00:00
|
|
|
### Debian / Ubuntu
|
2023-10-15 05:23:01 +00:00
|
|
|
|
|
|
|
```bash
|
2023-10-15 15:46:23 +00:00
|
|
|
sudo apt install python3-{i3ipc,systemd,xdg,yaml}
|
2023-10-15 05:23:01 +00:00
|
|
|
```
|
|
|
|
|
2023-10-15 02:48:56 +00:00
|
|
|
## Config sample
|
|
|
|
|
|
|
|
```yaml
|
2023-10-15 02:45:56 +00:00
|
|
|
---
|
|
|
|
autostarts:
|
|
|
|
pre: [] # blocking tasks that run every day, before any other section. intended for backups/updates
|
|
|
|
common: [] # non-blocking tasks that run every day
|
2023-10-15 05:12:08 +00:00
|
|
|
weekend: [] # blocking tasks for Saturday/Sunday, after 'pre' but before 'common'
|
2023-10-15 02:45:56 +00:00
|
|
|
work: [] # non-blocking tasks run if Monday through Friday between 8AM - 4PM
|
2023-10-15 02:48:56 +00:00
|
|
|
```
|
2023-10-15 05:12:08 +00:00
|
|
|
|
|
|
|
The config may be chosen with `-c path/to/autostart.yml`.
|
|
|
|
|
|
|
|
The default is `XDG_CONFIG_HOME/autostart-i3ipc.yml` _(typically in ~/.config)_
|
|
|
|
|
|
|
|
Work day autostarts may be temporarily disabled by creating `~/.vacation`.
|
|
|
|
When desired again, remove the file.
|