Page 2 of 3

Re: bash prompts

Posted: Fri Mar 07, 2014 2:07 pm
by rust collector
Right, it does only show a ">" in the terminal window.
This gives me plenty of space to type stuff, even on a little netbook.
The name, and location goes in the top bar of the terminal.
Or as in my case, using dwm, it goes in the...eh..top bar of the wm.

Re: bash prompts

Posted: Fri Mar 07, 2014 2:11 pm
by wuxmedia
^ I like that, looks like that terminal on Jurassic Park 8) - nice having the user up in the bar.

Re: bash prompts

Posted: Fri Mar 07, 2014 3:34 pm
by machinebacon
Oh I see, rusty -- this is the problem if somebody (me) uses spectrwm without <class> or <window> names in the bar. Great idea!

Re: bash prompts

Posted: Fri Mar 07, 2014 3:36 pm
by rust collector
Yea, I see the problem there...
I will add a small comment about it, if anyone wants to try it, in the post.

Re: bash prompts

Posted: Fri Mar 07, 2014 3:40 pm
by machinebacon
Thinking aloud: it should be possible to let it be shown in dwm's upper corner (where usually dwm-6.0 sits), via xsetroot. Or into conky or xrootconsole or osd_cat... probably harder than just that.

Re: bash prompts

Posted: Fri Mar 07, 2014 3:49 pm
by rust collector
I would think a scripting guru could do that (meaning not me at the moment, even if I will try)
But why would you want to have the location your terminal "is at" up there all the time? what if you have more terminals open?

As it is, you see where the focused terminal is. I dunno if it would be possible to sort that in the root window, conky and so on?

Re: bash prompts

Posted: Fri Mar 07, 2014 4:19 pm
by kexolino

Code: Select all

PS1="$HC$FWHT┌─╼$FMAG[$FCYN\u$FMAG]$HC$FWHT╾─╼$FMAG[$FCYN\w$FMAG]$HC$FWHT\n└─╼$RS "
This is just a variation of what I've been using for two years now... Should note that so far it didn't look right in any other terminal than urxvt (the ╾─╼ part).
Oh yeah, should include this.

Re: bash prompts

Posted: Fri Mar 07, 2014 4:36 pm
by machinebacon
rust collector wrote:I would think a scripting guru could do that (meaning not me at the moment, even if I will try)
But why would you want to have the location your terminal "is at" up there all the time? what if you have more terminals open?

As it is, you see where the focused terminal is. I dunno if it would be possible to sort that in the root window, conky and so on?
As I wrote before, just thinking aloud. Shit like this is more about a proof of concept than any additional value, so no worries. The thing is that I am not a fan of additional panels, but I also hate conky. So, the healthiest idea would be a script that replaces the window border _and_ the sysinfo and time/date, much like Unity did. In case of more than one active terminal it would display the path of the active or prelighted one. So something like what the tmux powerline does, exactly, just on the root window.

Re: bash prompts

Posted: Fri Mar 07, 2014 5:49 pm
by rhowaldt
rust collector wrote:I would think a scripting guru could do that (meaning not me at the moment, even if I will try)
a good project is the start of any autodidactic learning experience. you do not honestly know you cannot do it, you just think you can't, because you never did it before. if you try it, the worst that can happen is you learn a whole bunch of cool stuff. the best is you will be able to finish the project and be more aware of your own abilities. you still definitely won't be a guru, but you will have some nice experience under your belt and something to share with your friends here.

just to be clear (Dutchclaimer, inserted as a result of personal experience):
the above is meant as superfriendly and honest encouragement.

Re: bash prompts

Posted: Fri Mar 07, 2014 6:12 pm
by rust collector
Oh yes, I do agree.
My biggest problem, when I am trying to learn...well...anything, is that I have no real goal to work towards.
I do want to learn bash scripting, but I am not quite authistic enough to just read the book of bash, and know it all.

I do need small projects to tinker with.

Thanks for your superfriendly encouragement. (That is what I thought it was)

Re: bash prompts

Posted: Fri Mar 07, 2014 6:39 pm
by dkeg
Another reason I love this place and you guys. For the 'I bet there is or could be another way' attitude. Fuck yeah guys! Great stuff.

Re: bash prompts

Posted: Fri Mar 07, 2014 9:23 pm
by wuxmedia
rust collector wrote:Oh yes, I do agree.
My biggest problem, when I am trying to learn...well...anything, is that I have no real goal to work towards.
I do want to learn bash scripting,
I feel the same, I need some goal to motivate me to write a script.

Re: bash prompts

Posted: Mon Jun 23, 2014 9:10 pm
by Sector11
I'm actually here because of wuxmedia's post mentioning SidBang ... and got cruising around...

So I figured ... leave something behind ...

Code: Select all

export PS1="${cal} \n \$(date +%d) \$(date +%h) \$(date +%y) $yellow| $light_blue\$(date +%T) $no_color\w\n    $light_blue\\$ $no_color"
Image
Of course it's noobish ... none of the (sample)

Code: Select all

\[\e]2;\u@\H \w\a\e[32;1m\]>\[\e[0m\]
code I see in other prompts :/

Re: bash prompts

Posted: Mon Jun 23, 2014 10:25 pm
by machinebacon
That's cute of you ;) Welcome back S11!

Re: bash prompts

Posted: Mon Jun 23, 2014 10:33 pm
by wuxmedia
They seem to be working you hard over at crunchcentral S11! you must be working through a backlog, my post was 4 months old 8)
More of a 'mention' than an advert 8p

Re: bash prompts

Posted: Mon Jun 23, 2014 10:34 pm
by Sector11
^ thanks ...

OT: BBQ-Summer seems to have forgotten my password as well as root's ... guess my fingers were playing hop-scotch on the keyboard with some config files and I made an Oops! hahahahahaha ... Oh well, it's a process.

re-installing again :)

Re: bash prompts

Posted: Mon Jun 23, 2014 10:51 pm
by Sector11
wuxmedia wrote:They seem to be working you hard over at crunchcentral S11! you must be working through a backlog, my post was 4 months old 8)
More of a 'mention' than an advert 8p
Yea, spammers are coming online by the dozen it seems, so it's busy. A post today in another thread linked to that "thread" so I read the whole thing as I know someone that has no DVD drive or USB. And you're right, "a mention", not 'advertising' ... big difference.

I shall edit my post.

Re: bash prompts

Posted: Mon Jun 23, 2014 10:58 pm
by dkeg
Hi S11! Hey, whatever suits your needs right?

Anyway, bash prompts, here's the one I've been using for awhile

Code: Select all

>>

Re: bash prompts

Posted: Tue Jun 24, 2014 12:32 am
by Sector11
^ which only goes to show that at times: simple is elegant.

Re: bash prompts

Posted: Tue Jun 24, 2014 2:02 am
by pidsley
Sector11 wrote:re-installing again :)
Next time don't reinstall; you will never learn anything that way.