Code Sample |
THEME=`cat ./.xtheme` case $THEME in tan) BGCOLOR=black FGCOLOR=tan CURSORCOLOR=sienna ;; fire) BGCOLOR=black FGCOLOR=orange1 CURSORCOLOR=red4 ;; *) BGCOLOR=black FGCOLOR=gray90 CURSORCOLOR=gray60 ;; esac # put Xdefaults stuff here cat << EOF > $HOME/.Xdefaults ! THIS FILE IS AUTOMATICALLY GENERATED BY .xinitrc ! EACH TIME X STARTS. DON'T BOTHER EDITING IT. ! DEFAULT ATERM aterm*visualBell:true aterm*background:$BGCOLOR aterm*foreground:$FGCOLOR aterm*cursorColor:$CURSORCOLOR aterm*transparent:true aterm*shading:50 aterm*font:fixed aterm*saveLines:1000 aterm*colorMode:true aterm*borderWidth:0 aterm*truetintingType:true aterm*fading:80 aterm*geometry:120x50+150+42 aterm*scrollBar:False aterm*termName:xterm ! other terminals, symlinks to aterm ! SMALL ATERM (link name: terminal) terminal*geometry:80x24+0-32 terminal*font: fixed terminal*transparent:true terminal*shading:50 terminal*fading:80 terminal*scrollBar:False aterm*background:$BGCOLOR terminal*foreground: $FGCOLOR terminal*cursorColor:$CURSORCOLOR ! WIDE ATERM (link name: mc-term) mc-term*geometry:170x30+0+0 mc-term*font: fixed mc-term*transparent:true mc-term*shading:50 mc-term*fading:80 mc-term*scrollBar:False aterm*background:$BGCOLOR mc-term*foreground: $FGCOLOR mc-term*cursorColor:$CURSORCOLOR EOF |
Code Sample |
#!/bin/flua ------------------------------------------------------------------------ -- desktop_chooser.flua -- simple thing to let you pick a desktop as X loads -- mikshaw 2006 -- Changelog (yyyy-mm-dd) -- 2006-01-03 First version ------------------------------------------------------------------------ execute("xsri --color2=brown --color=black") dofile("/etc/init.d/functions.lua") UseIcons = getOption(getenv("HOME").."/.desktop","icons") Default_WM = getOption(getenv("HOME").."/.desktop","wm") rcfile = getenv("HOME").."/.desktops.lst" ww = 160 wh = 120 w_main = Window{ww,wh,"desktop_chooser"} chooser = Hold_Browser{0,0,ww,wh-20} listfile = openfile(rcfile,"r") if listfile then chooser:load(rcfile) else chooser:add("fluxbox") chooser:add("jwm") end for whichwm = 1,chooser.size do if Default_WM == chooser:text(whichwm) then active_WM = whichwm break else active_WM = 1 end end chooser:select(active_WM) doit = Return_Button{0,wh-20,ww,20,"continue";box=Boxtype.flat} function doit.callback() if chooser.value > 0 then execute("echo \"wm: "..chooser:text(chooser.value).."\" > $HOME/.desktop") if UseIcons then execute("echo \"icons: "..UseIcons.."\" >> $HOME/.desktop") end exit(0) end end w_main:show() |