×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles
    Revision as of 19:24, 25 July 2005 by imported>Finn
    (diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

    das menu erzeugt zwar "wallpaper" aber dieses submenu bleibt leer.

    in /home/finn/pictures/wallpaper befinden sich die bilder (teils jpg, teils png).


    menu.xml auszug:

    ...
     <menu id="Debian" /> 
     <separator /> 
     <menu id="client-list-menu" /> 
     <separator /> 
     <menu id="wallpapers" label="wallpapers" execute="~/home/finn/.config/openbox/wallpaper.py" /> 
    - <item label="ObConf">
    ...
    


    /home/finn/.config/openbox/wallpaper.py :

    #!/usr/bin/python
    # Generates a dynamic menu
    import glob
    
    
    wallpapers = glob.glob('/home/finn/pictures/wallpaper/*').sort()
    #wallpapers.sort()
    print '<openbox_pipe_menu>'
    for pic in wallpapers:
           name = pic.split('/')[-1]
           print 
           <item label="%s">
                   <action name="Execute"><execute>Esetroot -scale %s</execute></action>
           </item> % (name, pic)
    print '</openbox_pipe_menu>'
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.