Integrating Lua to the core of Litestep.

Tomas <osten.einarsson-cgr7CL/[email protected]>
Newsgroups gmane.comp.windows.shells.litestep
Message-ID <[email protected]>
So this is another push to make Litestep more dynamic by integrate the 
scripting language Lua to the core. I've read the thread "rant: 
Scripting in Litestep" so I know this have been suggested before and 
there are a lot of skepticism against making Litestep themes harder to 
make by demanding programming skills from the themers. But I cant really 
understand why something like this example with XtaskBar could be any 
harder even for non-programmers, it just depends on the documentation. 
In my opinion its look cleaner and its makes it easier to understand for 
newcomers and you don't really need any experience in programing just 
because there are some more symbols in every line (":", "()" and "=" ).

taskbar = xTaskbar()
taskbar:SetX(5)

than the current .rc syntax

*xTaskbar taskbar
taskbarX 5

I would like to hear your opinions and suggestions to this.

For example a theme config could look like this (based on the default 
theme in LOSI):


-- Theme.lua
ThemeName = "InstDef"
ThemeAuthor = "Tobbe"
ColorDark =   "a58f65"
ColorLight  = "d5cab5"
ColorBorder  = "3d3423"
ColorText  =  "262116"

function Init()
    -- Jdesk
    jDesk = JDesk()
    jDesk:SetWorkArea(0, 0, 0, -44)
    
    -- Popup
    popup:SetHotListName(ThemeName)
    popup = Popup()
    popup:SetAutoSeperator(true)
    popup:SetTitleBgColor(ColorDark)
    popup:SetGradientSelEntry(ColorDark)
    popup:SetEntryColor(ColorText)
    popup:SetEntryBgColor(ColorLight)
    popup:SetSelEntryBgColor(ColorDark)
    
    -- LsxCommand
    command = LsxCommand()
    command:SetX(0)
    command:SetY(-40)
    command:SetWidth(GetScreenWidth() - 199)
    command:SetHeight(21)
    command:SetBorderSize(1)
    command:SetBackgroundColor(ColorLight)
    command:SetBorderColor(ColorBorder)
    command:SetTextColor(ColorText)
    
    -- XTaskbar
    taskbar = XTaskbar()
    taskbar:SetX(0)
    taskbar:SetY(-21)
    taskbar:SetWidth(GetScreenWidth())
    taskbar:SetHeight(21)
    taskbar:SetUseSolidColors(true)
    taskbar:SetSolidBevelSize(1)
    taskbar:SetFontColor(ColorText)
    taskbar:SetMaxButtonWidth(200)
    taskbar:SetNormalFontLeftBorder(17)
    
    -- VTray
    tray = VTray()
    tray:SetX(-200)
    tray:SetY(-40)
    tray:SetWidth(200)
    tray:SetHeight(21)
    tray:SetAlwaysOnTop(true)
    tray:SetBackgroundColor(ColorLight)
    tray:SetBorderColor(ColorBorder)
    tray:SetBorderSize(1)


end

ls.Connect("Init", Init)

-- End theme.lua


---------------------------------------------------------------------
    Can't Unsubscribe? Check http://desktopian.org/listunsub.html
        LS List Homepage: http://wuzzle.org/list/litestep.php
            Get the LS FAQ: http://lsfaq.shellfront.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.