Lua Alchemy v0.1a Released

Lua Alchemy is a port of the Lua programming language for
ActionScript using Alchemy. Using v0.1a inside Flash/Flex you can
create any ActionScript class available at runtime, call functions,
get/set properties on ActionScript objects and use Lua functions as
an ActionScript function (including event listeners).
The project can be found here:
http://code.google.com/p/lua-alchemy/
A demo can be found here:
http://www.arcanearcade.com/Flex/LuaAlchemyDemoV.1a/index.html
The next version will include syntax sugar so instead of
calling as3.call(var, "function", param) you could call
var.function(param) and similar calls to make calling ActionScript
code look the same as calling Lua code.

Robert,
quote:
Originally posted by:
Robert Stehwien
James,
Thanks for testing Lua Alchemy and isolating that problem for
us. Oddly enough we never experienced it but Alexander thinks he
has a fix he will push up to our code repository and it will go out
in v0.2.
Are you running on a 64bit mahcine (I see you are on linux).
Maybe some platform dependence sneaks into the alchemy build.
--Robert
Yes I am running on a 64bit machine, but I'm not sure that is
the
root cause of the problem. For I've distilled the Lua
double-to-int
conversion down to:
#include <stdio.h>
union luai_Cast { double l_d; long l_l; };
#define lua_number2int(i,d) \
{ volatile union luai_Cast u; u.l_d = (d) +
6755399441055744.0; (i) = u.l_l; }
int main(void) {
double x = 123.456;
int y;
lua_number2int(y,x)
printf("y = %d\n",y);
and this standalone test works fine with Alchemy's gcc.
Therefore the fact that
the conversion approach fails in the full Lua case indicates
the problem is
more subtle that I'd first thought. Perhaps Joe, or someone
else from Adobe,
could shed light on what might be happening.
James

Similar Messages

  • Lua Alchemy Demo Preview and Function Callback Question

    Been working with Alchemy some more to get Lua working as a
    scripting language. You can now create any AS class (available at
    runtime) using Lua, call functions, set/get properties, and even
    make Lua functions event listeners. Here is a preview of the demo
    that will go out (including links to the google code project on the
    help tab)
    http://arcanearcade.com/Flex/LuaAlchemyDemoV.1a
    This is just a preview of the V.1a release of the project. At
    this time there isn't any Lua sugar to make calling AS look more
    natural in Lua.
    We have been trying to figure out how to detect when
    ActionScript has cleaned up or no longer has need of a function -
    we would like to cleanup the Lua reference to the function when it
    isn't needed.

    quote:
    Originally posted by:
    emcmanus
    This is great. It'd be alot of fun to play with if exposed to
    JS as a stand-alone Lua interpreter! (IronLua?)
    That would be pretty cool. Lua is a fairly tight language and
    well designed for embedding. It is also pretty small so might not
    be hard to port.
    quote:
    Very cool, Robert!
    My thanks also go out to my team mate Alexander Gladysh.

  • Alchemy does not release ByteArray objects

    I'm trying to use libjpeg encoder to encode bitmap to jpeg and notice, that original data never releases from memory. After some testing I found tha alchemy hold references to them. Is that a bug or am I doing something wrong?
    Here is my ActionScript code:
    protected function doSomethingButton_clickHandler(event:MouseEvent):void
         var data:ByteArray = new ByteArray();
         for (var i:int = 0; i < 1000; i++) {
              data.writeInt(Math.round(10000 * Math.random()));
         Demo.doSomething(data); // This is an alchemy class
    And here is my *.gg file:
    import flash.utils.ByteArray;
    public function doSomething(data:ByteArray):void
    The functiion does nothing! And profiler shows that all of this ByteArray objects stay in memory:

    I'd like to know if the AS3_Release(data) is a valid thing to do, or not.
    It's been a while, but the last time I profiled for a leak in alchemy, it appears that the passed-in parameters (to an API compiled with gluegen) are kept in alchemy in some sort of weak reference Dictionary.  These get cleaned up when alchemy decides to scan for cleanup - not when you want them gone.
    So, passing-in objects that hold lots of memory (like a byte array) is a bad thing.  I had thousands of Rectangle objects being held by alchemy (and they do not get cleaned by a manual garbage collect in the profiler), but sure enough, they eventually go away.
    I didn't think that the AS3_Release on input parameters was a valid thing to do, but perhaps it is, provided the object isn't referenced anywhere else in alchemy for other valid reasons?  I wouldn't want things to blow up.

  • Creative ALchemy 1.25.10 released!

    "Creative ALchemy .25.0 released!(Hi everyone,
    The Creative ALchemy .25.0 is available for download now.
    Creative ALchemy .25.0
    Filesize : 8.2MB
    Release date : 20 Mar 09
    File Name : ALMY_PCVTAPP_LB__25_0.exe
    Creative ALchemy restores 3D audio and EAX&reg; effects for certain DirectSound&reg;3D games in Windows Vista. With Creative ALchemy, you can:
    * enable the DirectSound3D game audio to be processed by your Sound Blaster audio device to deli'ver EAX effects, 3D audio spatialization, sample rate conversion and hardware audio mixing. Without this, most DirectSound3D games will be reduced to stereo output without any EAX effects.
    * improve 3D audio processing for host-based Sound Blaster audio devices.
    Requirements:
    * Microsoft&reg; Windows Vista with Service Pack
    Notes:
    * Do not install this application if you do not play DirectSound3D games in Windows Vista.
    * To find out more about Creative ALchemy or view the list of DirectSound3D games supported, click here.
    * To install this software
    . Download the file onto your local hard disk.
    2. Close all other Windows applications.
    3. Double-click the downloaded file.
    4. Follow the instructions on the screen.

    Why no changelog?Message Edited by RaduznyKuDeSnik on 03-20-2009 04:4 [email protected]

  • Is Adobe Alchemy project still alive?

    Hi, people!
    Please excuse me if I missed something, but I have not heard
    anything for a quite long time (since December, I think) from
    Alchemy developers on this forum.
    Is Alchemy project still alive? I care deeply for its fate,
    and the apparent lack of reaction troubles me greatly.
    There are a few outstanding questions which are causing us,
    Lua Alchemy developers, notable discomfort. Most notably
    the
    flyield() problem and the transition to LLVM 2.4.
    I understand that Adobe Alchemy is an experimental
    unsupported alpha product, but even a short reply of "project not
    abandoned, will be back in six months" kind would do great for our
    spirits.
    Alexander.

    Yes, josath is right that as an Adobe employee I can't tell you much about Adobe's future plans including Alchemy.  But I can say a little bit about the relationship between Alchemy and FlashPlayer and how that will probably play out in the future. Alchemy relies on special op codes for direct memory access and arbitrary jumps that need to be supported by the Flash Player. I believe FP10 was the first player version that supported those op codes. Moving forward I would say it is safe to assume that future versions of the FlashPlayer will continue to support those op codes. In other words you should expect to be able to run today's Alchemy SWFs in every future FP.
    You are also asking whether Alchemy will be able to take advantage of FP performance improvements and support for, say, hardware acceleration.
    My answer would be: "yes" and "no". It depends on your Alchemy SWF and on the feature that improved. For example if FP's garbage collector improved in performance and became twice as fast your Alchemy SWF would probably not benefit from that change. The reason why Alchemy SWFs run so fast is because they avoid using the GC. A faster GC will help "regular" SWFs but not Alchemy SWFs. If everything including rendering improved in performance then regular SWFs and your Alchemy SWFs would improve as well. As far as I know hardware acceleration on mobile devices is currently only accessible through the ActionScript side via cacheAsSurface. But your Alchemy SWFs are created by converting C source code to AS. In other words if you want to take advantage of hardware acceleration then you need to beef up your AS code that uses the converted C code.
    Hope this helps,
    - Bernd

  • Reading local files

    I need to read local files in C with Alchemy (at least on
    developer's machine). This should allow more rapid application
    development with Lua Alchemy -- as developer would be able to
    exclude swf build step.
    I have added directory with my .swf to the FlashTrust config.
    I'm able to load the file with URLLoader. However fopen() on it
    returns NULL. Please see the attached code.
    Executables, compiled with Alchemy (and run with swfbridge),
    are able to work with local files. What should I do to allow my
    application to work with local files in the same manner?
    Alexander.

    quote:
    Originally posted by:
    notnick
    You have not tried?- funopen ()
    returns a FILE pointer.
    Just in
    samples / libpng
    I have not tried it yet
    I have tried fopen(), and it does not work (see code in
    original post). I would like to get working fopen() (and family)
    somehow, so I would be able to get vanilla Lua sources to work with
    files.
    My other option, of course, is to replace file-related
    functions in core Lua libraries. This is not that hard, and even
    doable without modifying of Lua sources, but I'd like to avoid this
    solution.
    UPD: I have looked at the libpng sample. If I get it
    correctly, funopen() there operates on ByteArray, not on actual
    file. (I have no experience with BSD API, so it was not immediately
    clear for me.)
    I need to operate on actual file on local file system.
    Thank you,
    Alexander.

  • Flyield() problem

    I'm trying to write synchronous file reader for Lua Alchemy.
    I set up URLLoader object, set up callbacks on completed, io
    and security error events, call load() with proper URLRequest. Any
    callback sets a global completion flag. I call flyield() in a loop
    until flag is set.
    It appears that the flag is never set in this scenario --
    event is never called. If I break the loop, and return control to
    ActionScript instead, completion event is called immediately. Is
    this correct behavior?
    UPDATE: Added minimal example. To try it you have to add
    directory with your swf into FlashPlayerTrust.
    Output I get:
    C WAITING
    actionscript imm WAITING
    callback
    actionscript timer COMPLETED
    Alexander.

    Yes, josath is right that as an Adobe employee I can't tell you much about Adobe's future plans including Alchemy.  But I can say a little bit about the relationship between Alchemy and FlashPlayer and how that will probably play out in the future. Alchemy relies on special op codes for direct memory access and arbitrary jumps that need to be supported by the Flash Player. I believe FP10 was the first player version that supported those op codes. Moving forward I would say it is safe to assume that future versions of the FlashPlayer will continue to support those op codes. In other words you should expect to be able to run today's Alchemy SWFs in every future FP.
    You are also asking whether Alchemy will be able to take advantage of FP performance improvements and support for, say, hardware acceleration.
    My answer would be: "yes" and "no". It depends on your Alchemy SWF and on the feature that improved. For example if FP's garbage collector improved in performance and became twice as fast your Alchemy SWF would probably not benefit from that change. The reason why Alchemy SWFs run so fast is because they avoid using the GC. A faster GC will help "regular" SWFs but not Alchemy SWFs. If everything including rendering improved in performance then regular SWFs and your Alchemy SWFs would improve as well. As far as I know hardware acceleration on mobile devices is currently only accessible through the ActionScript side via cacheAsSurface. But your Alchemy SWFs are created by converting C source code to AS. In other words if you want to take advantage of hardware acceleration then you need to beef up your AS code that uses the converted C code.
    Hope this helps,
    - Bernd

  • Flyield() and UI updates

    I was experimenting with flyield() by creating a label and
    looping from 1 to 1000000 and updating the text area with a delay
    (not timer based) of 1 sec between increment. The code doesn't time
    out but the label doesn't get updated until the end.
    Should flyield() allow updates of the UI to happen? If it
    doesn't by default, is there any way to make that happen?
    I could make a C example for this code if needed, but below
    is some Lua Alchemy code that shows what I'm attempting
    (as3.yield() calls flyield()). I shortened the count to 30 so it
    only takes about 30 seconds to complete, but unlike my expectations
    it doesn't update the UI until complete
    local vbox = as3.new("mx.containers::VBox")
    local label = as3.new("mx.controls::Label")
    local button = as3.new("mx.controls::Button")
    local pause = false
    as3.set(button, "label", "Pause");
    as3.call(button, "addEventListener", "click",
    function (e)
    pause = not pause
    end)
    as3.call(vbox, "addChild", label)
    as3.call(vbox, "addChild", input)
    as3.call(vbox, "addChild", button)
    as3.call(canvas, "addChild", vbox)
    function gettimer()
    return as3.toluatype(as3.namespacecall("flash.utils",
    "getTimer"))
    end
    function delay(msec)
    local start = gettimer()
    repeat
    as3.yield()
    until (gettimer() - start) >= msec
    end
    local count = 0
    while count < 30 do
    delay(1000)
    if not pause then
    count = count + 1
    as3.set(label, "text", count)
    end
    end

    quote:
    Originally posted by:
    Robert Stehwien
    quote:
    Originally posted by:
    notnick
    for clarity, it is also necessary to AS3_Trace(gettimer() -
    start) the more lua is not always clear
    I'll work up a pure C example to make sure that it isn't some
    Lua binding (pretty sure it isn't since almost all the calls in my
    example end up being pure Alchemy calls) and for clarity. Probably
    won't be until tomorrow night that I can prove that flyield() isn't
    working as expected.
    Please see this
    related
    post.

  • Creative ALchemy 1.20.04 (Release date: 1 Aug

    <div class="DownloadDetailDesc"><div class="DownloadFileName"><div class="DownloadNameBox">[url="http://support.creative.com/Products/ProductDetails.aspx?catID=&CatName=Sound+Blaster&s ubCatID=208&subCatName=X-Fi&prodID=4066&prodName=X-Fi+XtremeMusic#">Creative ALchemy .20.04[/url]
    <span class="DownloadSizeBox">Filesize: <span class="DownloadSizeText">8.69MB<img alt="" width="6" src="http://support.creative.com/images/icon_download.gif" height="6"> Download
    <div class="DownloadDetailDesc"><div class="DownloadFileName">Filename: ALMY_PCVTAPP_LB__20_04.exe<div class="DownloadText">This download?is an?application for use with Creative audio products. It restores 3D audio and EAX? effects for certain DirectSound?3D games in Microsoft? Windows Vista?. For more details, read the rest of this web release note.
    This download supports the following audio?products only:
    Creative?Sound Blaster? X-Fi? Titanium Fatalty? Champion Series<
    Creative?Sound Blaster X-Fi Titanium Fatalty?Professional Series<
    Creative?Sound Blaster X-Fi Titanium Series<
    Creative Sound Blaster X-Fi Elite Pro<
    Creative Sound Blaster X-Fi?XtremeGamer Fatalty?Pro<
    Creative Sound Blaster X-Fi Fatalty<
    Creative Sound Blaster X-Fi Platinum Fatalty Champion Series<
    Creative Sound Blaster X-Fi Platinum<
    Creative Sound Blaster X-Fi XtremeGamer<
    Creative Sound Blaster X-Fi XtremeMusic<
    Creative Sound Blaster X-Fi Xtreme Audio<
    Creative Sound Blaster X-Fi Xtreme Audio Notebook<
    Creative Sound Blaster X-Fi Notebook<
    Creative Sound Blaster X-Fi Surround 5.<
    Creative Sound Blaster X-Fi Go!<
    Creative Sound Blaster X-Fi Play!<
    Creative Sound Blaster Audigy? 4<
    Creative Sound Blaster?Audigy?2 ZS Platinum Pro?<
    Creative Sound Blaster?Audigy 2 ZS Platinum?<
    Creative Sound Blaster Audigy 2 ZS Notebook<
    Creative Sound Blaster Audigy 2 ZS<
    Creative Sound Blaster Audigy 2 ZS Video Editor<
    Creative Sound Blaster Audigy 2 ZS SE<
    Creative Sound Blaster Audigy 2 Platinum EX<
    Creative Sound Blaster Audigy 2 Platinum<
    Creative Sound Blaster Audigy 2<
    Creative USB Sound Blaster Audigy 2 NX<
    Creative Sound Blaster Audigy 2 Value<
    Creative Sound Blaster Audigy Platinum EX<
    Creative Sound Blaster Audigy Platinum<
    Creative Sound Blaster Audigy<
    Creative Sound Blaster Audigy LS<
    Creative HS-200 Headset<
    Creative USB Gaming Headset<
    Creative USB Speaker<
    Added Features or Enhancements:
    Added support for the following games:
    Beyond Good & Evil<
    City of Heroes<
    City of Villains<
    Peter Jackson's King Kong<
    Rayman Raving Rabbids<
    Star Wars? Empire at War: Forces of Corruption<
    The Witcher<
    Titan Quest: Immortal Throne<
    Uni'verse at War: Earth Assault<
    Warhammer?: Mark of Chaos<
    <
    Fixes:
    Enables the DirectSound3D game audio to be processed by your Sound Blaster?audio device?to deli'ver EAX effects, 3D audio spatialization, sample rate conversion and hardware audio mixing. Without this, most DirectSound3D games will be reduced to stereo output without any EAX effects.<
    Improves 3D audio processing for host-based Sound Blaster audio devices.<
    Requirements:
    Microsoft Windows Vista 64-bit or Windows Vista 32-bit<
    Creative audio?product listed above<
    Notes:
    Do not install this application if you do not play DirectSound3D games in Windows Vista.<
    To find out more about Creative ALchemy or view the list of DirectSound3D games supported, click here.<
    To install the?application
    Download the ALMY_PCVTAPP_LB__20_04.exe?file onto your local hard disk.<
    Close all other Windows applications.<
    Double-click the downloaded file.<
    Follow the instructions on the screen.<
    <

    good job creative. downloading now...

  • Alchemy 2 release date and the pre-release

    Hi,
    All has gone quiet about Alchemy 2 .. what is happening? ... is there any kind of release date yet?
    I want to convert my new game to IOS with stage3d, totally stuck until there is an Alchemy 2 version of Box2d Alchemy.
    And speaking of Box2d Alchemy (also WCK) The creator of the port Jesse Sternberg (known as mayobutter) has tried to get in the pre-release program and failed.
    http://box2d.org/forum/viewtopic.php?f=19&t=7877&start=20
    For the good of the community he should be one of the first on the list!

    We've just released a beta version, join the pre-release and try it out: http://gaming.adobe.com/technologies/flascc/

  • Creative ALchemy Guide and FAQ

    Hi everyone,?
    I have decided to include this for the benefit of those who are new.
    Creative ALchemy
    al-che-my [al-kuh-mee] ~ any magical power or process of transmuting a common substance, usually of little value, into a substance of great value. - Dictionary.com
    In Windows Vista, Microsoft has decided to remove the Hardware Abstraction Layer (HAL) for DirectSound and DirectSound3D. The HAL is the software layer that on previous Windows Operating Systems enabled an audio accelerator such as the SB X-Fi, to provide DirectSound3D applications with hardware accelerated audio. This enabled soundcards to perform tasks such as sample-rate conversion, mixing, 3D spatialization using HRTFs, filtering, and effects processing. Without the HAL, DirectSound on Windows Vista will be rendered in software on all sound cards with no advanced functionality such as EAX.
    The good news is that Creative ALchemy allows you to run your favorite DirectSound3D games on Windows Vista as the developers intended - with advanced 3D Audio processing and EAX support!
    NOTE: All Sound Blaster X-Fi and most Sound Blaster Audigy series of cards include ?nati've? OpenAL support. This means that most games that use the OpenAL Audio library will not be affected by the changes in Windows Vista. OpenAL support is available in many modern PC games including Battlefield 242, Doom3, Quake 4, and Prey.
    Some useful links:
    Creative ALchemy Project FAQ
    Alchemy @ Creative Labs: Connect
    Detailed gamelist
    Download:
    Creative ALchemy .25.0
    Filesize : 8.2 MB
    Release date : 20 Mar 09
    Previous announcement:
    Starting from 6 May 2008, the Creative Alchemy (for Audigy products) is available for FREE. No purchase is necessary to use this software. Original post.
    Operation
    When launched, the Creative ALchemy application will search the system for supported DirectSound3D enabled games. All the games found will be listed in the left pane (titled "Installed Games"). The right pane (titled "ALchemy-enabled Games?) will show any games which have already been converted to use ALchemy.
    To enable ALchemy support for a particular game, select it from the left panel, and press the >> button. To undo ALchemy support, select the game from the right panel and press the << button. You can select multiple games at once and then use the directional arrow buttons to update them all.
    Adding / Editing Games
    The following sections contain information about how you can upgrade games to use Creative ALchemy technology. This is intended for users who are comfortable navigating the Windows File System or using the Windows Registry to retrieve information.
    If you want to test out a favourite game that is not currently supported, then please read the following information.
    NOTE: Games can use the DirectSound3D library in radically different ways, so not all of them will work with Creative ALchemy. A list of officially and unofficially supported games, including the appropriate settings (see below) can be found on http://connect.creativelabs.com/alchemy/default.aspx. Users are encouraged to share their experiences (and ALchemy settings) by contributing to the Games list.
    Pressing the ?Add? button brings up the Game Settings dialogue box requesting information about the title you wish to add. Pressing the Edit button with a game selected brings up the same dialogue box filled with the current settings so they can be altered.
    Game Title
    Type in the name of the game you wish to add, as you want it to appear in the ALchemy application.
    Location
    The ALchemy application needs to know where to find the installed game. This can be done by providing the full directory path to the installation folder, or, by looking up the installation folder in the Windows Registry. As most games add a key to the Windows Registry indicating where the game has been installed, this option enables ALchemy to find games on any user?s machine. The alternati've, a hard-coded directory path, is specific to each user because most games allow the user to specify a custom directory into which the game is installed. Finding a Registry Key can be tricky and is only recommend for advanced users familiar with tools such as regedit.
    To enter a registry key select the ?Use Registry Path? button. Enter the full path and registry key name that stores the string containing the game?s installation folder. E.g. Call Of Duty stores this information in HKEY_LOCAL_MACHINE\SOFTWARE\Activision\Call Of Duty\InstallPath
    To provide a game?s installation folder select the ?Use Game Path? button. Enter the full path (including dri've letter) to the game?s installation folder. E.g. If Call Of Duty was installed in a Games directory on dri've C, you should enter c:\Games\Call of Duty
    The purpose of providing this information is so that the Creative ALchemy application can copy a couple of files to the game?s installation folder. These two files must be copied to the same folder as the game?s executable. In some cases the game?s main executable is not stored in the game installation folder, but one of its sub-directories. If this is the situation then enter the sub-directory name in the ?Install into Sub Folder? edit box. E.g. Serious Sam Second Encounter stores the game executable in a sub-directory called ?bin? so this should be entered here.
    In some even rarer cases, a game may require that the two ALchemy files are copied into two locations ? the game installation folder, and a sub-directory. (This can happen if the game has a configuration application in one folder and the game in another). To copy the files to both locations, tick the ?Install into both Root and Sub Folder? check box.
    When you close the dialogue box, the application will verify the location settings and display an error message if a registry path is not found or a directory path doesn?t exist.
    Settings
    To upgrade a legacy DirectSound3D based game to use Creative ALchemy involves copying a couple of files to the same directory as the game's executable. The first file is called dsound.dll and does the work necessary to re-enable 3D audio and EAX, the other file, dsound.ini, contains configuration options that affect how the audio will be rendered. The variables in the dsound.ini are controlled by the following options in the dialogue box: -
    'Buffers' is used to set the number of audio buffers used internally. The default value of 4 should be fine for most applications.
    'Duration' is used to set the length in milliseconds of each of the audio buffers. The default value is 25ms.
    The total duration of the audio queue used internally is equal to Buffers * Duration (i.e. 00ms by default). Experimenting with Duration values may be necessary in order to find the best performance vs. quality trade-off for each game. In addition, some games require smaller values than the default of 25ms because they use very small DirectSound Buffers for streaming, or they require faster playback position updates. Reducing the ?Duration? value can prevent audio glitches, pops and clicks.
    However, lower values mean that there is more chance of the audio breaking up during CPU intensi've moments (e.g. lots of disc access during level loading). The recommended approach is to try the default settings, and if audio artifacts are regularly heard then try lowering Duration by 5ms and trying again. If the problem still occurs try dropping the value by another 5ms and so on (minimum allowed value is 5ms).
    'Maximum Voice Count' is used to set the maximum number of hardware voices that will be used by ALchemy. The number of voices used will be the lesser of, the hardware voice count limit and this setting. The default is 28 which is the highest number of voices available on SB X-Fi cards. By lowering this value, hardware voices can be reserved for another application to use, or, to improve performance by streaming less audio channels.
    'Disable Direct Music' is used to disable DirectMusic support. The default is false (unchecked), meaning DirectMusic support is enabled. At this time no known problems have been caused by combining ALchemy with games, such as TRON 2.0, that use DirectMusic.

    Originally Posted by namal
    Hello,
    can you please reupload the file again? The link doesn't work. I really need this driver pack for the Audigy 2 NX. I had Windows 7 and i don't want to buy a new external Sound Card for my notebook. Much thanks for the great work.
    In case you still require your driver and Alchemy, here are the links for the Audigy 2 NX
    Downloads Page
    http://support.creative.com/Products...05&prodID=9103
    Driver
    http://support.creative.com/download...wnloadId=11994
    Alchemy
    http://support.creative.com/download...wnloadId=12579

  • LLVM Version / Alchemy Source Code

    Hi,
    I wanted to get a better understanding of flash and decided to learn how the avm2 and alchemy works.  I would like to do some fun stuff with LLVM, including generating .swfs from other languages than c/c++. By trying so I noticed that Alchemy is based on LLVM 2.1 which is kinda old (released Sep 2007). Is there a way to use or port it to a newer LLVM version? It would make my experiment a lot easier and taking advantage of over three years development on LLVM would be great .
    As far as I understand alchemy adds a new backend to LLVM arch=avm2 to generate avm actionscript code from LLVM IL code. Am I correct that this addition is not open source? Would be too bad, as I hoped to get an better understanding of the avm2 by looking into it. Also that would make it possible for us users of alchemy to port it ourself.
    Thank you for any hints,
    Florian

    I think it's possible and I've been trying to do that for the last couple of days. I believe I've found out how the process works for compiling to iphone, using something similar to the alchemy toolchain. What I'd like to do is create an actioncript compiler with alchemy, so it basically is flash - flash, but taking advantage of all the optimizations that LLVM makes on bytecode, once you can understand it. I believe that adobe uses the following process:
    compile .as to ABC.
    Pass ABC into the GlobalOptimizer that exists inside the actionscript compiler (ASC.jar).
    It appears that GlobalOptimizer produces SSA IR code. I believe adobe slightly modifies this to be LLVM IR, and then they can just run llvm-as on the generated LLVM IR code.
    I'm working on getting this functioning right now, because if I can get these stages done, then the existing alchemy toolchain should do the rest of the job (that is, taking that llvm bytecode and outputting actionscript bytecode using the existing back end). This would also explain why Adobe hasn't updated alchemy to work with a new version of LLVM, because the LLVM IR spec changes from release to release, so they'd have to keep changing the process of formatting their GlobalOptimizer output to be LLVM IR, which is probably more work than they want to invest right now.
    In this list of processes, I'm on the last one. I'm currently figuring out how to convert the output from GlobalOptimizer to be valid LLVM IR but honestly, this is ALL new territory for me I need to find the specs on these things and do some reading. I had to customize the source code of the actionscript compiler to get this to work at all this far. The very fact that I had to do this also points to the fact that I'm on the right track, since posts I've seen from Adobe employees + documentation state that the actionscript compiler included in the alchemy toolkit is custom. Plus, this paper confirms many of these conclusions:
    http://llvm.org/devmtg/2009-10/Petersen_OptimizingActionScriptBytecode.pdf
    I think you might be the only person interested in this stuff so for the sake of not clogging up the forums with our discussions feel free to contact me directly if you'd like more info.

  • Once again: rc.lua changes in awesome 3.4

    Awesome syntax changed heavily in the new awesome release and my old rc.lua isn´t working at all. Maybe some helpful awesome-users would be so kind as to have a look on my config.
    require("awful")
    require("beautiful")
    require("naughty")
    require("wicked")
    require('invaders')
    -- require("obvious.battery")
    -- {{{ Variable definitions
    theme_path = "/home/thomas/.config/awesome/themes/arch.lua"
    beautiful.init(theme_path)
    terminal = "urxvt"
    editor = os.getenv("EDITOR") or "nano"
    editor_cmd = terminal .. " -e " .. editor
    modkey = "Mod1"
    layouts =
    awful.layout.suit.tile, -- 1
    awful.layout.suit.tile.left, -- 2
    awful.layout.suit.tile.bottom, -- 3
    awful.layout.suit.tile.top, -- 4
    awful.layout.suit.fair, -- 5
    awful.layout.suit.fair.horizontal, -- 6
    awful.layout.suit.max, -- 7
    awful.layout.suit.max.fullscreen, -- 8
    awful.layout.suit.magnifier, -- 9
    awful.layout.suit.floating -- 10
    floatapps =
    -- by class
    ["MPlayer"] = true,
    ["feh"] = true,
    ["Heroes3.exe"] = true,
    ["Wine"] = true,
    -- by instance
    ["feh"] = true,
    ["mocp"] = true,
    ["H5_Game.exe"] = true
    apptags =
    -- ["Gran Paradiso"] = { screen = 1, tag = 2 },
    -- ["Thunderbird-bin"] = { screen = 1, tag = 4 },
    -- ["Mplayer"] = { screen = 1, tag = 3 },
    -- ["soffice"] = { screen = 1, tag = 5 }
    -- ["Heroes3.exe"] = { screen = 1, tag = 3 },
    use_titlebar = false
    -- {{{ Tags
    -- Define tags table.
    tags = {}
    tags.settings = {
    { name = "urxvt", layout = layouts[1], },
    { name = "www", layout = layouts[1], },
    { name = "mail", layout = layouts[7], },
    { name = "media", layout = layouts[10] },
    { name = "misc", layout = layouts[10], setslave = true },
    -- Initialize tags
    for s = 1, screen.count() do
    tags[s] = {}
    for i, v in ipairs(tags.settings) do
    tags[s][i] = tag(v.name)
    tags[s][i].screen = s
    awful.tag.setproperty(tags[s][i], "layout", v.layout)
    awful.tag.setproperty(tags[s][i], "setslave", v.setslave)
    awful.tag.setproperty(tags[s][i], "mwfact", v.mwfact)
    end
    tags[s][1].selected = true
    end
    -- {{{ Wibox
    -- Create a textbox widget
    mytextbox = widget({ type = "textbox", align = "right" })
    -- Set the default text in textbox
    mytextbox.text = "<b><small> " .. awesome.release .. " </small></b> "
    -- Create a laucher widget and a main menu
    myawesomemenu = {
    { "manual", terminal .. " -e man awesome" },
    { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
    { "restart", awesome.restart },
    { "quit", awesome.quit },
    mymainmenu = awful.menu.new({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
    { "urxvt", terminal },
    { "shutdown", terminal .. " -e poweroff" },
    { "reboot", terminal .. " -e reboot" }
    mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
    menu = mymainmenu })
    -- Create a systray
    mysystray = widget({ type = "systray", align = "right" })
    -- Create a wibox for each screen and add it
    mywibox = {}
    mypromptbox = {}
    mylayoutbox = {}
    mytaglist = {}
    mytaglist.buttons = awful.util.table.join(
    awful.button({ }, 1, awful.tag.viewonly),
    awful.button({ modkey }, 1, awful.client.movetotag),
    awful.button({ }, 3, function (tag) tag.selected = not tag.selected end),
    awful.button({ modkey }, 3, awful.client.toggletag),
    awful.button({ }, 4, awful.tag.viewnext),
    awful.button({ }, 5, awful.tag.viewprev)
    mytasklist = {}
    mytasklist.buttons = awful.util.table.join(
    awful.button({ }, 1, function (c)
    if not c:isvisible() then
    awful.tag.viewonly(c:tags()[1])
    end
    client.focus = c
    c:raise()
    end),
    awful.button({ }, 3, function ()
    if instance then
    instance:hide()
    instance = nil
    else
    instance = awful.menu.clients({ width=250 })
    end
    end),
    awful.button({ }, 4, function ()
    awful.client.focus.byidx(1)
    if client.focus then client.focus:raise() end
    end),
    awful.button({ }, 5, function ()
    awful.client.focus.byidx(-1)
    if client.focus then client.focus:raise() end
    end))
    for s = 1, screen.count() do
    -- Create a promptbox for each screen
    mypromptbox[s] = widget({ type = "textbox", align = "left" })
    -- Create an imagebox widget which will contains an icon indicating which layout we're using.
    -- We need one layoutbox per screen.
    mylayoutbox[s] = widget({ type = "imagebox", align = "right" })
    mylayoutbox[s]:buttons(awful.util.table.join(
    awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
    awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
    awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
    awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
    -- Create a taglist widget
    mytaglist[s] = awful.widget.taglist.new(s, awful.widget.taglist.label.all, mytaglist.buttons)
    -- -- Gigamo battery widget
    -- batterywidget = widget({type = "textbox", name = "batterywidget", align = "right" })
    -- function batteryInfo(adapter)
    -- spacer = " "
    -- local fcur = io.open("/sys/class/power_supply/"..adapter.."/charge_now")
    -- local fcap = io.open("/sys/class/power_supply/"..adapter.."/charge_full")
    -- local fsta = io.open("/sys/class/power_supply/"..adapter.."/status")
    -- local cur = fcur:read()
    -- local cap = fcap:read()
    -- local sta = fsta:read()
    -- local battery = math.floor(cur * 100 / cap)
    -- if sta:match("Charging") then
    -- dir = "^"
    -- battery = "A/C ("..battery..")"
    -- elseif sta:match("Discharging") then
    -- dir = "v"
    -- if tonumber(battery) > 25 and tonumber(battery) < 75 then
    -- battery = battery
    -- elseif tonumber(battery) < 25 then
    -- if tonumber(battery) < 10 then
    -- naughty.notify({ title = "Battery Warning"
    -- , text = "Battery low!"..spacer..battery.."%"..spacer.."left!"
    -- , timeout = 5
    -- , position = "top_right"
    -- , fg = beautiful.fg_focus
    -- , bg = beautiful.bg_focus
    --end
    -- battery = battery
    -- else
    -- battery = battery
    --end
    -- else
    -- dir = "="
    -- battery = "A/C"
    --end
    -- batterywidget.text = spacer.."Bat:"..spacer..dir..battery..dir..spacer
    -- fcur:close()
    -- fcap:close()
    -- fsta:close()
    --end
    -- Create a date widget
    mydatewidget = widget({
    type = "textbox",
    name = "mydatewidget",
    align = "right" })
    wicked.register(mydatewidget, wicked.widgets.date, " ::: %b %e, %R ", 1)
    -- mytextbox.text = " " .. execute_command("perl /home/thomas/.scripts/conky-updates.pl") .. "
    -- MPD
    mpdwidget = widget({
    type = 'textbox',
    name = 'mpdwidget',
    align = 'right',
    wicked.register(mpdwidget, wicked.widgets.mpd,
    function (widget, args)
    if args[1]:find("volume:") == nil then
    return ' <span color="#e2baf1">Now Playing:</span> '..args[1]
    else
    return ''
    end
    end)
    netwidget = widget({
    type = 'textbox',
    name = 'netwidget',
    align = 'right',
    wicked.register(netwidget, wicked.widgets.net,
    ' <span color="#e2baf1">Net:</span> ${wlan0 down} / ${wlan0 up}',
    nil, nil, 3)
    cpugraphwidget = widget({
    type = 'graph',
    name = 'cpugraphwidget',
    align = 'right',
    cpugraphwidget.height = 0.85
    cpugraphwidget.width = 45
    cpugraphwidget.bg = '#333333'
    cpugraphwidget.border_color = '#0a0a0a'
    cpugraphwidget.grow = 'left'
    cpugraphwidget:plot_properties_set('cpu', {
    fg = '#AEC6D8',
    fg_center = '#285577',
    fg_end = '#e2baf1',
    vertical_gradient = false
    wicked.register(cpugraphwidget, wicked.widgets.cpu, '$1', 1, 'cpu')
    --Mail
    mailwidget = widget({
    type = 'textbox',
    name = 'mailwidget',
    align = 'right',
    function run_script()
    local filedescriptor = io.popen('perl /home/thomas/.scripts/checkMail.pl')
    local value = filedescriptor:read()
    filedescriptor:close()
    return {value}
    end
    -- Runs 'my_nifty_script.py' every 90 seconds and puts its output into the widget
    wicked.register(mailwidget, run_script, '<span color="#e2baf1"> Mail:</span> $1', 120)
    --Arch
    archwidget = widget({
    type = 'textbox',
    name = 'archwidget',
    align = 'right'
    function run_script()
    local filedescriptor = io.popen('perl /home/thomas/.scripts/conky-updates.pl')
    local value = filedescriptor:read()
    filedescriptor:close()
    return {value}
    end
    wicked.register(archwidget, run_script, '<span color="#e2baf1"> arch:</span> $1', 1000)
    cpuwidget = widget({
    type = 'textbox',
    name = 'cpuwidget',
    align = 'right'
    wicked.register(cpuwidget, wicked.widgets.cpu,
    ' <span color="#e2baf1">CPU:</span> $1%')
    -- Mousebindings for MPD
    mpdwidget:buttons(awful.util.table.join(
    awful.button({ }, 1, function () awful.util.spawn("mpc toggle") end),
    awful.button({ }, 4, function () awful.util.spawn("aumix -v +3") end),
    awful.button({ }, 5, function () awful.util.spawn("aumix -v -3") end),
    awful.button({ }, 8, function () awful.util.spawn("mpc prev") end),
    awful.button({ }, 9, function () awful.util.spawn("mpc next") end)))
    -- Create a tasklist widget
    mytasklist[s] = awful.widget.tasklist.new(function(c)
    return awful.widget.tasklist.label.currenttags(c, s)
    end, mytasklist.buttons)
    -- Create the wibox
    mywibox[s] = wibox({ position = "top", fg = beautiful.fg_normal, bg = beautiful.bg_normal })
    -- Add widgets to the wibox - order matters
    mywibox[s].widgets = { mylauncher,
    mytaglist[s],
    -- mytasklist[s],
    cpuwidget,
    cpugraphwidget,
    mailwidget,
    archwidget,
    netwidget,
    mypromptbox[s],
    -- obvious.battery(),
    -- mytextbox,
    mpdwidget,
    mydatewidget,
    mylayoutbox[s],
    s == 1 and mysystray or nil }
    mywibox[s].screen = s
    end
    -- {{{ Mouse bindings
    root.buttons(awful.util.table.join(
    awful.button({ }, 3, function () mymainmenu:toggle() end),
    awful.button({ }, 4, awful.tag.viewnext),
    awful.button({ }, 5, awful.tag.viewprev)
    -- {{{ Key bindings
    globalkeys = awful.util.table.join(
    awful.key({ modkey, }, "h", awful.tag.viewprev ),
    awful.key({ modkey, }, "l", awful.tag.viewnext ),
    awful.key({ modkey, }, "Escape", awful.tag.history.restore),
    awful.key({ }, "Print", function () awful.util.spawn("scrot -e 'mv $f ~/Bilder/Sonstiges/ 2>/dev/null'") end),
    awful.key({ modkey, }, "j",
    function ()
    awful.client.focus.byidx( 1)
    if client.focus then client.focus:raise() end
    end),
    awful.key({ modkey, }, "k",
    function ()
    awful.client.focus.byidx(-1)
    if client.focus then client.focus:raise() end
    end),
    awful.key({ modkey, }, "w", function () mymainmenu:show(true) end),
    -- Layout manipulation
    awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
    awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
    awful.key({ modkey, "Control" }, "j", function () awful.screen.focus( 1) end),
    awful.key({ modkey, "Control" }, "k", function () awful.screen.focus(-1) end),
    awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
    awful.key({ modkey, }, "Tab",
    function ()
    awful.client.focus.history.previous()
    if client.focus then
    client.focus:raise()
    end
    end),
    -- Standard program
    awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
    awful.key({ modkey, "Control" }, "r", awesome.restart),
    awful.key({ modkey, "Shift" }, "q", awesome.quit),
    awful.key({ modkey, }, "Right", function () awful.tag.incmwfact( 0.05) end),
    awful.key({ modkey, }, "Left", function () awful.tag.incmwfact(-0.05) end),
    awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
    awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
    awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
    awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
    awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
    awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
    -- Mina
    awful.key({ }, "XF86AudioPlay", function () awful.util.spawn("mpc toggle") end),
    awful.key({ }, "XF86AudioStop", function () awful.util.spawn("mpc stop") end),
    awful.key({ }, "XF86AudioNext", function () awful.util.spawn("mpc next") end),
    awful.key({ }, "XF86AudioPrev", function () awful.util.spawn("mpc prev") end),
    awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("aumix -v -3") end),
    awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("aumix -v +3") end),
    awful.key({ }, "XF86AudioMute", function () awful.util.spawn("aumix -v mute") end),
    awful.key({ }, "XF86HomePage", function () awful.util.spawn("firefox") end),
    awful.key({ }, "XF86Mail", function () awful.util.spawn("thunderbird3") end),
    -- Prompt
    awful.key({ modkey }, "F2",
    function ()
    awful.prompt.run({ prompt = " Run: " },
    mypromptbox[mouse.screen],
    awful.util.spawn, awful.completion.shell,
    awful.util.getdir("cache") .. "/history")
    end),
    awful.key({ modkey }, "x",
    function ()
    awful.prompt.run({ prompt = "Run Lua code: " },
    mypromptbox[mouse.screen],
    awful.util.eval, nil,
    awful.util.getdir("cache") .. "/history_eval")
    end)
    -- Client awful tagging: this is useful to tag some clients and then do stuff like move to tag on them
    clientkeys = awful.util.table.join(
    awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
    awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
    awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
    awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
    awful.key({ modkey, }, "o", awful.client.movetoscreen ),
    awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
    awful.key({ modkey }, "t", awful.client.togglemarked),
    awful.key({ modkey,}, "m",
    function (c)
    c.maximized_horizontal = not c.maximized_horizontal
    c.maximized_vertical = not c.maximized_vertical
    end)
    -- Compute the maximum number of digit we need, limited to 9
    keynumber = 0
    for s = 1, screen.count() do
    keynumber = math.min(9, math.max(#tags[s], keynumber));
    end
    for i = 1, keynumber do
    table.foreach(awful.key({ modkey }, i,
    function ()
    local screen = mouse.screen
    if tags[screen][i] then
    awful.tag.viewonly(tags[screen][i])
    end
    end), function(_, k) table.insert(globalkeys, k) end)
    table.foreach(awful.key({ modkey, "Control" }, i,
    function ()
    local screen = mouse.screen
    if tags[screen][i] then
    tags[screen][i].selected = not tags[screen][i].selected
    end
    end), function(_, k) table.insert(globalkeys, k) end)
    table.foreach(awful.key({ modkey, "Shift" }, i,
    function ()
    if client.focus and tags[client.focus.screen][i] then
    awful.client.movetotag(tags[client.focus.screen][i])
    end
    end), function(_, k) table.insert(globalkeys, k) end)
    table.foreach(awful.key({ modkey, "Control", "Shift" }, i,
    function ()
    if client.focus and tags[client.focus.screen][i] then
    awful.client.toggletag(tags[client.focus.screen][i])
    end
    end), function(_, k) table.insert(globalkeys, k) end)
    table.foreach(awful.key({ modkey, "Shift" }, "F" .. i,
    function ()
    local screen = mouse.screen
    if tags[screen][i] then
    for k, c in pairs(awful.client.getmarked()) do
    awful.client.movetotag(tags[screen][i], c)
    end
    end
    end), function(_, k) table.insert(globalkeys, k) end)
    end
    -- Set keys
    root.keys(globalkeys)
    -- {{{ Hooks
    -- Hook function to execute when focusing a client.
    awful.hooks.focus.register(function (c)
    if not awful.client.ismarked(c) then
    c.border_color = beautiful.border_focus
    end
    end)
    -- Hook function to execute when unfocusing a client.
    awful.hooks.unfocus.register(function (c)
    if not awful.client.ismarked(c) then
    c.border_color = beautiful.border_normal
    end
    end)
    -- Hook function to execute when marking a client
    awful.hooks.marked.register(function (c)
    c.border_color = beautiful.border_marked
    end)
    -- Hook function to execute when unmarking a client.
    awful.hooks.unmarked.register(function (c)
    c.border_color = beautiful.border_focus
    end)
    -- Hook function to execute when a new client appears.
    awful.hooks.manage.register(function (c, startup)
    -- If we are not managing this application at startup,
    -- move it to the screen where the mouse is.
    -- We only do it for filtered windows (i.e. no dock, etc).
    if not startup and awful.client.focus.filter(c) then
    c.screen = mouse.screen
    end
    if use_titlebar then
    -- Add a titlebar
    awful.titlebar.add(c, { modkey = modkey })
    end
    -- Add mouse bindings
    c:buttons(awful.util.table.join(
    awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
    awful.button({ modkey }, 1, awful.mouse.client.move),
    awful.button({ modkey }, 3, awful.mouse.client.resize)
    -- New client may not receive focus
    -- if they're not focusable, so set border anyway.
    c.border_width = beautiful.border_width
    c.border_color = beautiful.border_normal
    -- Check if the application should be floating.
    local cls = c.class
    local inst = c.instance
    if floatapps[cls] then
    awful.client.floating.set(c, floatapps[cls])
    elseif floatapps[inst] then
    awful.client.floating.set(c, floatapps[inst])
    end
    -- Check application->screen/tag mappings.
    local target
    if apptags[cls] then
    target = apptags[cls]
    elseif apptags[inst] then
    target = apptags[inst]
    end
    if target then
    c.screen = target.screen
    awful.client.movetotag(tags[target.screen][target.tag], c)
    end
    -- Do this after tag mapping, so you don't see it on the wrong tag for a split second.
    client.focus = c
    -- Set key bindings
    c:keys(clientkeys)
    -- Set the windows at the slave,
    -- i.e. put it at the end of others instead of setting it master.
    -- awful.client.setslave(c)
    -- Honor size hints: if you want to drop the gaps between windows, set this to false.
    c.size_hints_honor = false
    awful.placement.centered(c)
    end)
    -- Hook function to execute when arranging the screen.
    -- (tag switch, new client, etc)
    awful.hooks.arrange.register(function (screen)
    local layout = awful.layout.getname(awful.layout.get(screen))
    if layout and beautiful["layout_" ..layout] then
    mylayoutbox[screen].image = image(beautiful["layout_" .. layout])
    else
    mylayoutbox[screen].image = nil
    end
    -- Give focus to the latest client in history if no window has focus
    -- or if the current window is a desktop or a dock one.
    if not client.focus then
    local c = awful.client.focus.history.get(screen, 0)
    if c then client.focus = c end
    end
    end)
    awful.hooks.timer.register(3, function()
    batteryInfo("BAT0")
    end)
    -- Hook called every minute
    awful.hooks.timer.register(60, function ()
    mytextbox.text = os.date(" %a %b %d, %H:%M ")
    end)
    -- {{ Quick'n'Dirty Autostart
    -- awful.util.spawn("xset r rate 200 30")
    -- awful.util.spawn("numlockx")
    -- awful.util.spawn("setxkbmap se")
    -- awful.util.spawn("xrandr --output LVDS --off")
    -- awful.util.spawn("xrandr --output VGA-0 --mode 1680x1050")
    -- awful.util.spawn("mount /media/usb")
    -- awful.util.spawn("gsynaptics-init")
    awful.util.spawn("keytouchd")
    awful.util.spawn("xscreensaver -no-splash")
    awful.util.spawn("urxvtd -q -f -o")
    -- awful.util.spawn("ck-launch-session")
    awful.util.spawn("nm-applet")
    awful.util.spawn("xcompmgr -c -t-5 -l-5 -r4.2 -o.80")
    -- awful.util.spawn("bmpanel eight")
    awful.util.spawn("xrdb -merge ~/.Xdefaults")
    errors:
    ╭─[thomas::Heraklit]
    ╰─[16:53]> debug-awesome3.sh ~
    (EE) AIGLX error: dlopen of /usr/lib/xorg/modules/dri/swrast_dri.so failed (/usr/lib/xorg/modules/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
    (EE) GLX: could not load software renderer
    unrecognised device identifier!
    (EE) config/hal: NewInputDeviceRequest failed (2)
    unrecognised device identifier!
    (EE) config/hal: NewInputDeviceRequest failed (2)
    unrecognised device identifier!
    (EE) config/hal: NewInputDeviceRequest failed (2)
    unrecognised device identifier!
    (EE) config/hal: NewInputDeviceRequest failed (2)
    unrecognised device identifier!
    (EE) config/hal: NewInputDeviceRequest failed (2)
    unrecognised device identifier!
    (EE) config/hal: NewInputDeviceRequest failed (2)
    /home/thomas/.config/awesome/rc_test.lua:72: W: luaA_tag_new: This function is deprecated and will be removed, see new syntax
    /home/thomas/.config/awesome/rc_test.lua:72: W: luaA_tag_new: This function is deprecated and will be removed, see new syntax
    /home/thomas/.config/awesome/rc_test.lua:72: W: luaA_tag_new: This function is deprecated and will be removed, see new syntax
    /home/thomas/.config/awesome/rc_test.lua:72: W: luaA_tag_new: This function is deprecated and will be removed, see new syntax
    /home/thomas/.config/awesome/rc_test.lua:72: W: luaA_tag_new: This function is deprecated and will be removed, see new syntax
    W: awful: function is deprecated, see timer object
    stack traceback:
    /usr/share/awesome/lib/awful/util.lua:39: in function 'deprecate'
    /usr/share/awesome/lib/awful/hooks.lua:59: in function 'register'
    /usr/share/awesome/lib/wicked.lua:718: in function 'regregister'
    /usr/share/awesome/lib/wicked.lua:679: in function 'register'
    /home/thomas/.config/awesome/rc_test.lua:210: in main chunkW: awful: function is deprecated, see timer object
    stack traceback:
    /usr/share/awesome/lib/awful/util.lua:39: in function 'deprecate'
    /usr/share/awesome/lib/awful/hooks.lua:59: in function 'register'
    /usr/share/awesome/lib/wicked.lua:718: in function 'regregister'
    /usr/share/awesome/lib/wicked.lua:679: in function 'register'
    /home/thomas/.config/awesome/rc_test.lua:222: in main chunkW: awful: function is deprecated, see timer object
    stack traceback:
    /usr/share/awesome/lib/awful/util.lua:39: in function 'deprecate'
    /usr/share/awesome/lib/awful/hooks.lua:59: in function 'register'
    /usr/share/awesome/lib/wicked.lua:718: in function 'regregister'
    /usr/share/awesome/lib/wicked.lua:679: in function 'register'
    /home/thomas/.config/awesome/rc_test.lua:236: in main chunk/home/thomas/.config/awesome/rc_test.lua:240: W: widget_graph: This function is deprecated and will be removed, see awful.widget.graph
    W: awful: function is deprecated, see timer object
    stack traceback:
    /usr/share/awesome/lib/awful/util.lua:39: in function 'deprecate'
    /usr/share/awesome/lib/awful/hooks.lua:59: in function 'register'
    /usr/share/awesome/lib/wicked.lua:718: in function 'regregister'
    /usr/share/awesome/lib/wicked.lua:679: in function 'register'
    /home/thomas/.config/awesome/rc_test.lua:259: in main chunkW: awful: function is deprecated, see timer object
    stack traceback:
    /usr/share/awesome/lib/awful/util.lua:39: in function 'deprecate'
    /usr/share/awesome/lib/awful/hooks.lua:59: in function 'register'
    /usr/share/awesome/lib/wicked.lua:718: in function 'regregister'
    /usr/share/awesome/lib/wicked.lua:679: in function 'register'
    /home/thomas/.config/awesome/rc_test.lua:277: in main chunkXIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
    after 59 requests (59 known processed) with 0 events remaining.
    (nitrogen:17137): Gtk-WARNING **: cannot open display: :1.0
    W: awful: function is deprecated, see timer object
    stack traceback:
    /usr/share/awesome/lib/awful/util.lua:39: in function 'deprecate'
    /usr/share/awesome/lib/awful/hooks.lua:59: in function 'register'
    /usr/share/awesome/lib/wicked.lua:718: in function 'regregister'
    /usr/share/awesome/lib/wicked.lua:679: in function 'register'
    /home/thomas/.config/awesome/rc_test.lua:294: in main chunkW: awful: function is deprecated, see timer object
    stack traceback:
    /usr/share/awesome/lib/awful/util.lua:39: in function 'deprecate'
    /usr/share/awesome/lib/awful/hooks.lua:59: in function 'register'
    /usr/share/awesome/lib/wicked.lua:718: in function 'regregister'
    /usr/share/awesome/lib/wicked.lua:679: in function 'register'
    /home/thomas/.config/awesome/rc_test.lua:302: in main chunkW: awesome: xcolor_init_reply:264: awesome: error, cannot allocate color '#000000'
    E: awesome: xutil_screen_get:77: X connection invalid
    Some things I´ve already noticed:
    -widget layout has changed (http://awesome.naquadah.org/wiki/Awesome_3.3_to_3.4)
    -the invaders library has been removed
    Any ideas are welcome. Thank you!
    Last edited by tyr0 (2009-10-23 15:02:10)

    Hmm, thank you, I am more familiar now to vicious and i like it. Your setup is looking really nice, thank you for sharing.
    Just one question: I´m trying hard to get the cpugraph.widget. I just get a blank bar without graph. Is there an error in the config?
    -- {{{ License
    -- Awesome configuration, using awesome 3.4 on Arch GNU/Linux
    -- * Adrian C. <anrxc.sysphere.org>
    -- Screenshot: http://sysphere.org/gallery/snapshots
    -- This work is licensed under the Creative Commons Attribution Share
    -- Alike License: http://creativecommons.org/licenses/by-sa/3.0/
    -- {{{ Libraries
    require("awful")
    require("awful.rules")
    require("awful.autofocus")
    -- User libraries
    require("vicious")
    require("teardrop")
    require("scratchpad")
    -- {{{ Variable definitions
    -- Beautiful theme
    beautiful.init(awful.util.getdir("config") .. "/zenburn.lua")
    -- Modifier keys
    local altkey = "Mod4" -- Alt_L
    local modkey = "Mod1" -- Super_L
    -- This is used later as the default terminal and editor to run.
    terminal = "urxvt"
    editor = os.getenv("EDITOR") or "nano"
    editor_cmd = terminal .. " -e " .. editor
    use_titlebar = false
    -- Function aliases
    local exec = awful.util.spawn
    local sexec = awful.util.spawn_with_shell
    -- Window management layouts
    local layouts = {
    awful.layout.suit.tile, -- 1
    awful.layout.suit.tile.left, -- 2
    awful.layout.suit.tile.bottom, -- 3
    awful.layout.suit.tile.top, -- 4
    awful.layout.suit.max, -- 5
    awful.layout.suit.magnifier, -- 6
    awful.layout.suit.floating -- 7
    -- {{{ Tags
    local tags = {}
    tags.setup = {
    { name = "urxvt", layout = layouts[1] },
    -- { name = "emacs", layout = layouts[1] },
    { name = "web", layout = layouts[1] },
    { name = "mail", layout = layouts[5] },
    -- { name = "im", layout = layouts[1], mwfact = 0.13 },
    -- { name = "6", layout = layouts[7], hide = true },
    -- { name = "7", layout = layouts[7], hide = true },
    { name = "media", layout = layouts[7] },
    { name = "misc", layout = layouts[7] }
    for s = 1, screen.count() do
    tags[s] = {}
    for i, t in ipairs(tags.setup) do
    tags[s][i] = tag({ name = t.name })
    tags[s][i].screen = s
    awful.tag.setproperty(tags[s][i], "layout", t.layout)
    awful.tag.setproperty(tags[s][i], "mwfact", t.mwfact)
    awful.tag.setproperty(tags[s][i], "hide", t.hide)
    end
    tags[s][1].selected = true
    end
    -- {{{ Menu
    -- Create a laucher widget and a main menu
    myawesomemenu = {
    { "manual", terminal .. " -e man awesome" },
    { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
    { "restart", awesome.restart },
    { "quit", awesome.quit }
    mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
    { "urxvt", terminal },
    { "shutdown", terminal .. " -e poweroff" },
    { "reboot", terminal .. " -e reboot" }
    mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
    menu = mymainmenu })
    -- Create a systray
    mysystray = widget({ type = "systray" })
    -- {{{ Wibox
    -- {{{ Widgets configuration
    -- {{{ Reusable separators
    local spacer = widget({ type = "textbox" })
    local separator = widget({ type = "textbox" })
    spacer.text = " "
    separator.text = "|"
    -- {{{ CPU usage and temperature
    --local cpuicon = widget({ type = "imagebox" })
    --cpuicon.image = image(beautiful.widget_cpu)
    -- Initialize widget
    --cpuwidget = widget({ type = "textbox" })
    -- Register widget
    --vicious.register(cpuwidget, vicious.widgets.cpu, "$1%")
    -- {{{ CPU usage and temperature
    local cpuicon = widget({ type = "imagebox" })
    cpuicon.image = image(beautiful.widget_cpu)
    -- Initialize widgets
    local cpugraph = awful.widget.graph()
    -- Graph properties
    cpugraph:set_width(50)
    cpugraph:set_height(10)
    cpugraph:set_max_value(100)
    cpugraph:set_background_color(beautiful.fg_off_widget)
    cpugraph:set_color(beautiful.fg_end_widget)
    cpugraph:set_gradient_angle(0)
    cpugraph:set_gradient_colors({ beautiful.fg_end_widget,
    beautiful.fg_center_widget, beautiful.fg_widget })
    awful.widget.layout.margins[cpugraph.widget] = { top = 2, bottom = 2 }
    -- Register widgets
    vicious.register(cpugraph, vicious.widgets.cpu, "$1")
    -- {{{ Battery state
    --local baticon = widget({ type = "imagebox" })
    --baticon.image = image(beautiful.widget_bat)
    -- Initialize widget
    --batwidget = widget({ type = "textbox" })
    -- Register widget
    --vicious.register(batwidget, vicious.widgets.bat, "$1$2%", 61, "BAT0")
    -- {{{ Memory usage
    local memicon = widget({ type = "imagebox" })
    memicon.image = image(beautiful.widget_mem)
    -- Initialize widget
    local membar = awful.widget.progressbar()
    -- Pogressbar properties
    membar:set_width(8)
    membar:set_height(10)
    membar:set_vertical(true)
    membar:set_background_color(beautiful.fg_off_widget)
    membar:set_border_color(nil)
    membar:set_color(beautiful.fg_widget)
    membar:set_gradient_colors({ beautiful.fg_widget,
    beautiful.fg_center_widget, beautiful.fg_end_widget })
    awful.widget.layout.margins[membar.widget] = { top = 2, bottom = 2 }
    -- Register widget
    vicious.register(membar, vicious.widgets.mem, "$1", 13)
    -- {{{ File system usage
    local fsicon = widget({ type = "imagebox" })
    fsicon.image = image(beautiful.widget_fs)
    -- Initialize widgets
    local fs = {
    r = awful.widget.progressbar(), h = awful.widget.progressbar(),
    s = awful.widget.progressbar(), b = awful.widget.progressbar()
    -- Progressbar properties
    for _, w in pairs(fs) do
    w:set_width(5)
    w:set_height(12)
    w:set_vertical(true)
    w:set_background_color(beautiful.fg_off_widget)
    w:set_border_color(beautiful.border_widget)
    w:set_color(beautiful.fg_widget)
    w:set_gradient_colors({ beautiful.fg_widget,
    beautiful.fg_center_widget, beautiful.fg_end_widget })
    awful.widget.layout.margins[w.widget] = { top = 1, bottom = 1 }
    -- Register buttons
    w.widget:buttons(awful.util.table.join(
    awful.button({ }, 1, function () exec("rox", false) end)
    end
    -- Enable caching
    vicious.enable_caching(vicious.widgets.fs)
    -- Register widgets
    vicious.register(fs.r, vicious.widgets.fs, "${/ usep}", 599)
    vicious.register(fs.h, vicious.widgets.fs, "${/home usep}", 599)
    vicious.register(fs.s, vicious.widgets.fs, "${/mnt/Daten usep}", 599)
    --vicious.register(fs.b, vicious.widgets.fs, "${/mnt/extern usep}", 599)
    -- {{{ Network usage
    local dnicon = widget({ type = "imagebox" })
    local upicon = widget({ type = "imagebox" })
    dnicon.image = image(beautiful.widget_net)
    upicon.image = image(beautiful.widget_netup)
    -- Initialize widget
    local netwidget = widget({ type = "textbox" })
    -- Register widget
    vicious.register(netwidget, vicious.widgets.net, '<span color="'
    .. beautiful.fg_netdn_widget ..'">${wlan0 down_kb}</span> <span color="'
    .. beautiful.fg_netup_widget ..'">${wlan0 up_kb}</span>', 3)
    -- {{{ Mail subject
    --local mailicon = widget({ type = "imagebox" })
    --mailicon.image = image(beautiful.widget_mail)
    -- Initialize widget
    --local mailwidget = widget({ type = "textbox" })
    -- Register widget
    --vicious.register(mailwidget, vicious.widgets.mbox, "$1", 181, "/home/anrxc/mail/Inbox")
    -- Register buttons
    --mailwidget:buttons(awful.util.table.join(
    -- awful.button({ }, 1, function () exec("urxvt -title Alpine -e alpine_exp") end)
    -- {{{ Mail subject
    local mailicon = widget({ type = "imagebox" })
    mailicon.image = image(beautiful.widget_mail)
    -- Initialize widget
    mailwidget = widget({ type = "textbox"})
    function run_script()
    local filedescriptor = io.popen('perl /home/thomas/.scripts/checkMail.pl')
    local value = filedescriptor:read()
    filedescriptor:close()
    return {value}
    end
    vicious.register(mailwidget, run_script, '$1', 120)
    -- {{{ Org-mode agenda
    --local orgicon = widget({ type = "imagebox" })
    --orgicon.image = image(beautiful.widget_org)
    -- Initialize widget
    --local orgwidget = widget({ type = "textbox" })
    -- Configure widget
    --local orgmode = {
    -- files = {
    -- "/home/anrxc/.org/work.org", "/home/anrxc/.org/index.org",
    -- "/home/anrxc/.org/personal.org", "/home/anrxc/.org/computers.org"
    -- color = {
    -- past = '<span color="'..beautiful.fg_urgent..'">',
    -- today = '<span color="'..beautiful.fg_normal..'">',
    -- soon = '<span color="'..beautiful.fg_widget..'">',
    -- future = '<span color="'..beautiful.fg_netup_widget..'">'
    -- Register widget
    --vicious.register(orgwidget, vicious.widgets.org,
    -- orgmode.color.past .. '$1</span>|' .. orgmode.color.today .. '$2</span>|' ..
    -- orgmode.color.soon .. '$3</span>|' .. orgmode.color.future .. '$4</span>',
    -- 601, orgmode.files)
    -- Register buttons
    --orgwidget:buttons(awful.util.table.join(
    -- awful.button({ }, 1, function () exec("emacsclient --eval '(org-agenda-list)'") end),
    -- awful.button({ }, 3, function () exec("emacsclient --eval '(make-remember-frame)'") end)
    -- {{{ Volume level
    --local volicon = widget({ type = "imagebox" })
    --volicon.image = image(beautiful.widget_vol)
    -- Initialize widgets
    --local volwidget = widget({ type = "textbox" })
    --local volbar = awful.widget.progressbar()
    -- Progressbar properties
    --volbar:set_width(8)
    --volbar:set_height(10)
    --volbar:set_vertical(true)
    --volbar:set_background_color(beautiful.fg_off_widget)
    --volbar:set_border_color(nil)
    --volbar:set_color(beautiful.fg_widget)
    --volbar:set_gradient_colors({ beautiful.fg_widget,
    -- beautiful.fg_center_widget, beautiful.fg_end_widget })
    --awful.widget.layout.margins[volbar.widget] = { top = 2, bottom = 2 }
    -- Enable caching
    --vicious.enable_caching(vicious.widgets.volume)
    -- Register widgets
    --vicious.register(volwidget, vicious.widgets.volume, "$1%", 2, "PCM")
    --vicious.register(volbar, vicious.widgets.volume, "$1", 2, "PCM")
    -- Register buttons
    --volbar.widget:buttons(awful.util.table.join(
    -- awful.button({ }, 1, function () exec("kmix") end),
    -- awful.button({ }, 2, function () exec("amixer -q sset Master toggle") end),
    -- awful.button({ }, 4, function () exec("amixer -q sset PCM 2dB+") end),
    -- awful.button({ }, 5, function () exec("amixer -q sset PCM 2dB-") end)
    --)) volwidget:buttons( volbar.widget:buttons() )
    -- {{{ mpd widget
    local mpdicon = widget({ type = "imagebox" })
    mpdicon.image = image(beautiful.widget_phones)
    -- Initialize widgets
    mpdwidget = widget({ type = "textbox"})
    -- Register widget
    vicious.register(mpdwidget, vicious.widgets.mpd, "$1")
    -- {{{ pacman widget
    local pacicon = widget({ type = "imagebox" })
    pacicon.image = image(beautiful.widget_pacman)
    -- Initialize widgets
    pacmanwidget = widget({ type = "textbox"})
    -- Register widget
    vicious.register(pacmanwidget, vicious.widgets.pacman, "$1", 250)
    -- {{{ Date and time
    local dateicon = widget({ type = "imagebox" })
    dateicon.image = image(beautiful.widget_date)
    -- Initialize widget
    datewidget = widget({ type = "textbox" })
    -- Register widget
    vicious.register(datewidget, vicious.widgets.date, "%b %e, %R", 61)
    -- Register buttons
    datewidget:buttons(awful.util.table.join(
    awful.button({ }, 1, function () exec("pylendar.py") end)
    -- {{{ System tray
    local systray = widget({ type = "systray" })
    -- {{{ Wibox initialisation
    local wibox = {}
    local taglist = {}
    local layoutbox = {}
    local promptbox = {}
    taglist.buttons = awful.util.table.join(
    awful.button({ }, 1, awful.tag.viewonly),
    awful.button({ modkey }, 1, awful.client.movetotag),
    awful.button({ }, 3, awful.tag.viewtoggle),
    awful.button({ modkey }, 3, awful.client.toggletag),
    awful.button({ }, 4, awful.tag.viewnext),
    awful.button({ }, 5, awful.tag.viewprev
    for s = 1, screen.count() do
    -- Create a promptbox
    promptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
    -- Create a layoutbox
    layoutbox[s] = awful.widget.layoutbox(s)
    layoutbox[s]:buttons(awful.util.table.join(
    awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
    awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
    awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
    awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)
    -- Create the taglist
    taglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, taglist.buttons)
    -- Create the wibox
    wibox[s] = awful.wibox({ screen = s,
    fg = beautiful.fg_normal, height = 14,
    bg = beautiful.bg_normal, position = "top"
    -- Add widgets to the wibox
    wibox[s].widgets = {
    { taglist[s],
    layoutbox[s],
    promptbox[s],
    layout = awful.widget.layout.horizontal.leftright
    s == screen.count() and systray or nil,
    separator, datewidget, dateicon,
    -- separator, volwidget, spacer, volbar.widget, volicon,
    separator, mpdwidget, mpdicon,
    -- separator, spacer, orgwidget, orgicon,
    separator, pacmanwidget, pacicon,
    separator, mailwidget, mailicon,
    separator, upicon, netwidget, dnicon,
    separator, fs.s.widget, fs.h.widget, fs.r.widget, fsicon,
    separator, spacer, membar.widget, spacer, memicon,
    -- separator, spacer, batwidget, baticon,
    separator, cpugraph.widget, cpuicon,
    layout = awful.widget.layout.horizontal.rightleft
    end
    -- {{{ Mouse bindings
    root.buttons(awful.util.table.join(
    awful.button({ }, 3, function () mymainmenu:toggle() end),
    awful.button({ }, 4, awful.tag.viewnext),
    awful.button({ }, 5, awful.tag.viewprev)
    -- Client bindings
    local clientbuttons = awful.util.table.join(
    awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
    awful.button({ modkey }, 1, awful.mouse.client.move),
    awful.button({ modkey }, 3, awful.mouse.client.resize)
    -- {{{ Key bindings
    -- {{{ Global keys
    local globalkeys = awful.util.table.join(
    -- {{{ Applications
    awful.key({ modkey }, "e", function () exec("emacsclient -n -c") end),
    awful.key({ modkey }, "r", function () exec("rox", false) end),
    awful.key({ modkey }, "w", function () exec("firefox") end),
    awful.key({ modkey }, "Return", function () exec("urxvt") end),
    awful.key({ altkey }, "Return", function () exec("thunar") end),
    awful.key({ altkey }, "#49", function () teardrop("urxvt", "bottom") end),
    awful.key({ altkey }, "m", function () exec("urxvt -e ncmpcpp") end),
    awful.key({ modkey }, "g", function () sexec("GTK2_RC_FILES=~/.gtkrc-gajim gajim") end),
    awful.key({ modkey }, "q", function () exec("emacsclient --eval '(make-remember-frame)'") end),
    -- {{{ Multimedia keys
    -- awful.key({}, "#160", function () exec("kscreenlocker --forcelock") end),
    -- awful.key({}, "#121", function () exec("pvol.py -m") end),
    -- awful.key({}, "#122", function () exec("pvol.py -p -c -2") end),
    -- awful.key({}, "#123", function () exec("pvol.py -p -c 2") end),
    -- awful.key({}, "#232", function () exec("plight.py -s -a") end),
    -- awful.key({}, "#233", function () exec("plight.py -s -a") end),
    -- awful.key({}, "#244", function () exec("sudo /usr/sbin/pm-hibernate") end),
    -- awful.key({}, "#150", function () exec("sudo /usr/sbin/pm-suspend") end),
    -- awful.key({}, "#225", function () exec("pypres.py") end),
    -- Mina
    awful.key({ }, "XF86AudioPlay", function () awful.util.spawn("mpc toggle") end),
    awful.key({ }, "XF86AudioStop", function () awful.util.spawn("mpc stop") end),
    awful.key({ }, "XF86AudioNext", function () awful.util.spawn("mpc next") end),
    awful.key({ }, "XF86AudioPrev", function () awful.util.spawn("mpc prev") end),
    awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("aumix -v -3") end),
    awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("aumix -v +3") end),
    awful.key({ }, "XF86AudioMute", function () awful.util.spawn("aumix -v 1") end),
    awful.key({ }, "XF86HomePage", function () awful.util.spawn("firefox") end),
    awful.key({ }, "XF86Mail", function () awful.util.spawn("thunderbird3") end),
    -- {{{ Prompt menus
    awful.key({ modkey }, "F2", function ()
    awful.prompt.run({ prompt = "Run: " }, promptbox[mouse.screen].widget,
    function (...) promptbox[mouse.screen].text = exec(unpack(arg), false) end,
    awful.completion.shell, awful.util.getdir("cache") .. "/history")
    end),
    awful.key({ modkey }, "F3", function ()
    awful.prompt.run({ prompt = "Dictionary: " }, promptbox[mouse.screen].widget,
    function (words)
    sexec("crodict "..words.." | ".."xmessage -timeout 10 -file -")
    end)
    end),
    awful.key({ modkey }, "F4", function ()
    awful.prompt.run({ prompt = "Run Lua code: " }, promptbox[mouse.screen].widget,
    awful.util.eval, nil, awful.util.getdir("cache") .. "/history_eval")
    end),
    -- {{{ Awesome controls
    awful.key({ modkey, "Shift" }, "q", awesome.quit),
    awful.key({ modkey, "Shift" }, "r", function ()
    promptbox[mouse.screen].text = awful.util.escape(awful.util.restart())
    end),
    -- {{{ Tag browsing
    awful.key({ modkey }, "l", awful.tag.viewnext),
    awful.key({ modkey }, "h", awful.tag.viewprev),
    awful.key({ altkey }, "Tab", awful.tag.history.restore),
    awful.key({ }, "Print", function () awful.util.spawn("scrot -e 'mv $f ~/Bilder/Sonstiges/ 2>/dev/null'") end),
    -- {{{ Layout manipulation
    awful.key({ modkey, }, "Right", function () awful.tag.incmwfact( 0.05) end),
    awful.key({ modkey, }, "Left", function () awful.tag.incmwfact(-0.05) end),
    awful.key({ modkey }, "space", function () awful.layout.inc(layouts, 1) end),
    awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
    -- {{{ Focus controls
    awful.key({ modkey }, "p", function () awful.screen.focus_relative(1) end),
    awful.key({ modkey }, "s", function () scratchpad.toggle() end),
    awful.key({ modkey,}, "m",
    function (c)
    c.maximized_horizontal = not c.maximized_horizontal
    c.maximized_vertical = not c.maximized_vertical
    end),
    awful.key({ modkey }, "u", awful.client.urgent.jumpto),
    awful.key({ modkey }, "j", function ()
    awful.client.focus.byidx(1)
    if client.focus then client.focus:raise() end
    end),
    awful.key({ modkey }, "k", function ()
    awful.client.focus.byidx(-1)
    if client.focus then client.focus:raise() end
    end),
    awful.key({ modkey }, "Tab", function ()
    awful.client.focus.history.previous()
    if client.focus then client.focus:raise() end
    end),
    awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx(1) end),
    awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx(-1) end)
    -- {{{ Client manipulation
    local clientkeys = awful.util.table.join(
    awful.key({ modkey }, "b", function ()
    wibox[mouse.screen].visible = not wibox[mouse.screen].visible
    end),
    awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
    awful.key({ modkey }, "d", function (c) scratchpad.set(c, 0.60, 0.60, true) end),
    awful.key({ modkey }, "f", function (c) awful.titlebar.remove(c)
    c.fullscreen = not c.fullscreen; c.above = not c.fullscreen
    end),
    awful.key({ modkey }, "m", function (c)
    c.maximized_horizontal = not c.maximized_horizontal
    c.maximized_vertical = not c.maximized_vertical
    end),
    awful.key({ modkey }, "o", awful.client.movetoscreen),
    awful.key({ modkey }, "Next", function () awful.client.moveresize(20, 20, -20, -20) end),
    awful.key({ modkey }, "Prior", function () awful.client.moveresize(-20, -20, 20, 20) end),
    awful.key({ modkey }, "Down", function () awful.client.moveresize(0, 20, 0, 0) end),
    awful.key({ modkey }, "Up", function () awful.client.moveresize(0, -20, 0, 0) end),
    awful.key({ modkey }, "Left", function () awful.client.moveresize(-20, 0, 0, 0) end),
    awful.key({ modkey }, "Right", function () awful.client.moveresize(20, 0, 0, 0) end),
    awful.key({ modkey, "Shift" }, "m", function (c) c:swap(awful.client.getmaster()) end),
    awful.key({ modkey, "Shift" }, "c", function (c) exec("kill -CONT " .. c.pid) end),
    awful.key({ modkey, "Shift" }, "s", function (c) exec("kill -STOP " .. c.pid) end),
    awful.key({ modkey, "Shift" }, "t", function (c)
    if c.titlebar then awful.titlebar.remove(c)
    else awful.titlebar.add(c, { modkey = modkey }) end
    end),
    awful.key({ modkey, "Shift" }, "f", function (c) awful.client.floating.toggle(c)
    if awful.client.floating.get(c)
    then c.above = true; awful.titlebar.add(c); awful.placement.no_offscreen(c)
    else c.above = false; awful.titlebar.remove(c) end
    end)
    use_titlebar = false
    -- {{{ Keyboard digits
    local keynumber = 0
    for s = 1, screen.count() do
    keynumber = math.min(9, math.max(#tags[s], keynumber));
    end
    -- {{{ Tag controls
    for i = 1, keynumber do
    globalkeys = awful.util.table.join( globalkeys,
    awful.key({ modkey }, i, function ()
    local screen = mouse.screen
    if tags[screen][i] then
    awful.tag.viewonly(tags[screen][i])
    end
    end),
    awful.key({ modkey, "Control" }, i, function ()
    local screen = mouse.screen
    if tags[screen][i] then
    awful.tag.viewtoggle(tags[screen][i])
    end
    end),
    awful.key({ modkey, "Shift" }, i, function ()
    if client.focus and tags[client.focus.screen][i] then
    awful.client.movetotag(tags[client.focus.screen][i])
    end
    end),
    awful.key({ modkey, "Control", "Shift" }, i, function ()
    if client.focus and tags[client.focus.screen][i] then
    awful.client.toggletag(tags[client.focus.screen][i])
    end
    end))
    end
    -- Set keys
    root.keys(globalkeys)
    -- {{{ Rules
    awful.rules.rules = {
    { rule = { },
    properties = {
    border_width = beautiful.border_width,
    border_color = beautiful.border_normal,
    focus = true,
    keys = clientkeys,
    buttons = clientbuttons
    { rule = { name = "Alpine" },
    properties = { tag = tags[1][4] } },
    { rule = { class = "Gajim.py" },
    properties = { tag = tags[1][5] } },
    { rule = { class = "Akregator" },
    properties = { tag = tags[1][8] } },
    { rule = { class = "Firefox", instance = "Navigator" },
    properties = { tag = tags[screen.count()][2] } },
    { rule = { class = "Emacs", instance = "emacs" },
    properties = { tag = tags[screen.count()][2] } },
    { rule = { class = "Emacs", instance = "_Remember_" },
    properties = { floating = true } },
    { rule = { class = "Xmessage", instance = "xmessage" },
    properties = { floating = true } },
    { rule = { class = "ROX-Filer" },
    properties = { floating = true } },
    { rule = { class = "Ark" },
    properties = { floating = true } },
    { rule = { class = "Geeqie" },
    properties = { floating = true } },
    { rule = { class = "Pinentry-gtk-2" },
    properties = { floating = true } },
    { rule = { instance = "firefox-bin" },
    properties = { floating = true } },
    -- {{{ Signals
    -- {{{ Signal function to execute when a new client appears
    client.add_signal("manage", function (c, startup)
    -- Add a titlebar to each floating client
    -- if awful.client.floating.get(c)
    -- or awful.layout.get(c.screen) == awful.layout.suit.floating then
    -- if not c.titlebar and c.class ~= "Xmessage" then
    -- awful.titlebar.add(c, { modkey = modkey })
    -- end
    -- -- Floating clients are always on top
    -- c.above = true
    -- end
    -- Enable sloppy focus
    c:add_signal("mouse::enter", function (c)
    if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
    and awful.client.focus.filter(c) then
    client.focus = c
    end
    end)
    -- Client placement
    if not startup then
    awful.client.setslave(c)
    if not c.size_hints.user_position
    and not c.size_hints.program_position then
    awful.placement.centered(c)
    awful.placement.no_offscreen(c)
    end
    end
    -- Honor size hints
    c.size_hints_honor = false
    end)
    -- {{{ Focus signal functions
    client.add_signal("focus", function (c) c.border_color = beautiful.border_focus end)
    client.add_signal("unfocus", function (c) c.border_color = beautiful.border_normal end)
    awful.util.spawn("keytouchd")
    awful.util.spawn("xscreensaver -no-splash")
    awful.util.spawn("urxvtd -q -f -o")
    awful.util.spawn("nm-applet")
    awful.util.spawn("xcompmgr -c -t-5 -l-5 -r4.2 -o.80")
    awful.util.spawn("xrdb -merge ~/.Xdefaults")

  • Is Creative Alchemy Supported on Vista 64 bit? Attention Creative Mod p

    Ok I'm confused.
    I've had a creative X-Fi Fatalty card for a couple of years that came with a Mesh pc I bought.
    So I buy all the kit for a new pc and think I can just move the card across. I install Vista 64, install service pack and all is peachy apart form my Razer mouse that needs a new driver.
    I install a load of old games and they work fine. Some fine tuning for allowing games to run as admin, but considering my new pc is so much faster, and the greater security (i've been told, and call me sad?but i believe it) I'm thinking its worth it.
    Wow I think, this vista malaky's great!
    Pop in my creative?soundcard?download the drivers and think here we go.
    So I install Half life 2. A fairly old game. And it all starts going wrong. I load up the first level and I suddenly only have 2.0 sound.
    open up the console and notice all kinda errors (on screen node graph out of date, A. I.disabled, and a load more in the console when i look).
    Are they caused by Vista or Creative? I dunno, i didn't load half life prior to installing the card so it could be either to be fair.
    So I read up more to try to work it out and I come across a funny thing. If in Creatives download manger pages you tell it you have a creative Fatalty soundcard,and you have a vista 64bit operating system then there are no downloads.
    But if you put in Vista 32 bit then you get offered the Alchamey drivers. Which state that they are for 32 and 64 bit versions of Vista.
    Now i've been looking at these forums for the last 2 days and I'm begining to feel a little worried. I'm not a sound Guru and I don't understand alot of whats been discussed. I don't feel i'm in a place to pass judgemnt on Creative cos the only contact I've had with their support staff was with a Zen Micro that was out of warrenty and they fixed that for free. Didn't even charge me P&P to send it back!
    So I'm really not sure where I stand. I'm about to download the alchemy software that may/may not work with vista 64 by admission of their own website, and can't help but feel that support isn't quite what I was hoping for, and used to. Is the MP3 part of Creative effectivly a seperate company or something?
    Now I don't want to start yet another bash creative post.
    What I'd really like is a comment from Creative as to why their driver page does/doesn't offer you the right downloads and a solution to my problem.
    Call me selfish but I kinda dcame to the Creative Help forums for some, well, Help.
    I'd really appreciate if all the pro and anti forum trolls could stay off this topic and give creative a chance to show they can do good support.

    JohnZS, thanx very much for the prompt response. I really do appreciate it.
    But let me get this straight.
    I've had to download a software package from a page I shouldn't have been at.
    I have to add values to a software package that I have to rely on good natured people on a forum to supply.
    And no offence, but even then I don't have the whole answer. I have to search manually for the registry or game path for the ?.exe? I assume (I'm doing this whilst tring to solve my prob, so I could well be wrong about this) tomake the **bleep** think work.
    And this thing is Vista stickered?
    Ok still going with the no bandwagon jumping plse people, I'm just an honest guy with no agenda apart from blowing **bleep** up on my poota as a stress release, so I'd like to see from Creative where I'm going wrong here.
    Oh I seriously forgot the no swearing policy, and on forums like this I do agree with it, its just its late, i'm a bit annoyed, and to be frank, slightly drunk.
    Message Edited by camalbitboy on 04-02-2008 03:24 PM

  • Creative Alchemy & Windows 7

    Creative Alchemy was a great innovation for putting DirectSound3D back into games that ran on Windows Vista & putting the EAX effects back in many games like Unreal Tournament 999, Deus Ex, Half-Life & a slew of other games.
    Unfortunately, Creative Alchemy is failing in Windows 7 with many games whereas it worked in Vista. This is NOT a complaint-type post, but rather a plea for the Mods & Devs at Creative to please address these issues in a timely manner.
    Windows 7 is a better operating system than Vista, so I think it's a worthwhile endeavor, as there are more people that play these older games, that are migrating to Windows 7, than one might care to believe. I'm one of them. Please don't be decei'ved, this is NOT a small group of people/gamers.
    I know that there are individuals out there that will say "Windows 7 is nothing more than the same pile of road apples as Vista, with a different swarm of bugs crawling all over it"? -- and to a degree-- you are right ( no hardware abstraction layer reimplemented -- they should have-- they did dress up OpenGL graphics rendering ). But Windows 7 is still a better OS that Vista -- hands down.
    As I said before Windows 7 is worth the endeavor, as is a lot of these older games. Especially Unreal Tournament 999, as even 0 years later after its release, it still is regarded as the best game in the Unreal series by a great many and the on-line player numbers prove it. I've purchased and played all the Unreal Series games and played them extensi'vely & I can tell you, for a fact, that running Unreal Tournament 999 on XP with EAX effects, on an X-fi Extreme music card, the sound displacement was far superior than any of the other Unreal series games. It's not even remotely close. Creative Alchemy had carried this great sound in Unreal Tournament 999 over to Vista, now lets take it to the next level and get it carried over to Windows 7.
    Also there are thousands of players & servers running Half-Life & its many mods ( Counter-Strike, anyone? ) and it may pertain to Half-Life 2 as well.
    And BTW, Ive tried a multitude of different drivers & alchemy releases & Daniel K's driver packages. Sorry, but these don't get DirectSound3D to work in Windows 7.
    So, I'm coming here & BEGGING, PLEADING -- PLEASE address this issue in a timely manner.

    $ I'm pretty sure Microsoft revamped some of the Audio stuff after so many people complained about the way it was changed in Vista. I have been playing my older games and have not even reinstalled Alchemy, they seem OK to me. Was getting nice surround sound in Unreal Tournamnet last night when I tired it out.

Maybe you are looking for

  • Connecting to SCVMM remotely via install on workstation cannot run console windows to VMs (locally on scvmm it works)

    We recently installed a SCVMM 2012 machine and connected it to a few HyperV2012 hosts. From the SCVMM console locally on the machine it is installed on, I can connect to the Console of the VMs on the remote HyperV machines.  However for some reason w

  • PB 12" 1.33 GHz (10.4.1) + NEC LT156 LCD Projector

    Today I tried to hook up my powerbook to the LCD projector using the mini-DVI to VGA adapter. However, I couldn't anything to show on the projector. It seems to detect the device as the PB screen flashes dark and back on again whenever I attach or de

  • PSE 12 Photo Editor won't open

    Hi, I purchased PSE 12 in January 2014. It's been working just fine up until the other day. I went to open Photo Editor and it sent me to some other screen and asked me to login. Tried logging in and it said I wasn't connected to the internet yet I w

  • Rollback button

    Hi all!! I'm trying to include a Rollback button in a form, but it doesn't works. The UIX code is: <submitButton text="Cancelar" model="${bindings.Rollback}" id="Rollback0" event="action" disabled="${createMode}"/> When i execute the form and test th

  • Posting a readonly field

    Hello, I generated a create uix file based on a bc4j view object. Then I databinded a value to the field GeaendertVon. This value must not be changed by the user, but setting it to readonly="true" or rendered="false" (the preferred solution) gives th