-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uniquely colorize hostname based on a hash` #82
Conversation
Awesome idea! |
Yeah, great idea! |
Uniquely colorize hostname based on a hash`
My Ubuntu box complains about md5 being deprecated at every prompt refresh. I worked around this by using hashlib instead:
|
Do you want to send this as a pull request? |
Please do -- Ref. http://docs.python.org/2/library/md5.html |
Hi Shrey, I hadn't noticed much performance hit so I did a couple quick runs on the I'll add something to the README shortly. DETAILSekyuma-kya-okupa /mnt/sdb/CODE_stuff/git/powerline-shell master + ekyuma-kya-okupa /mnt/sdb/CODE_stuff/git/powerline-shell master + ekyuma-kya-okupa /mnt/sdb/CODE_stuff/git/powerline-shell master + ekyuma-kya-okupa /mnt/sdb/CODE_stuff/git/powerline-shell mine + ekyuma-kya-okupa /mnt/sdb/CODE_stuff/git/powerline-shell mine + ekyuma-kya-okupa /mnt/sdb/CODE_stuff/git/powerline-shell mine + (206) 414-8475 On Sun, Jul 21, 2013 at 4:12 AM, Shrey Banga notifications@gh.neting.ccwrote:
|
I really like the colored hostnames, but I like to have the powerline-shell.py script as a standalone script in my dotfiles repo and the lib module is preventing that. I think it would be better to embed these functions into the segment or use an external module. |
That's a fair point. Do you want to do this and send a pull request? |
I think it would be preferable to embed them in an external module, because (206) 414-8475 On Thu, Aug 1, 2013 at 11:23 PM, Shrey Banga notifications@gh.neting.ccwrote:
|
Uniquely colorize hostname based on a hash`
Uniquely colorize hostname based on a hash`
Many times I find myself sshed into 2+ computers and I sometimes will make mistakes because I don't realize which one I'm on. In order to combat this forgetfulness I wrote a new segment...
...which:
I also did a fair amount of testing (see image below) to make sure the function worked and didn't generate anything super unreadable. I'll probably be using this and committing to it as time goes on and I'd be glad to hear what you think.
Thanks,
Ryan