Results 1 to 5 of 5

Thread: [Bash/Python] Colourful shells

  1. #1
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,691
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default [Bash/Python] Colourful shells

    Paste this in your shell to get a colourful and dynamic shell. (Bash only, requires python to be installed)

    bash Code:
    export PS1="\[\` /usr/bin/python -c \"print ''.join(map(lambda x : '\033[%i;1m%s\033[0;0m' % (__import__('random').randint(31, 38), x),  __import__('sys').argv[1]))\" '\u@\h \w $ ' \`\]"

    Readable version:

    bash Code:
    export PS1="\[\` /usr/bin/python -c \"
    s = '\033[%i;1m%s\033[0;0m'
    out = ''
    import sys
    from random import randint
    arg = sys.argv[1]
    for i in arg:
        out += s % (randint(31, 38), i)
    print out\" '\u@\h \w $ ' \`
    \]"



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  2. #2
    Join Date
    Aug 2006
    Location
    London
    Posts
    2,021
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    *thumbs up*
    Join the Official SRL IRC channel. Learn how to Here.

  3. #3
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    bump.
    fixed white space
    Last edited by noidea; 11-21-2010 at 02:18 PM.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  4. #4
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,691
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Nice...



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  5. #5
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    Nice...
    This is awesome

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •