Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fortune mod text color
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
aerotech
n00b
n00b


Joined: 04 Oct 2003
Posts: 42
Location: USA

PostPosted: Fri Oct 24, 2003 4:45 pm    Post subject: fortune mod text color Reply with quote

could anybody tell me how-to change the color of the text for my fortune-mods.

I have them added to .bash_profile

Any help would be gratefully appreciated.......

Thanx
Aerotech
Back to top
View user's profile Send private message
taviso
Retired Dev
Retired Dev


Joined: 15 Apr 2003
Posts: 261
Location: United Kingdom

PostPosted: Fri Oct 24, 2003 9:29 pm    Post subject: Re: fortune mod text color Reply with quote

aerotech wrote:
could anybody tell me how-to change the color of the text for my fortune-mods.

Your not very clear, are you writing your own fortunes for use with fortune-mod and want to use colour in them, or would you just like to colourise the text from fortune when you login?

I'm going to assume the latter, try this.

Code:
# emerge app-misc/color

Then change your ~/.bash_profile to run fortune like this:
Code:
color ltgreen
fortune
color off

Your login cookie is now in bright green :P
_________________
--------------------------------------
Gentoo on Alpha, is your penguin 64bit?
--------------------------------------------------------
Back to top
View user's profile Send private message
aerotech
n00b
n00b


Joined: 04 Oct 2003
Posts: 42
Location: USA

PostPosted: Sat Oct 25, 2003 12:02 am    Post subject: Reply with quote

Thank you I apologize if I was not very clear, that was exactly what i was after


aerotech
Back to top
View user's profile Send private message
syscrash
Guru
Guru


Joined: 14 Apr 2003
Posts: 541

PostPosted: Sat Oct 25, 2003 1:27 am    Post subject: Re: fortune mod text color Reply with quote

taviso wrote:
aerotech wrote:
could anybody tell me how-to change the color of the text for my fortune-mods.

Your not very clear, are you writing your own fortunes for use with fortune-mod and want to use colour in them, or would you just like to colourise the text from fortune when you login?

I'm going to assume the latter, try this.

Code:
# emerge app-misc/color

Then change your ~/.bash_profile to run fortune like this:
Code:
color ltgreen
fortune
color off

Your login cookie is now in bright green :P

I would love this, except for one problem.
Code:
root@syscrash2k syscrash2k # emerge app-misc/color
Calculating dependencies
emerge: there are no masked or unmasked ebuilds to satisfy "app-misc/color".
 
!!! Error calculating dependencies. Please correct.

color ebuild removed? :cry:
Back to top
View user's profile Send private message
k9
Apprentice
Apprentice


Joined: 28 Sep 2003
Posts: 160
Location: Salt Lake City, USA

PostPosted: Sat Oct 25, 2003 1:58 am    Post subject: Reply with quote

Try:

Code:
echo -ne "\e[1;31m"; fortune; echo -ne "\e[0m"


The first echo command makes the terminal use bright red. The second echo reverts the terminal back to "normal" colors.

Among other places, the following page will tell you how the codes work:

http://www.bluesock.org/~willg/dev/ansi.html
Back to top
View user's profile Send private message
taviso
Retired Dev
Retired Dev


Joined: 15 Apr 2003
Posts: 261
Location: United Kingdom

PostPosted: Sat Oct 25, 2003 1:05 pm    Post subject: Re: fortune mod text color Reply with quote

syscrash2k wrote:
color ebuild removed? :cry:


Nope, I only added it yesterday :)

try syncing, and it should be there :)
_________________
--------------------------------------
Gentoo on Alpha, is your penguin 64bit?
--------------------------------------------------------
Back to top
View user's profile Send private message
syscrash
Guru
Guru


Joined: 14 Apr 2003
Posts: 541

PostPosted: Sat Oct 25, 2003 2:07 pm    Post subject: Re: fortune mod text color Reply with quote

taviso wrote:
syscrash2k wrote:
color ebuild removed? :cry:


Nope, I only added it yesterday :)

try syncing, and it should be there :)

Cool, thanks :D
k9 wrote:
Try:

Code:
echo -ne "\e[1;31m"; fortune; echo -ne "\e[0m"



The first echo command makes the terminal use bright red. The second echo reverts the terminal back to "normal" colors.

Among other places, the following page will tell you how the codes work:

http://www.bluesock.org/~willg/dev/ansi.html


Thanks anyway, but 'color' is so much easier :wink:
Back to top
View user's profile Send private message
viperlin
Veteran
Veteran


Joined: 15 Apr 2003
Posts: 1319
Location: UK

PostPosted: Sat Oct 25, 2003 2:22 pm    Post subject: Reply with quote

they spelt colour wrong by the way
Back to top
View user's profile Send private message
taviso
Retired Dev
Retired Dev


Joined: 15 Apr 2003
Posts: 261
Location: United Kingdom

PostPosted: Sat Oct 25, 2003 2:38 pm    Post subject: Reply with quote

viperlin wrote:
they spelt colour wrong by the way


yeah, I got tired of `colour: command not found` so theres a symlink in there for us brits :)

Code:
$ ls -l /usr/bin/colour
lrwxrwxrwx    1 root     root           14 2003-10-24 22:51 /usr/bin/colour -> /usr/bin/color*

_________________
--------------------------------------
Gentoo on Alpha, is your penguin 64bit?
--------------------------------------------------------
Back to top
View user's profile Send private message
viperlin
Veteran
Veteran


Joined: 15 Apr 2003
Posts: 1319
Location: UK

PostPosted: Sat Oct 25, 2003 2:51 pm    Post subject: Reply with quote

no i think if americans are going to steal our language they can at least spell things right
Back to top
View user's profile Send private message
syscrash
Guru
Guru


Joined: 14 Apr 2003
Posts: 541

PostPosted: Sat Oct 25, 2003 3:29 pm    Post subject: Reply with quote

Don't talk to me about that, in canada it is also spelt
Quote:
colour

:P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum