Re: Integrating Lua to the core of Litestep.

Darrin C Roenfanz <[email protected]>
Newsgroups gmane.comp.windows.shells.litestep
Message-ID <[email protected]>
Indeed. I always envisioned it in a format more like:
jdesk = { workarea = 0, 0, 0, -24 }

command = {
    x = 0
    y = 0
    width = 100
    height = 20
}
taskbar = {
    x = 0
    y = -24
    event = function("OnEnter") DoesThisCoolThing end
}

.... but thats just me ^^


Jochen Ritzel wrote:
> Meh, you'd have to rethink your idea in real lua, this looks like 
> crappy C code. We dont need tons of set/get methods, callbacks and 
> stuff like that in Lua. If you really want to do it, then do it 
> properly. If you don't mind rewriting half the core, every theme and 
> module ever released, please go ahead. I always liked the idea.
> But then, maybe it's too much work for textfile cosmetics.
>
> If you just want it pretty or less typing, you can just write 
> preprocess parser that generates .rc files from any syntax you like. 
> I've been writing my themes in some css like language, its actually 
> pretty neat.
>
>
> On Wed, 08 Aug 2007 20:59:20 +0200, Tomas 
> <osten.einarsson-cgr7CL/[email protected]> wrote:
>
>> 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
>
>
>
> ---------------------------------------------------------------------
>    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
>
>


---------------------------------------------------------------------
    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.