You are not logged in.
I realized a few days ago that I got tired of looking up arcane bash escape sequences just to customize my bash prompt. In the open source fashion, I wrote a gui in pyGTK that will automatically make one for you, if you just pick the things you want from a menu. It's not really done yet and there's still stuff that I need to add to it, but I thought i'd see if anyone around here had any comments, or would find it useful.
Check it out: https://github.com/wisp558/promptool
It's worth noting that I only implemented 3 of the most common bash variables, but I should fix that soon. (and the bold button is broken)
Last edited by wisp558 (2011-08-19 09:31:46)
Offline
very nice. I remember how people had cool PS1s when I first started using linux. Eventually I made aliases for all the colors (for me only understanding the colors was a bit difficult at first what with all the escape sequences) and its a bit easier now. But this could be great help to linux newbies.
Thanks
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Agreed, great idea. I did mine many, many moons ago but wouldn't have a clue how to change it now (okay, so I like it ). This would make me more flexible.
never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::
Offline
Yeah, the way I look at it is that it's just a pain, when it doesn't have to be.
EDIT: I added a bunch of other bash variables, so it's a lot less worthless now.
Last edited by wisp558 (2011-08-19 10:15:13)
Offline
Offline
I think so too! That will be added as soon as I figure out how gtk.TextView works and implement it instead of the gtk.Entry that I'm using now. If anyone has any pointers, it will speed up the process, but otherwise it will still get done, it'll just take me a bit more time.
In other news, I updated the layout code, the whole thing should look a bit nicer and better-formatted. In the meantime, here's a screenshot:
Last edited by wisp558 (2011-08-22 20:50:17)
Offline
Update! I've updated the tool to work with the gtk.TextView. Notable improvements are multi-line editing, and not having those stupid (?red) things everywhere! See for yourself:
Offline
wow, this looks great.
i may have to check this out, when i get home
Offline
Offline
Nice! Good to see how this project develops . Another suggestion I have, is to add bright color (e.g.: \e[1;30m) support.
Last edited by Doomcide (2011-08-25 13:39:50)
Offline
Nice! Good to see how this project develops . Another suggestion I have, is to add bright color (e.g.: \e[1;30m) support.
Yeah, I plan to. Other things I'm looking at include a place to select the text color, (It'll use the last color in the prompt), background colors, underlined things and changing the whole textview background (I use a black urxvt, personally). I may even add a thing to save prompts or something. I might add an option to append the PS1 to one's ~/.bashrc, making the gui display the finished prompt rather than the terminal and more! I have plenty of ideas left!
As a note, the escape you posted is just the bold option I already have. There is a high intensity option in bash, which I will look into, although it does nothing in my terminal. Those are things like '\e[0;90m' and its friends.
Thanks for your feedback, guys.
Offline
I just made a PKGBUILD real quick, see here
Offline
You should also make sure that you add the pygtk dependency. I suppose making it a shell-script thing is the way to go here. Putting the python stuff in opt sort of makes sense. I've been considering putting the stuff in helper in main.py, and maybe renaming it to be promptool.py. I was originally planning for this to be a bit more modular, but it turned out that I need hooks into the GTK interfaces for pretty much everything, so it all became centralized. When I get around to adding more shells (*coughzshcough*) It might wind up being modular again, stuff like bash.py and zsh.py and whateverelse.py with a main.py, but at the moment it doesn't make sense to, and it's a somewhat low priority, compared to a lot of the stuff I mentioned above. People who want a custom shell can probably make their own prompts, heh. Regardless, what exactly is the promptool.sh script that you use there? Running Main.py directly should work; I set it to run /usr/bin/python2, though I should probably set it to /usr/bin/env python2.
Offline
Seems neat, any plans for a zsh version?
Offline
Yep, I mentioned that in my previous post. I"m currently in the business of moving, so updates are gonna slow for a few days.
Offline
I just updated and the color-buttons don't show a color anymore, the text is colored though.
Offline
what exactly is the promptool.sh script that you use there?
That script only cd's into the directory where main.py and helper.py are stored and then executes main.py. In case you throw everything into one file, I'll install this into /usr/bin. But thanks mentioning pygtk as a dependency, I'll change that. In case anyone wants to adopt the package, I'll abandon it after this little update, because I don't really use it, 1st because I use zsh and 2nd because my prompt is fine Just wanted to share it, since I already created it.
Offline
Offline
@Doomcide: wisp558 posted this only less than a month ago. I'm sure its still in development.
joe@trusktr.io - joe at true skater dot io.
Offline
Correct!
I wound up moving a month ago, and development sort of fell by the wayside. I've been working on this again, however, and I've already made one new feature, and more are sure to follow. Sorry about the wait, but this is definitely still alive.
Offline
Offline
Hey! I've come back! If you check the github, you'll see that I added basic support for zsh. I plan to add new things in the next few weeks, as well as do a code cleanup. If you saw this and despaired due to its status as vaporware, despair no further. IAlso, if you have more feature requests, I'd love to hear them. (Also, I plan to fix the extreme bugginess of deleting whole symbols)
Offline