home *** CD-ROM | disk | FTP | other *** search
- Mat Hostetter (mat@ardi.com) wrote:
- : >>>>> "zinc" == zinc <zinc@zifi.genetics.utah.edu> writes:
-
- : zinc> is it possible to change the color used by programs such as
- : zinc> Word or KaleidaGraph for selected text? on my system the
- : zinc> default is a bright yellow which isn't too bad but i usually
- : zinc> like more mellow colors.
-
- : zinc> this is with E/L 1.99q7 (ELF) Linux 1.3.70 X-Windows
-
- : On a Mac the highlighting color is stored as a 6-byte RGB value at
- : address 0xDA0. Executor sets that to R:G:B = 0xFFFF:0xFFFF:0x0000 by
- : default (bright yellow).
-
- : Someone could probably write a desk accessory to let you change this
- : value. Since you're using Linux, I suppose you could change the value
- : of the memory locations holding the highlight color in gdb. Heh.
-
- *laugh* Okay, I tried it and it works.
-
- Here's a script to run executor under Linux with a selection color
- of your choice. :) GDB is pretty awesome.
-
- Usage: ehigh [-svga] colorname
-
- "colorname" can be any color that is recognized by X11 programs.
-
- See ya!
-
- -Sam Lantinga (slouken@cs.ucdavis.edu)
-
- -----------------------------------------------------------------
- -- Save the following script to a file named 'ehigh' and then run
- chmod 755 ehigh
- -- Note that this is just a hack, and isn't supported. :)
- -----------------------------------------------------------------
- #!/bin/sh
- #
- # This is a script to change the highlight color of executor, the
- # Macintosh emulator from ARDI.
- #
- # Note that the Macintosh color palette differs greatly from that
- # of the X11 standard colors, so the color you get might not be
- # the color you expect. :-)
- #
- # It's a hack, and not supported in any way. :)
-
-
- # Choose your executor!
- binary=/usr/local/bin/executor
- if [ "$1" = "-svga" ]; then
- echo "WARNING!"
- echo "-- Modifying executor-svga can cause your system to freeze!"
- echo ""
- echo -n "Press Ctrl-C to abort: "
- read junk
- binary=/usr/local/bin/executor-svga
- shift
- fi
-
- # Get the color highlight value
- rgbtxt=/usr/lib/X11/rgb.txt
- if [ "$1" = "" ]; then
- value1=0xFFFF
- value2=0xFFFF
- value3=0x0000
- else
- color=`egrep " $1$" $rgbtxt`
- if [ "$color" = "" ]; then
- (echo "Color '$1' not found!";
- echo "Possible matches:"
- fgrep -i "$1" $rgbtxt
- ) | less
- exit
- fi
- value1=`echo "$color" |
- awk '{printf("0x%2x%2x",\$1,\$1)}' | sed 's/ /0/g'`
- value2=`echo "$color" |
- awk '{printf("0x%2x%2x",\$2,\$2)}' | sed 's/ /0/g'`
- value3=`echo "$color" |
- awk '{printf("0x%2x%2x",\$3,\$3)}' | sed 's/ /0/g'`
- fi
-
- # Save our script...
- cat >$HOME/Delete_ME <<__EOF__
- file $binary
- break mmap
- run
- c
- x/3h 0xDA0
- set variable *0xDA0 = $value1
- set variable *0xDA2 = $value2
- set variable *0xDA4 = $value3
- x/3h 0xDA0
- d 1
- c
- quit
- __EOF__
-
- # Run it. :-)
- gdb --command=$HOME/Delete_ME
- rm -f $HOME/Delete_ME
-
- clear
- echo "Thank you very much."
-
-