The background color cannot be changed by editing the Ly config file at /etc/ly/config.ini. The bg variable in that config file refers only to the dialog box and the 'menu bar' at the top. The actual background of the entire screen will always be black no matter the bg value.
Somewhat confusing, I know.
There are a couple of ways we can edit the background (and foreground) colors. To better understand how we can achieve these goals, it's important to understand that we're actually not modifying the behavior of ly per se, but changing the colors of the tty session itself.
First, edit the file at /lib/systemd/system/ly.service and add the following in:
ExecStartPre=/usr/bin/printf '%%b' '\e]P0FFC5C4\e]P7FFFFFF\ec'
Like so:
[Unit]
Description=TUI display manager
After=systemd-user-sessions.service plymouth-quit-wait.service
[email protected]
[Service]
Type=idle
ExecStartPre=/usr/bin/printf '%%b' '\e]P0FFC5C4\e]P7FFFFFF\ec'
ExecStart=/usr/bin/ly
StandardInput=tty
TTYPath=/dev/tty2
TTYReset=yes
TTYVHangup=yes
[Install]
Alias=display-manager.service
The above example sets color0(bg) to #FFC5C4 and color7(fg) to #FFFFFF.
Now if you reboot your machine, the colors should've changed. However, when logging out, the colors will revert back to the defaults. To fix this, we need to modify another file and add in the same printf command.
In /etc/ly/config.ini uncomment term_reset_cmd and add the following:
/usr/bin/printf '%b' '\e]P0FFC5C4\e]P7FFFFFF\ec'
Like so:
term_reset_cmd = /usr/bin/tput reset; /usr/bin/printf '%%b' '\e]P0FFC5C4\e]P7FFFFFF\ec'
Now reboot and you should be good to go! 🤩
We can achieve the same thing by using the echo command. The steps are exactly the same, only difference being the command used. If you want to use this method instead, just replace the printf command with the following:
echo -en "\e]P0FFC5C4"; echo -en "\e]P7FFFFFF\ec"; clear
Couldn't get this to work for me :/