You are not logged in.

#1 2008-08-15 11:16:48

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Pebrot MSN in cli. Change default colors

hi! im looking forward to know how to change the default colors in pebrot (http://pebrot.sourceforge.net/) so it shows a transparent background in urxvt instead the default black solid color

pebrot has a ~/.pebrot/pebrotrc file:

# Pebrot config file

...

#################################### COLORS ####################################
# Valid colors names are: white, blue, red, cyan, yellow, green, magenta.
col_default= white
col_info= cyan
col_info_delim= red
col_error= yellow
col_error_delim= red
col_chat_bar= blue
col_chat_bar_name= blue
col_chat_bar_name_typing= green
col_state_bar= blue
col_state_bar_written= yellow
col_state_bar_not_written= blue
col_my_name= blue
col_others_name= red
col_list_delim= white
col_list_num= red
col_list_pass= blue
col_list_state= green
col_list_name= white
col_list_parens= white
col_timestamp= white
################################################################################

so, there's no black there... so, the black background is not set there...

but here:
/usr/lib/python2.5/site-packages/pypebrot/pebrot.py

    def defineColors( self ):
        colors= ['WHITE', 'BLUE', 'RED', 'CYAN', 'YELLOW', 'GREEN', 'MAGENTA' ]
        for f in (COLORABLE + colors):
            self.COLORS[f]= ''

    def defaultColors( self ):
        self.COLORS['DEFAULT']= self.COLORS['WHITE']
        self.COLORS['INFO']= self.COLORS['CYAN']
        self.COLORS['INFO_DELIM']= self.COLORS['RED']
        self.COLORS['ERROR']= self.COLORS['YELLOW']
        self.COLORS['ERROR_DELIM']= self.COLORS['RED']
        self.COLORS['CHAT_BAR']= self.COLORS['BLUE']
        self.COLORS['CHAT_BAR_NAME']= self.COLORS['BLUE']
        self.COLORS['CHAT_BAR_NAME_TYPING']= self.COLORS['GREEN']
        self.COLORS['STATE_BAR']= self.COLORS['BLUE']
        self.COLORS['STATE_BAR_WRITTEN']= self.COLORS['YELLOW']
        self.COLORS['STATE_BAR_NOT_WRITTEN']= self.COLORS['BLUE']
        self.COLORS['MY_NAME']= self.COLORS['BLUE']
        self.COLORS['OTHERS_NAME']= self.COLORS['RED']
        self.COLORS['LIST_DELIM']= self.COLORS['WHITE']
        self.COLORS['LIST_NUM']= self.COLORS['RED']
        self.COLORS['LIST_PASS']= self.COLORS['BLUE']
        self.COLORS['LIST_STATE']= self.COLORS['GREEN']
        self.COLORS['LIST_PARENS']= self.COLORS['WHITE']
        self.COLORS['LIST_NAME']= self.COLORS['WHITE']
        self.COLORS['TIMESTAMP']= self.COLORS['WHITE']

    def initBarColors( self ):
        if curses.has_colors() and not MONOCHROME:
            self.ChatBar.attrset( self.COLORS['CHAT_BAR'] )
            self.StateBar.attrset( self.COLORS['STATE_BAR'] )
            self.Text.setAttr( self.COLORS['DEFAULT'] )

or here (same file)

    def setColors( self, background ):
        try:
            import usedefault
            usedefault.use_default_colors()
            back= -1                                <------------------ i think it's here
        except ImportError:
            back= background                  <------------------ i think it's here
        
        curses.init_pair( 1, curses.COLOR_WHITE, back )
        curses.init_pair( 2, curses.COLOR_BLUE, back )
        curses.init_pair( 3, curses.COLOR_RED, back )
        curses.init_pair( 4, curses.COLOR_CYAN, back )
        curses.init_pair( 5, curses.COLOR_YELLOW, back )
        curses.init_pair( 6, curses.COLOR_GREEN, back )
        curses.init_pair( 7, curses.COLOR_MAGENTA, back )
        curses.init_pair( 8, curses.COLOR_MAGENTA, back )

        self.COLORS['WHITE']= curses.color_pair( 1 )
        self.COLORS['BLUE']= curses.color_pair( 2 )
        self.COLORS['RED']= curses.color_pair( 3 )
        self.COLORS['CYAN']= curses.color_pair( 4 )
        self.COLORS['YELLOW']= curses.color_pair( 5 )
        self.COLORS['GREEN']= curses.color_pair( 6 )
        self.COLORS['MAGENTA']= curses.color_pair( 7 )

        #self.stdscr.touchwin()
        #self.stdscr.refresh()
        #self.stdscr.bkgdset( curses.color_pair(8) )    <------------------ i think it's here

Thankyou for read! smile


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#2 2008-10-12 17:29:53

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

Re: Pebrot MSN in cli. Change default colors

I would also really much like to know that O.o

Offline

#3 2008-10-12 20:30:10

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: Pebrot MSN in cli. Change default colors

now that i see is not possible, or at last can't found a way, i want to make the background grey, say #222222 as my other CLI apps...

but i cant seem to find the "setting" in the app script to do that


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

Board footer

Powered by FluxBB