I tried installing EndeavourOS - Xfce,KDE and i3. All of them come with xfce4 terminal which I loved back when I was on manjaro. But the xfce4 terminal on my Endeavour install is absolute garbage out of the box.
The current working directory isn’t bolded or any different color;
I noticed that the terminal has a custom EndeavourOS preset (preferences->colors) but when changing to some other presets it doesn’t bold the current working directory to bold or different color. The transparency also isn’t working…
Is there any way to get my terminal to look like this for example:
KDE does not come with it, can’t explain how to change the terminal but someone should be able to guide you through it, I’m just too tired to explain sorry
This behaviour is controlled by the PS1 variable for all terminals, xfce, KDE’s konsole, alacritty, xterm, …
Open your ~/.bashrc and put the following at the end for a change:
# when system is accessed via SSH, hostname with light grey background
if [[ $(pstree -s $$) = *sshd* ]]; then sshbg="\[\033[48;5;7m\]"; fi
# when used as root, change username to orange and '#' to red for prompt
if [ $(id -u) -eq 0 ]; then usercol="\[\033[38;5;3m\]"; hashcol="\[\033[38;5;1m\]"; else usercol="\[\033[38;5;2m\]"; fi
# bash PS1 prompt. $(realpath .) instead of \w avoids symlink paths
PS1="${usercol}\u\[$(tput sgr0)\]@\[$(tput sgr0)\]\[\033[38;5;4m\]${sshbg}\h\[$(tput sgr0)\]:\[$(tput sgr0)\]\[\033[38;5;6m\]\w\[$(tput sgr0)\]${hashcol}\\$ \[$(tput sgr0)\]"
unset sshbg rootcol hashcol
Best if you delete any other line which starts with PS1 in your current .bashrc.
What you presented on the second screen is the close-to-default Debian prompt, which is not present on Arch-based distros.
To change that, you need to modify your prompt in .bashrc file.
Open .bashrc in nano or other text editor and type your desired PS1 shape.
In your case that would be: PS1='\e[1;32m\u@\h \w\$ '
for: \e[1;32m – green colour \u – your username \h – your hostname \w – your current directory \$ – whether you’re a regular user ($) or root (#)
Taught me a lesson as well how quick things can go wrong.
I was doing
rm this
rm that
rm another
rm lastthing
# and then I wanted to type chmod but my muscle memory typed `rm`
rm a-x *
# which complained about the lack of the file `a-x`,
# but still deleted the rest.
Soo happy that I did routine backups of this directory every hour or so.
Thank you!!!
This does the job for now. In the future I’ll my own my custom .bashrc file.
The thing I learned is that the “color” depends on your color preset in (preferences->colors) so it isn’t given explicitly; for example it’s not an R:G:B value but the equivalent of in this case “green” which changes based on your color preset.