niri
Clone
https://git.tahinli.com/Tahinli/niri.git
0 watching0 forksRustGPL-3.012.1 MiB64a9351Ivan Molodetskikh2 years ago1319 commits
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | 1. |
| 8 | 2. |
| 9 | |
| 10 | This is a special systemd folder. |
| 11 | Any services linked there will be started together with `niri.service` (which is a systemd unit used by niri when running as a session). |
| 12 | |
| 13 | 3. |
| 14 | |
| 15 | ``` |
| 16 | ln -s /usr/lib/systemd/user/mako.service ~/.config/systemd/user/niri.service.wants/ |
| 17 | ln -s /usr/lib/systemd/user/waybar.service ~/.config/systemd/user/niri.service.wants/ |
| 18 | ``` |
| 19 | |
| 20 | 4. |
| 21 | |
| 22 | |
| 23 | |
| 24 | ``` |
| 25 | [Unit] |
| 26 | PartOf=graphical-session.target |
| 27 | After=graphical-session.target |
| 28 | Requisite=graphical-session.target |
| 29 | |
| 30 | [Service] |
| 31 | ExecStart=/usr/bin/swaybg -m fill -i "%h/Pictures/LakeSide.png" |
| 32 | Restart=on-failure |
| 33 | ``` |
| 34 | |
| 35 | Replace the image path with the one you want. |
| 36 | `%h` is expanded to your home directory. |
| 37 | |
| 38 | After editing `swaybg.service`, run `systemctl --user daemon-reload` so systemd picks up the changes in the file. |
| 39 | |
| 40 | Now, also symlink this to `niri.service.wants`: |
| 41 | |
| 42 | ``` |
| 43 | ln -s ~/.config/systemd/user/swaybg.service ~/.config/systemd/user/niri.service.wants/ |
| 44 | ``` |
| 45 | |
| 46 | 5. |
| 47 | |
| 48 | ``` |
| 49 | [Unit] |
| 50 | PartOf=graphical-session.target |
| 51 | After=graphical-session.target |
| 52 | Requisite=graphical-session.target |
| 53 | |
| 54 | [Service] |
| 55 | ExecStart=/usr/bin/swayidle -w timeout 601 'niri msg action power-off-monitors' timeout 600 'swaylock -f' before-sleep 'swaylock -f' |
| 56 | Restart=on-failure |
| 57 | ``` |
| 58 | |
| 59 | Then, run `systemctl --user daemon-reload` and symlink this file to `niri.service.wants`: |
| 60 | |
| 61 | ``` |
| 62 | ln -s ~/.config/systemd/user/swayidle.service ~/.config/systemd/user/niri.service.wants/ |
| 63 | ``` |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 |