Page 1 of 3

Re: Screenshots

Posted: Mon Sep 02, 2013 1:30 pm
by dkeg
just something I picked up on the interwebs, and cleaned up a bit. the one in the scrot above I just moved the newline character to before the working directory.
edit: just use this, pretty much the original. I found issues with my modified version

Code: Select all

PS1="\[\033[0;37m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[0;33m\]\u\[\033[0;37m\]]\342\224\200[\[\033[0;31m\]\h'; else echo '\[\033[0;36m\]\u\[\033[0;37m\]]\342\224\200[\[\033[0;31m\]\h'; fi)\[\033[0;37m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;37m\]]\n\[\033[0;37m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]" 

Re: Screenshots

Posted: Mon Sep 02, 2013 6:53 pm
by digz
dkeg wrote:just something I picked up on the interwebs, and cleaned up a bit. the one in the scrot above I just moved the newline character to before the working directory.
edit: just use this, pretty much the original. I found issues with my modified version

Code: Select all

PS1="\[\033[0;37m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[0;33m\]\u\[\033[0;37m\]]\342\224\200[\[\033[0;31m\]\h'; else echo '\[\033[0;36m\]\u\[\033[0;37m\]]\342\224\200[\[\033[0;31m\]\h'; fi)\[\033[0;37m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;37m\]]\n\[\033[0;37m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]" 
beautiful, thanks. do you know how i can set it to start with each new terminal window?

edit- nevermind, worked it out.

Re: Screenshots

Posted: Mon Sep 02, 2013 6:59 pm
by DebianJoe
Set it in your ~/.bashrc digz, assuming that bash is your default shell.

Re: Screenshots

Posted: Mon Sep 02, 2013 7:01 pm
by digz
you beat me to editing my post (;

Re: Screenshots

Posted: Mon Sep 02, 2013 7:10 pm
by dkeg
Great!

Open up and place in your .bashrc

Edit, woop, too late

edit2: cleaned up simpler version

Code: Select all

PS1="\[\033[0;37m\]\[[\033[0;36m\]\u\[\033[0;37m\]]\342\224\200[\[\033[0;31m\]\h\[\033[0;37m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;37m\]]\n\[\033[0;37m\]\342\224\224\342\224\200\342\224\200\342\225\274\[\033[0m\]"
If interested, this is the breakdown

Code: Select all

[username] - \[\033[0;37m\]\[[\033[0;36m\]\u\[\033[0;37m\]]

dash - \342\224\200

[hostname] - [\[\033[0;31m\]\h\[\033[0;37m\]]

dash - \342\224\200

[working directory] - [\[\033[0;32m\]\w\[\033[0;37m\]]

newline - \n

line - \[\033[0;37m\]\342\224\224\342\224\200\342\224\200\342\225\274

entered command - \[\033[0m\]
result
Image

Re: Screenshots

Posted: Mon Sep 02, 2013 9:01 pm
by digz
hrm, that version gives me:
└â\ 200─╼
could you share your wall?

Re: Screenshots

Posted: Mon Sep 02, 2013 9:15 pm
by dkeg
try again, there were some unwanted spaces in there.

wall
http://s19.postimg.org/vi1ozy96r/fogforest.jpg

Re: Screenshots

Posted: Mon Sep 02, 2013 9:45 pm
by digz
cheers, working now.

Re: bash prompts

Posted: Thu Oct 24, 2013 7:02 am
by machinebacon
I like that. Can you show the PS1= ?

Re: bash prompts

Posted: Thu Oct 24, 2013 7:16 am
by rhowaldt
i always liked those prompts that had the info, then the ASCII-lines and shit to the line underneath. beautiful. i use a much simpler prompt myself but if i ever switch it will be to something like that.

Re: bash prompts

Posted: Thu Oct 24, 2013 1:53 pm
by dkeg
machinebacon wrote:I like that. Can you show the PS1= ?
pretty much the same as the PS1 posted above, with some slight mods to add battery status to the prompt

Code: Select all

PS1="\[\033[0;37m\]\][\[\033[0;35m\]\$(/path/to/battstat.sh)\033[0;37m\]]\342\224\200[\[\033[0;31m\]\[\A\[\033[0;37m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;37m\]]\n\[\033[0;37m\]\342\224\224\342\224\200\342\224\200\342\224\200\342\224\200\342\225\274 \[\033[0m\]"

Re: bash prompts

Posted: Thu Oct 24, 2013 6:03 pm
by machinebacon
Thanks Drew, I just noticed that we're in the bash_prompts thread :D Sorry for the trouble :)

Re: bash prompts

Posted: Thu Oct 24, 2013 6:15 pm
by dkeg
never trouble.

Re: bash prompts

Posted: Fri Oct 25, 2013 12:51 pm
by wuxmedia
^ did you mean green, with envy? or actually become yellow hued? have to stick the ansi weather script in there for S11 8P

Re: bash prompts

Posted: Sat Oct 26, 2013 1:52 pm
by dkeg
I split off the battstat in prompt to the HOWTO section.

http://www.linuxbbq.org/bbs/viewtopic.php?f=19&t=807

Re: bash prompts

Posted: Fri Nov 29, 2013 8:55 am
by GekkoP
This looks bloat, but it may be fun.
https://github.com/nojhan/liquidprompt

Re: bash prompts

Posted: Thu Dec 12, 2013 12:23 pm
by Titan
Thanks Drew, ive added this to my bashrc.

Re: bash prompts

Posted: Thu Jan 09, 2014 8:42 pm
by mrneilypops
Very nice work!

Re: bash prompts

Posted: Fri Mar 07, 2014 2:29 am
by rust collector
This is not anything fancy, but it is my favorite ps1 line:

Code: Select all

PS1="\[\e]2;\u@\H \w\a\e[32;1m\]>\[\e[0m\] "
This will only work properly if your terminal or window manager has an
"information area" like a toolbar, or so.
If it does not, you won't know where you are!

Re: bash prompts

Posted: Fri Mar 07, 2014 4:25 am
by machinebacon
Thanks rusty! Is it meant to show only a ">"? For me it does (I'm using bash indeed). Though from what I see in the line, it should at least show the user name and the host...

Can you make a quick scrot of yours?