[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmonad
Subject:    [xmonad] rcxterm - a colorful terminal emulator script that goes great with xmonad.
From:       Yanom Mobis <yanom () rocketmail ! com>
Date:       2013-05-26 18:27:25
Message-ID: 1369592845.21192.YahooMailNeo () web161506 ! mail ! bf1 ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Tired of all your terminals having the same color scheme? I wrote program that fixes \
that. 


#!/usr/bin/python
import random
import os
available_colors = ["magenta","yellow", "white", "green", "cyan", "orange","red"]
fontsize = 22
font = "terminus"
color = random.choice(available_colors)
font = "-*-" + font + "-*-*-*-*-" + str(fontsize) + "-*-*-*-*-*-*-*"
command = 'xterm -font \"' + font + '\" -bg black' + ' -fg ' + color
os.system(command)


save that as /usr/bin/rcxterm and make it executable. Now set terminal="rcxterm" in \
xmonad.hs. Now, every time you open an XTerm, it gets assigned a random foreground \
color from the list. Here's a screenshot:  http://i43.tinypic.com/334us1e.png

You may have to change font = "terminus" to a font name you have on your system. The \
xfontsel program can find one for you. Also, I'm pretty sure there's a way to write \
this script in Haskell, but I only know Python. 


enjoy!


[Attachment #5 (text/html)]

<html><body><div style="color:#000; background-color:#fff; font-family:lucida \
console, sans-serif;font-size:12pt"><div>Tired of all your terminals having the same \
color scheme? I wrote program that fixes that. <br></div><div><br></div><div \
style="color: rgb(0, 0, 0); font-size: 16px; font-family: lucida console,sans-serif; \
background-color: transparent; font-style: normal;">#!/usr/bin/python<br>import \
random<br>import os<br>available_colors = ["magenta","yellow", "white", "green", \
"cyan", "orange","red"]<br>fontsize = 22<br>font = "terminus"<br>color = \
random.choice(available_colors)<br>font = "-*-" + font + "-*-*-*-*-" + str(fontsize) \
+ "-*-*-*-*-*-*-*"<br>command = 'xterm -font \"' + font + '\" -bg black' + ' -fg ' + \
color<br>os.system(command)<br></div><div style="color: rgb(0, 0, 0); font-size: \
16px; font-family: lucida console,sans-serif; background-color: transparent; \
font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px;  \
background-color: transparent; font-style: normal; font-family: lucida \
console,sans-serif;">save that as /usr/bin/rcxterm and make it executable. Now set \
terminal="rcxterm" in xmonad.hs. Now, every time you open an XTerm, it gets assigned \
a random foreground color from the list. Here's a screenshot:&nbsp; <a \
href="http://i43.tinypic.com/334us1e.png">http://i43.tinypic.com/334us1e.png</a></div><div \
style="color: rgb(0, 0, 0); font-size: 16px; font-family: lucida console,sans-serif; \
background-color: transparent; font-style: normal;"><br></div><div \
class="yui_3_7_2_31_1369591914030_38" style="color: rgb(0, 0, 0); font-size: 16px; \
font-family: lucida console,sans-serif; background-color: transparent; font-style: \
normal;">You may have to change font = "terminus" to a font name you have on your \
system. The xfontsel program can find one for you. Also, I'm pretty sure there's a \
way to write this script in Haskell, but I only know Python. <br></div><div  \
class="yui_3_7_2_31_1369591914030_38" style="color: rgb(0, 0, 0); font-size: 16px; \
font-family: lucida console,sans-serif; background-color: transparent; font-style: \
normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: \
lucida console,sans-serif; background-color: transparent; font-style: \
normal;">enjoy!<br></div></div></body></html>



_______________________________________________
xmonad mailing list
xmonad@haskell.org
http://www.haskell.org/mailman/listinfo/xmonad


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic