Fix other colors

master
Mike Hiretsky 12 years ago
parent ec1208cd22
commit 2e35f1af2c

@ -21,6 +21,15 @@ import sys
import re
import subprocess
def select_color():
try:
if filter(re.compile(r"(cld|cldx|cldg|cmc|cls)-themes-12").search,
os.listdir('/var/db/pkg/media-gfx')):
return "#73a363"
except:
pass
return '#30648b'
if __name__ == "__main__":
if gtk.gdk.get_display():
window = gtk.Window(gtk.WINDOW_TOPLEVEL)
@ -43,7 +52,7 @@ if __name__ == "__main__":
window.set_border_width(0)
window.modify_bg(gtk.STATE_NORMAL,
gtk.gdk.rgb_get_colormap().alloc_color('#30648b'))
gtk.gdk.rgb_get_colormap().alloc_color(select_color()))
window.show()
pid = os.fork()

@ -14,5 +14,10 @@
# limitations under the License.
# set background color
xsetroot -solid rgb:30/64/8b
if ls /var/db/pkg/media-gfx/cld[-gx]*themes-12* &>/dev/null
then
xsetroot -solid rgb:73/a3/63
else
xsetroot -solid rgb:30/64/8b
fi
exit 0

Loading…
Cancel
Save