You are not logged in.

#1 2018-05-02 11:41:05

smerdjakov
Member
Registered: 2018-04-27
Posts: 11

Optimize Arch Linux prompt with colours [SOLVED]

Well, I chose Arch as my first OS because of its hyper-customizability. I configured my terminal close to perfection: transparency check, ttf-dejavu font check, directory colours check... The only thing I can't figure out how to do is colour my

[user@arch ~]$

a certain way. For example, I'd like to have 'user@arch' coloured red and '~' (and all other directories) coloured blue. Then, my customization will be complete. Please help me. Thank you in advance.

Last edited by smerdjakov (2018-05-02 15:07:06)

Offline

#2 2018-05-02 11:44:26

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: Optimize Arch Linux prompt with colours [SOLVED]


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2018-05-02 11:56:41

smerdjakov
Member
Registered: 2018-04-27
Posts: 11

Re: Optimize Arch Linux prompt with colours [SOLVED]

Could you please be more specific? As far as I can tell, the tutorial only touches on how to customize specific words in the prompt. However, I'm looking for a dynamic solution. If you could post a script that would colour:

[<name of the user>@<name of the system> <directory>]$

a certain way, that would be great. For example

<name of the user> = colour_1
<name of the system> = colour_2
<directory> = colour_3

That's the solution I'm looking for.

Last edited by smerdjakov (2018-05-02 11:57:05)

Offline

#4 2018-05-02 12:05:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: Optimize Arch Linux prompt with colours [SOLVED]


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2018-05-02 13:21:52

smerdjakov
Member
Registered: 2018-04-27
Posts: 11

Re: Optimize Arch Linux prompt with colours [SOLVED]

I'm not very fond of the Arch syntax yet. Which answer on the thread would server my purpose best?

Offline

#6 2018-05-02 14:27:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: Optimize Arch Linux prompt with colours [SOLVED]

All of them.  Any of them.  Make an effort and don't be a help vampire.

https://wiki.archlinux.org/index.php/Co … ow_to_post
http://slash7.com/2006/12/22/vampires/


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2018-05-02 15:05:43

smerdjakov
Member
Registered: 2018-04-27
Posts: 11

Re: Optimize Arch Linux prompt with colours [SOLVED]

Well, you don't have to be insulting. I'm new to both the community and to the OS itself, so my questions won't be formatted perfectly (as could be expected). Well, I managed. To anyone who seeks to optimize their terminal in the likeness of Kali GNU/Linux, here's what you want to run to get the correct output for a user ($):

PS1='\[\e[1;31m\]\u@\h\[\e[m\]:\[\e[1;34m\]\W\[\e[m\]$ '

And for root (#)

PS1='\[\e[1;31m\]\u@\h\[\e[m\]:\[\e[1;34m\]\W\[\e[m\]# '

I'm marking my question as solved.

Offline

#8 2018-05-02 15:51:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,849

Re: Optimize Arch Linux prompt with colours [SOLVED]

He's not insulting, the notion is common
You'll get help here (referencing the relevant wiki or some examples), but we're not going to hold your hand, noob or not.
You *are* required to make an effort to understand what you do. If you want pre-fabbed "solutions", you're using the wrong distro.

Offline

Board footer

Powered by FluxBB