On 2009-May-16 (Sat) at 13:34 (+0100), Joseph Manning wrote: >> I wrote a tiny rc.lua file >> ( included in full at the end of this message )
Hello again, I did not realise that the mailer would accept attachments. Here's my tiny rc.lua file as an attachment, for convenience. Joseph ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Joseph Manning / Computer Science / UCC Cork Ireland / [email protected] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----------------------------------------------------------------- -- This tiny awesomerc.lua file simply creates two tags. -- -- Keys 'a' and 'b' should flip between these two tags. -- -- Key 'a' works just as expected, but key 'b' fails, with -- -- othertag[ thistag ] = nil -- ----------------------------------------------------------------- -- awesome v3.2.1 / Lua 5.1.4 / Debian 5.0 / Acer Aspire One -- ----------------------------------------------------------------- -- Joseph Manning : [email protected] : 2009-May-16 -- ----------------------------------------------------------------- ---------------------------------------------------------------------- libraries require( "awful" ) require( "beautiful" ) ---------------------------------------------------------------------- theme beautiful.init( "/usr/share/awesome/themes/default/theme" ) ---------------------------------------------------------------------- tags tag1 = tag( "1" ) tag1.screen = 1 tag2 = tag( "2" ) tag2.screen = 1 othertag = { } othertag[ tag1 ] = tag2 othertag[ tag2 ] = tag1 tag1.selected = true ---------------------------------------------------------------------- topbar taglist = awful.widget.taglist.new( 1, awful.widget.taglist.label.all ) topbar = wibox{ } topbar.widgets = { taglist } topbar.screen = 1 ---------------------------------------------------------------------- keys rootkeys = { key( { }, "a", function ( ) local thistag = awful.tag.selected( ) if thistag == tag1 then awful.tag.viewonly( othertag[ tag1 ] ) elseif thistag == tag2 then awful.tag.viewonly( othertag[ tag2 ] ) end end ), key( { }, "b", function ( ) local thistag = awful.tag.selected( ) awful.tag.viewonly( othertag[ thistag ] ) end ), key( { }, "q", awesome.quit ) } root.keys( rootkeys ) --------------------------------------------------------------------------------
