3 my $font = "-*-lucidabright-medium-r-*-*-14-*-*-*-*-*-*-*";
7 my @colorsetNames = qw(
8 default inactivewindow activewindow inactivemenuitem
9 activemenuitem greyedmenuitem defaultmodule swallowedwindow
10 hilight balloons special iconmanstandard
11 iconmanactive iconmaniconified form formitem
12 defaultpager ident scroll dummy
13 term term-root term-special term-remote
17 my $prefix = '@prefix@';
18 my $ROOT_PREFIX = '@ROOT_PREFIX@';
19 $ROOT_PREFIX = $ENV{'DESTDIR'} if $ENV{'DESTDIR'};
21 my $userHome = $ENV{'HOME'} || "./.";
22 my $config = "@bindir@/fvwm-themes-config";
23 my $file = `$config --component colors --show-value read-file`;
25 open(INFILE, "$file");
30 if (/^\*FvwmTheme:?\s*Colorset\s+(\d+)\s+(.*)$/) {
31 my $cs = $colorsetNames[$1] || '*unknown*';
33 $fore{$cs} = $2 if $options =~ /(fg|foreground)\s+([^\s,]+)/;
34 $back{$cs} = $2 if $options =~ /(bg|background)\s+([^\s,]+)/;
39 *Menu*background: $back{form}
40 rxvt*background: $back{term}
41 rxvt*foreground: $fore{term}
42 *term*background: $back{term}
43 *term*foreground: $fore{term}
44 *text*background: $back{term}
45 *list*background: $back{term}
46 *Text*background: $back{term}
47 *List*background: $back{term}
48 *Scrollbar*foreground: $fore{inactivewindow}
49 *foreground: $fore{form}
50 *background: $back{form}
51 OpenWindows*WindowColor: $back{form}
52 Window.Color.background: $back{form}
53 netscape*background: $back{form}
54 netscape*foreground: $fore{form}
55 Netscape*background: $back{form}
56 Netscape*foreground: $fore{form}
57 .netscape*background: $back{form}
58 .netscape*foreground: $back{form}
59 Ddd*background: $back{term}
60 Emacs*background: $back{term}
61 Emacs*backgroundToolBarColor: $back{term}
63 Netscape*fontList: $font
64 .netscape*fontList: $font
67 open(XRDB, "|xrdb -merge -");
68 #open(XRDB, "|cat -"); # for testing
69 print XRDB $xresources;
72 # It is not very good to write to ~/.gtkrc & ~/.xresources without back uping.
73 # GNOME gtk engines create ~/.gtkrc, which includes ~/.gtkrc.mine if exists.
75 open(OUTFILE, ">$userHome/.xresources");
76 print OUTFILE $xresources;
79 open(OUTFILE, ">$userHome/.gtkrc.mine");
84 fg[NORMAL] = "$fore{form}"
85 text[NORMAL] = "$fore{form}"
86 fg[ACTIVE] = "$fore{form}"
87 text[ACTIVE] = "$fore{form}"
88 fg[PRELIGHT] = "$fore{form}"
89 text[PRELIGHT] = "$fore{form}"
90 fg[SELECTED] = "$back{form}"
91 text[SELECTED] = "$back{form}"
92 fg[INSENSITIVE] = "$fore{form}"
93 text[INSENSITIVE] = "$fore{form}"
94 bg[NORMAL] = "$back{form}"
95 base[NORMAL] = "$back{form}"
96 bg[ACTIVE] = "$back{form}"
97 base[ACTIVE] = "$back{form}"
98 bg[PRELIGHT] = "$back{form}"
99 base[PRELIGHT] = "$back{form}"
100 bg[SELECTED] = "$fore{form}"
101 base[SELECTED] = "$fore{form}"
102 bg[INSENSITIVE] = "$back{form}"
103 base[INSENSITIVE] = "$back{form}"
105 style "tooltips-style" {
106 bg[NORMAL] = "#ffffc0"
107 fg[NORMAL] = "#000000"
108 bg_pixmap[NORMAL] = "<none>"
111 widget_class "*GtkProgress*" style "process"
112 widget_class "*Gtk*List*" style "process"
113 widget_class "*Gtk*Tree*" style "process"
114 widget_class "*GtkText*" style "process"
115 widget_class "*GtkEntry*" style "process"
116 widget_class "*" style "process"
117 widget "gtk-tooltips" style "tooltips-style"