[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SEUL: Re: Config file idea



At 20:54 29.06.97 -0700, Erik Walthinsen wrote:

>There's the problem.  It's not standard or foolproof.  Each theme has a 
>different structure (given), thus you'd have to be able to extract all the 
>user-config data from one theme, save to an intermediate format, load the
new 
>theme, and re-integrate.  That could get ugly, depending on the kind of 
>changes we allow the user to make.  Then again if could be an ideal solution 
>if we only allow them to change the list/hierarchy of programs they want.
>
>> 

Yep. We could have a template files specifieng the grafx and alignment of
things, and user files specifieng hierarchical structure of menus and the
menu items programs / locations. External progs could merge these two
togheter to an E config. So no change needed for E itself.


I think that this would werk well e.g. with the root menus.
A user custom root menu config file could look like this:
(just striped away the grafx and alignment things out of the original E
default config)

begin menu
  name root1
  begin menuitem
    text System Commands
    type decor
    action none
  end
  begin menuitem
    text XTerm
    type element
    action exec xterm -bg black -fg white
  end
  begin menuitem
    text Rxvt
    type element
    action exec rxvt -bg black -fg white
  end
  begin menuitem
    text IRC
    type element
    action exec rxvt -geometry 80x40 -e irc -c "#E" $USER
efnet.telstra.net.au 
  end
  begin menuitem
    text Mail
    type element
    action exec tkrat
  end
  begin menuitem
    text GetMail
    type element
    action exec rxvt -bg black -fg green -e grabmail
  end
  begin menuitem
    text System Information
    type element
    action menu root1_sub1
  end
  begin menuitem
    text Exit Options
    type element
    action menu root1_sub2
  end
end

begin menu
  name root1_sub1
  type custom
  begin menuitem
    text Processes
    type element
    action exec rxvt -fg green -bg black -geometry 80x60 -e /usr/bin/top
  end
  begin menuitem
    text Load
    type element
    action exec xload -update 1 -jumpscroll 1 -geometry 64x64 -bg black -fg
"#ff0000"
  end
  begin menuitem
    text Time
    type element
    action exec xclock -digital -bg "#000000" -fg "#ff0000" -update 1 -fn
"-*-helvetica-*-r-*-*-20-*-*-*-*-*-*-*"
  end
end

begin menu
  name root1_sub2
  type custom
  begin menuitem
    text Restart
    type element
    action restart
  end
  begin menuitem
    text Restart DEFAULT Small Theme
    type element
    action restart_theme DEFAULT_small
  end
  begin menuitem
    text Restart DEFAULT Theme
    type element
    action restart_theme DEFAULT
  end
  begin menuitem
    text Exit
    type element
    action exit
  end
end

----------------------------------------------



And you would merge it with a template file specifieng the grafx and
alignment (haven't looked thru the items, so it is probably incomplete, but
just so demonstrate what I mean)

----------------------------------------------

begin menu_template
  dimensions 253 192
  popupdist 126 12
  begin menuitem_template
    location 0 0
    size 253 24
    text_location 5 5
    text_size 243 14
    image unselected pix/menu_plain_1.ppm  shapemode on 255 0 255 
    image selected   pix/menu_plain_2.ppm  shapemode on 255 0 255 
  end

begin menu_sub_template
  popupdist -80 12
end





----------------------------------------------------------------------------
Simple End User Linux Mailing list
To be removed from this mailing list send a message to majordomo@txcc.net
with the line
unsubscribe seul-project
in the body of the letter.
----------------------------------------------------------------------------