[PD] nightime mode?

Martin Peach martin.peach at sympatico.ca
Mon Jul 21 17:43:56 CEST 2014


I use these two scripts to change the colour scheme in pd-exended on linux.
set_pd-gui_color-scheme.sh replaces the colour scheme with the one in 
mp_pd-gui_color_scheme.tcl.
I use the gimp to find the hex values for the colours, or just manually 
change the numbers till I get something that works.

Martin

On 2014-07-21 06:06, Julian Brooks via Pd-list wrote:
> Hi all,
>
> I'm wondering how tricky it would be (relative I know) to invert Pd's
> colour scheme: black canvas, white boxes; text, cables, etc?
>
> This would be for projecting the screen for gigs'n'stuff - I think white
> on black just looks better (relative again of course) in such environments.
>
> I know that via the [hcs] lib I can get at some of the tcl.tk
> <http://tcl.tk> settings but I don't want to have to manually do it
> every time I open a new/sub-patch.
>
> Regards to all,
>
> Julian
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>

-------------- next part --------------
set ::canvas_fill "#7f7e7c"
set ::text_color "#000"
set ::select_color "#00f"
set ::dash_outline "#f00"
set ::dash_fill "#f7f7f7"
set ::box_outline "#ccc"
set ::graph_outline "#777"
set ::atom_box_fill "#f876f8"
set ::msg_box_fill "#f8f876"
set ::obj_box_fill "#76f8f8"
set ::signal_cord_highlight "#58a"
set ::signal_cord "#d09025"
set ::signal_nlet $signal_cord
set ::msg_cord_highlight "#474"
set ::msg_cord "#75a000"
set ::msg_nlet "white"
set ::mixed_nlet "#88aaff"
-------------- next part --------------
#!/bin/sh
# replaces the default color scheme in pd-gui.tcl with the one in mp_pd-gui_color_scheme.tcl
TMP_FILE='pd-gui_new.tcl'
SRC_FILE='pd-gui.tcl'
COLOR_SCHEME_FILE='mp_pd-gui_color_scheme.tcl'
cp /usr/lib/pd-extended/tcl/$SRC_FILE .

# wc -l=count number of lines in input
TOTAL_LINES=`cat $SRC_FILE | wc -l`
echo $TOTAL_LINES
# grep -e=use pattern -n=prefix line number m1=max 1 match
# cut -d=use ':' instead of TAB -f=select only field 1
# set BEGIN_LINE to the line number of the first occurrence of "# color scheme" in $SRC_FILE
BEGIN_LINE=`grep -n -m1 -e '# color scheme' $SRC_FILE | cut -d : -f 1`
echo $BEGIN_LINE
END_LINE=`grep -n -m1 -e 'mixed_nlet' $SRC_FILE | cut -d : -f 1`
echo $END_LINE
TAIL_LINES=$(($TOTAL_LINES-$END_LINE))

echo 'lines in '$SRC_FILE' : '$TOTAL_LINES
echo 'color scheme runs from line: ' $BEGIN_LINE
echo 'to line: ' $END_LINE
echo 'with ' $TAIL_LINES ' lines remaining.'

head -n $BEGIN_LINE $SRC_FILE > $TMP_FILE
cat $COLOR_SCHEME_FILE >> $TMP_FILE
tail -n $TAIL_LINES $SRC_FILE >> $TMP_FILE
TOTAL_NEW_LINES=`cat $TMP_FILE | wc -l`
if [ $TOTAL_NEW_LINES>=$TOTAL_LINES ];
then
    echo "doing: sudo cp $TMP_FILE /usr/lib/pd-extended/tcl/$SRC_FILE"
    sudo cp $TMP_FILE /usr/lib/pd-extended/tcl/$SRC_FILE
else
    echo "$TOTAL_LINES not equal to $TOTAL_NEW_LINES"
fi
echo "done."



More information about the Pd-list mailing list