# Plymouth

Plymouth replaces boot messages with a pretty splash screen.

## Installation

~~~bash
yay -S plymouth ttf-dejavu
~~~

## Configuration
Enabling Plymouth requires editing the `HOOKS` array in `/etc/mkinitcpio.conf`. Depending on what your initramfs is based on the hooks slightly differ.

### Busybox
If your initramfs is busybox-based (default in Arch Linux), add the `plymouth` hook **after** the `base` and `udev` hooks:

<div class="callout warning">
  <p><strong>ATTENTION:</strong> When using the <code>encrypt</code> hook to unlock encrypted devices during boot, place it <strong>after</strong> the <code>plymouth</code> hook in order to receive a passphrase prompt, e.g.:</p>
  <pre><code>HOOKS=(base udev <strong>plymouth</strong> autodetect keyboard keymap consolefont modconf block <strong>encrypt</strong> lvm2 filesystems fsck)</code></pre>
</div>

~~~
HOOKS=(base udev plymouth ...)
~~~

### Systemd
If your initramfs is systemd-based (i.e. to make use of `systemd-cryptenroll`), add the `plymouth` hook **after** the `base` and `systemd` hooks:

<div class="callout warning">
  <p><strong>ATTENTION:</strong> When using the <code>sd-encrypt</code> hook to unlock encrypted devices during boot, place it <strong>after</strong> the <code>plymouth</code> hook in order to receive a passphrase prompt, e.g.:</p>
  <pre><code>HOOKS=(base systemd <strong>plymouth</strong> autodetect keyboard sd-vconsole modconf block <strong>sd-encrypt</strong> lvm2 filesystems fsck)</code></pre>
</div>

~~~
HOOKS=(base systemd plymouth ...)
~~~

## Theming
A great selection of Plymouth themes can be found [on the AUR](https://aur.archlinux.org/packages/?K=plymouth%2Dtheme).

To list available Plymouth themes (alternatively `ls /usr/share/plymouth/themes`):

~~~bash
plymouth-set-default-theme -l
~~~

Set the Plymouth theme and rebuild (`-R`) the initramfs, e.g. BGRT (keeps firmware logo and displays a spinner in a similar fashion to Windows):

<div class="callout info">
  <p><strong>TIP:</strong> When unlocking a LUKS encrypted root file system during boot the passphrase prompt replaces the firmware logo. To prevent this install and set the following theme instead:</p>
  <pre><code class="language-bash">yay -S plymouth-theme-bgrt-better-luks
sudo plymouth-set-default-theme -R bgrt-better-luks</code></pre>
</div>

~~~bash
sudo plymouth-set-default-theme -R bgrt
~~~

Reboot and enjoy!