"floating" table?

I have a dreamweaver webpage that is pretty long and requires
the user to scroll down through it. I have some text at the top
left of the page that I would like to "anchor" to that spot so when
the user scrolls through the page, the text doesn't scroll up, but
stays in the same spot. This may be easy but I am not sure how to
do this, or if it is even possible.

This may be an idea, Google peristent layer or see here:
http://javascript.internet.com/image-effects/persistent-layer.html
Jo
"kcrockett" <[email protected]> wrote in
message
news:eptk1q$5tr$[email protected]..
>I have a dreamweaver webpage that is pretty long and
requires the user to
> scroll down through it. I have some text at the top left
of the page that
> I
> would like to "anchor" to that spot so when the user
scrolls through the
> page,
> the text doesn't scroll up, but stays in the same spot.
This may be easy
> but I
> am not sure how to do this, or if it is even possible.
>

Similar Messages

  • Help with floating table

    I'm helping my dad with a website and he wants the table sidebar i have to float down the page when the viewer scrolls. I know next to nothing about coding and could use some help updating it to be a floating table.

    The table is still above the text, not on the side like in the image you sent.
    I have the test document in a folder called "Test" in that folder i have a folder named "CSS" where the text document is saved as style.css
    The code i have now is below... Not sure what I'm doing wrong :/
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <head>
    <title>style.css</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="masthead">
        <div id="logo">
        </div>
        <div id="header">
        </div>
    </div>
    <div id="container">
        <div id="left_col">
          <table width="188" border="1">
          <tr>
            <td>Test 1 </td>
          </tr>
          <tr>
            <td>Test 2 </td>
          </tr>
          <tr>
            <td>Test 3 </td>
          </tr>
          <tr>
            <td>Test 4 </td>
          </tr>
        </table>
        </div>
      <div id="page_content" style="overflow: auto;">
          <p>The Department of the Navy desires a tool for analyzing  the affects of budgetary changes upon Fire and Emergency Services provided upon  Naval Installations throughout the world.   The diversity of these installations suggests that across the board  funding changes may affect each location differently.  This project presents a Fire Loss Model to  support the continued development of the analysis tool.</p>
        </div>
    </div>
    <div id="footer"></div>
    </body>
    </html>

  • Floating Tables in Dreamweaver MX

    I'm not sure where to begin looking for this topic, so I'm
    starting here. Can anyone tell me where to find tutorial or
    instructions on a method to make the "main" area of my web pages
    center in the browser window, regardless of the size of the window?
    I've seen sites that do this, but I can't find the subject in any
    of my tutorials, and I can seem to make it work "intuitively" by
    myself. For example, see this site:
    http://www.davidclarkdesign.com/
    Any help?

    Of course it's clever (although dated) but the achilles heel
    is that it only
    works on a container for which the height has been defined,
    and for one
    containing text, that's a killer. Also note the curiousity
    that the author
    has use points for the zero units. I prefer the use of
    furlongs for zero.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Dooza" <[email protected]> wrote in message
    news:gm968i$adr$[email protected]..
    > jerrybatey wrote:
    >> Murray,
    >>
    >> I really appreciate you staying with me on this
    subject. I sometimes
    >> think I'm starting to get a glimmer of
    understanding, but I'm still
    >> trying to figure out how the "floating" is done on
    the following site:
    >>
    >>
    http://www.davidclarkdesign.com/
    >
    > Its cunning, thats for sure:
    >
    > div#content {
    > height: 350px;
    > width: 100%;
    > background-color: #ffffff;
    > background-image: none;
    > background-repeat: repeat;
    > background-attachment: scroll;
    > background-position: 0% 0%;
    > position: absolute;
    > top: 50%;
    > left: 0pt;
    > margin-top: -175px;
    > margin-right: 0pt;
    > margin-bottom: 0pt;
    > margin-left: 0pt;
    > }
    >
    > Using absolute positioning, set the height, then set the
    top position to
    > half the viewport (50%) but then use negative top margin
    that is half the
    > height of the element. Nifty indeed, not seen it done
    like this before.
    >
    > Dooza

  • After creating a table, how do I type outside of it?   I can't get a cursor to come up.

    After creating a table, how do I type outside of it?   I can't get a cursor to come up.

    Barker,
    If by "outside" you mean "on the right or left of" a table, you must make the Table a Floating Object to do that.
    If you must use Inline Tables, you can do this:
    Add a Floating Text Box with the text that needs to be "outside" the table. Arrange, then Group the Text Box with the Floating Table, and then set the Group to Inline.
    Jerry

  • How to rotate a large table

    I'm building a long technical report with Pages'08.
    There are many tables in this report.
    This document is in portrait format.
    In the middle of this document I have a particularly large
    table which can't be read if I try to stay on a portrait
    presentation of this table: too many columns (15).
    Hence I'd like to find an easy way to either rotate
    the page or the table so as to be able to use larger
    columns.
    I discovered that Pages'08 doesn't permit to put one
    page in landscape format. I also abandonned the idea of
    using 3 different documents (part 1 in portrait,
    part 2 in landscape, part 3 in portrait again).
    I have to chain the paragraph numbers.
    I have to make a table of content at the end of
    this technical report.
    What is the most efficient way to manage to fill this large
    table.
    Word let me do this, but unfortunately it does also
    make me spend toomuch time on other simple and basic functions.
    Is Pages'09 better on this basic and frequent need (at least for my job)?
    <pre>--------
    As long as you'll see students making graphics with pen on paper,
    you'll see the missing keystone of the software empire.
    dan</pre>

    Peggy wrote:
    You can rotate a floating table, but it can be a problem if you need to edit the table. It will auto-rotate to portrait to edit it but it can be difficult to see or get to the outside edges. I find it easiest to copy & paste the table into a landscape document the copy it back after editing.
    Thank you for the nice hint.
    I finally choosed to work on a temporary document in A3 format,
    and keep it open so as to be able to quickly copy my table in the
    main document every time I update it.
    During this copy operation I noticed a boring problem:
    as the text column in my main document is slightly smaller than my table,
    Pages decide to shrink it every time, and I can't recover it's
    original size (which I penibly tuned up in my A3 document).
    Hence all the cell contents are partially hidden.
    The button:
    Inspector > Metrics > Original Size
    is off.
    Do you know how to circumvent this bad habit of Pages to resize my
    imported table?
    <pre>--------
    As long as you'll see students making graphics with pen on paper,
    you'll see the missing keystone of the software empire.
    dan</pre>

  • Problem with tables spanning multiple pages

    I have used Pages early on before Numbers to track my small business expenses vs income. I use tables to manage this by clicking outside the page so it can be unrestricted by text fields but it creates a problem.
    Problem: free floating tables when rows continue past the footer, don't auto format onto another page.
    Needed solution: How do I format the table so it automatically formats the total bar onto the next page without changing my existing layouts?

    I have used Pages early on before Numbers to track my small business expenses vs income. I use tables to manage this by clicking outside the page so it can be unrestricted by text fields but it creates a problem.
    Problem: free floating tables when rows continue past the footer, don't auto format onto another page.
    Needed solution: How do I format the table so it automatically formats the total bar onto the next page without changing my existing layouts?

  • Css floats

    I would like to create a "floating table" (for lack of a
    better description)
    Where as There would be a block element say <p
    id="thisblock">This block would have some text, images, all
    formatted and wrapped in a border - thanks to #thisblock {...} in
    css</p>
    now in that box, i would like to put a list that would split
    down 2 columns, left one will be aligned right, right aligned left
    ie:
    This block would have some text, images, all formatted and
    wrapped in a border
    ________XXXXXXXXXXXXXXXX_____XXXXXXXXXXXXXXXXXXXXX
    __ XXXXXXXXXXXXXXXXXXXXXX____XXXXXXXXXXXXXXXXXXXXXXXX
    _________ XXXXXXXXXXXXXXX____XXXXXXXXXXXXXXXXXXXXXXX
    then some more text down here
    well you get the idea. I tried using floats, but of course
    the "then some more text" ends up buried under the list. I tried
    clear: both, but that didn't help. im new to css and any help would
    be appreciated!
    Thanks

    Why not use a table within the floating element?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "m0piqsutjjqv4du" <[email protected]> wrote
    in message
    news:ejakns$338$[email protected]..
    >I would like to create a "floating table" (for lack of a
    better
    >description)
    >
    > Where as There would be a block element say <p
    id="thisblock">This block
    > would
    > have some text, images, all formatted and wrapped in a
    border - thanks to
    > #thisblock {...} in css</p>
    >
    > now in that box, i would like to put a list that would
    split down 2
    > columns,
    > left one will be aligned right, right aligned left ie:
    >
    > This block would have some text, images, all formatted
    and wrapped in a
    > border
    > ________XXXXXXXXXXXXXXXX_____XXXXXXXXXXXXXXXXXXXXX
    > __ XXXXXXXXXXXXXXXXXXXXXX____XXXXXXXXXXXXXXXXXXXXXXXX
    > _________ XXXXXXXXXXXXXXX____XXXXXXXXXXXXXXXXXXXXXXX
    > then some more text down here
    >
    > well you get the idea. I tried using floats, but of
    course the "then some
    > more
    > text" ends up buried under the list. I tried clear:
    both, but that didn't
    > help.
    > im new to css and any help would be appreciated!
    >
    > Thanks
    >

  • Problems comparing two Floats

    Hello all,
    I keep getting exceptions using the code for a table cell renderer listed below.
    Basically, the program blows up whenever the renderer is asked to compare two floats.
    Two string values, a string and a float, it does not have the desired effect, but a least it runs.
    "     public Object[][] aaTableValues = {
              { new Float( 700.00 ), new Float( 300.00 ), new Float( 400.00 ), "Fred", "Snead", "inform", "detail" },
              { new Float( 1000.00 ), new Float( 200.00 ), new Float( 800.00 ), "Jane", "Smith", "limit", "detail" },
              { new Float( 500.00 ), new Float( 200.00 ), new Float( 300.00 ), "Mary", "Ellis", "inform", "detail" },
              table1.setDefaultRenderer(Object.class, new DefaultTableCellRenderer() {
                public Component getTableCellRendererComponent(JTable table,
                                                        Object value,
                                                        boolean isSelected,
                                                        boolean hasFocus,
                                                        int row,
                                                        int column) {
                    super.getTableCellRendererComponent(table, value, isSelected,
                            hasFocus, row, column);
                    // Prepare default color        
                    Color color = isSelected ? table.getSelectionForeground(): table.getForeground();
                    if (column == 1) {
                        float val1 = 0.0F;
                            val1 = ((Float)value).floatValue();
                        float val2 = ((Float)table.getValueAt(row, column - 1)).floatValue();
                        if( val1 > val2) {
                            color = isSelected ? Color.red.brighter() : Color.red;
                    setForeground(color);
                    return this;
            });I get the runtime exceptions like the following:
    "Caught exception updating ExitableJFrame[frame0,0,0,618x430,invalid,layout=java.awt.BorderLayout,resizable,title=AccountActivityTable,defaultCloseOperation=,rootPane=javax.swing.JRootPane[,0,0,618x430,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=null,alignmentY=null,border=,flags=2,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true,EXIT_ON_CLOSE]:
    java.lang.NullPointerException
         at FloatRenderer.getTableCellRendererComponent(Compiled Code)
         at javax.swing.JTable.prepareRenderer(JTable.java:2897)
         at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:968)
         at javax.swing.plaf.basic.BasicTableUI.paintRow(BasicTableUI.java:899)
         at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:811)
         at javax.swing.plaf.ComponentUI.update(ComponentUI.java:43)
    Does anyone know how to fix this?

    If you look again at the error message, you'll see it's a NullPointerException. You are using a null reference. Nothing at all to do with comparing two float values. I'd guess that "table.getValueAt(row, column - 1)" is returning null, but it's hard to tell without a line number. You need to do some debugging in that code to see where you are using the null reference.

  • Table  in replication is in error state

    Hi All,
    When i checked in Data Provisioning in HANA studio ,replication for a table (TEXT_CTY_EXPOS) has gone in ERROR state .
    On finding the application logs from LTRC  i saw the following :
    Z_TEXT_CTY_EXPOS_007: Run 0000000001 aborted due to SYSTEM FAILURE at 20140703 200017
    Z_TEXT_CTY_EXPOS_007: User is locked. Please notify the person responsible
    Execution of program /1CADMC/OLC_000000000010740 failed, return code 3
    When i checked neither DMIS_RFC user nor the user in HANA are locked.The error is for a lot of tables.
    I found a dump in ST22 :
    Category               No Error
    Runtime Errors         SYSTEM_CANCELED
    Date and Time          30.06.2014 09:36:26
    Information on where terminated
         Termination occurred in the ABAP program "/1CADMC/SAPLDMC000000000006894" - in
          "/1CADMC/OLC_000000000006894".
         The main program was "DMC_CALL_OLC ".
         In the source code you have the termination point in line 419
         of the (Include) program "/1CADMC/LDMC000000000006894U02".
         The program "/1CADMC/SAPLDMC000000000006894" was started as a background job.
         Job Name....... "/1LT/IUC_LOAD_MT_007_002"
    Can you kindly assist here ?

    Welcome to Apple Discussions
    A Word document is normally translated to a Pages word processing document. I think that it is likely the table is floating. A floating table will "disappear" at the page boundary. Click the table once to select it & then change it to inline, either using the inline format bar button or the wrap inspector. Then the table will break a a row.
    However, if the table has any row that is bigger than can be fitted on one page, the remainder will disappear. The only option then is to manually split the row into smaller pieces.

  • Rotating tables in Pages 5 (iWork '13)

    I am using Pages 5.0.1 and I need to rotate a table. Apparently, you could rotate a table in Pages '09 by selecting "floating table". In Pages 5.0.1 Rotate is greyed out.

    Hi Peter,
    The top table in the screen shot of Pages 5.0.1 is the live table. The second table is a static image of the same table, which can be rotated. To produce an image of the table:
    Select the table and Command-C.
    Switch to Preview.app and Command-N, Command-C.
    Switch back to Pages and Command-V.
    At this point you have the real table and the image of the table. If you think you will need to edit the real table, duplicate your document for later use from this point. Delete the table and rotate the image.
    Jerry

  • Help with a Times Table Applet.

    Hey,
    I am a college student and I have been given the task of constructing a times table applet. Basically, I am stuck to the point of where I have no clue of what to do next. Even my college tutor is stuck as to what to do. I was wondering if you could give me any aid in helping me develop this applet fully, so that it is correct and functioning. Here it is:
    import java.io.*;
    import Input.*;
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    abstract class TimesTableApplet extends Applet implements ActionListener
         public void initialize();{}
         String message="";
         public void init()
         Button btnClick= new Button("Enter");
    add(btnClick);
              //String line = null;
              float table = 0, range = 0, attempts = 0;
              int count = 1, reply = 1, lines = 1;
    TextArea textone;
         while(reply==1)
                   String line = null;
                   table = 0;
                   range = 0;
                   ClrScr.ClrScr();
                   textone = new TextArea("",10,30+12*lines);
                   lines=1;
              while (( table < 1) || (table > 20) && attempts <3)
                   textone = new TextArea("Input table from 1-20:",10,10);
                   table = Input.readFloat();attempts++;
              attempts = 0;
                   while (( range < 1) || (range > 14) && attempts <3)
                        textone = new TextArea("Input range 1-14:,10,20");
                        range = Input.readFloat();attempts++;
              if (( table >= 1) && (table <= 20))
                   if (( range >= 1) && (range <= 14))
                   while (count<=range)
                        textone = new TextArea(count + "x" + table + "=" + count * table);
                        count++;
                        lines++;
                   count=1;
                   textone = new TextArea("Would you like another go? Type '1' for yes");
                   reply = Input.readInt();
         }//end while reply ==1
         }//end init
         public void paint(Graphics g)
         int count =1;
         while ( count <=80)
         System.out.println();
         count++;
    }

    Ok, why did you post this code? we will not be able to compile it because we are missing
    the Input package not did you mention wich jar to find this (nor did google).
    Syntax error in initialize
    Usage of the unknown object ClrScr (static method ClrScr)
    Usage of the unknown object Input (static method readFloat and readInt)
    If your tutor is stuck he or she should find a new job.
    import java.io.*;
    import Input.*;
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    abstract class TimesTableApplet extends Applet implements ActionListener {
         public void initialize(){
         String message = "";
         public void init() {
              Button btnClick = new Button("Enter");
              add(btnClick);
              //String line = null;
              float table = 0, range = 0, attempts = 0;
              int count = 1, reply = 1, lines = 1;
              TextArea textone;
              while (reply == 1) {
                   String line = null;
                   table = 0;
                   range = 0;
                   ClrScr.ClrScr();
                   textone = new TextArea("", 10, 30 + 12 * lines);
                   lines = 1;
                   while ((table < 1) || (table > 20) && attempts < 3)
                        textone = new TextArea("Input table from 1-20:", 10, 10);
                        table = Input.readFloat();
                        attempts++;
                   attempts = 0;
                   while ((range < 1) || (range > 14) && attempts < 3) {
                        textone = new TextArea("Input range 1-14:,10,20");
                        range = Input.readFloat();
                        attempts++;
                   if ((table >= 1) && (table <= 20))
                        if ((range >= 1) && (range <= 14)) {
                             while (count <= range) {
                                  textone = new TextArea(count + "x" + table + "="
                                            + count * table);
                                  count++;
                                  lines++;
                   count = 1;
                   textone = new TextArea(
                             "Would you like another go? Type '1' for yes");
                   reply = Input.readInt();
              }//end while reply ==1
         }//end init
         public void paint(Graphics g) {
              int count = 1;
              while (count <= 80) {
                   System.out.println();
                   count++;
    }

  • Awesome not reading rc.lua

    I'm trying to give awesome3.1 a go, but it isn't reading my rc.lua. It just keeps the default everything. Really all I've changed is the theme.
    -- Include awesome libraries, with lots of useful function!
    require("awful")
    require("beautiful")
    -- {{{ Variable definitions
    -- Themes define colours, icons, and wallpapers
    theme_path = "/home/shawn/.config/awesome/theme"
    -- Actually load theme
    beautiful.init(theme_path)
    -- This is used later as the default terminal and editor to run.
    terminal = "xterm"
    editor = os.getenv("EDITOR") or "vi"
    editor_cmd = terminal .. " -e " .. editor
    -- Default modkey.
    -- Usually, Mod4 is the key with a logo between Control and Alt.
    -- If you do not like this or do not have such a key,
    -- I suggest you to remap Mod4 to another key using xmodmap or other tools.
    -- However, you can use another modifier like Mod1, but it may interact with others.
    modkey = "Mod4"
    -- Table of layouts to cover with awful.layout.inc, order matters.
    layouts =
    "tile",
    "tileleft",
    "tilebottom",
    "tiletop",
    "fairh",
    "fairv",
    "magnifier",
    "max",
    "fullscreen",
    "spiral",
    "dwindle",
    "floating"
    -- Table of clients that should be set floating. The index may be either
    -- the application class or instance. The instance is useful when running
    -- a console app in a terminal like (Music on Console)
    -- xterm -name mocp -e mocp
    floatapps =
    -- by class
    ["MPlayer"] = true,
    ["pinentry"] = true,
    ["gimp"] = true,
    -- by instance
    ["mocp"] = true
    -- Applications to be moved to a pre-defined tag by class or instance.
    -- Use the screen and tags indices.
    apptags =
    -- ["Firefox"] = { screen = 1, tag = 2 },
    -- ["mocp"] = { screen = 2, tag = 4 },
    -- Define if we want to use titlebar on all applications.
    use_titlebar = false
    -- {{{ Tags
    -- Define tags table.
    tags = {}
    for s = 1, screen.count() do
    -- Each screen has its own tag table.
    tags[s] = {}
    -- Create 9 tags per screen.
    for tagnumber = 1, 3 do
    tags[s][tagnumber] = tag({ name = tag_settings[tagnumber].name, layout = tag_settings[tagnumber].layouts })
    -- Add tags to screen one by one
    tags[s][tagnumber].screen = s
    end
    -- I'm sure you want to see at least one tag.
    tags[s][1].selected = true
    end
    tag_settings = {
    { name="main", layout=layouts[1] },
    { name="work", layout=layouts[1] },
    { name="float", layout=layouts[12] }
    -- {{{ 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 },
    { "open terminal", terminal }
    mylauncher = awful.widget.launcher({ 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 = { button({ }, 1, awful.tag.viewonly),
    button({ modkey }, 1, awful.client.movetotag),
    button({ }, 3, function (tag) tag.selected = not tag.selected end),
    button({ modkey }, 3, awful.client.toggletag),
    button({ }, 4, awful.tag.viewnext),
    button({ }, 5, awful.tag.viewprev) }
    mytasklist = {}
    mytasklist.buttons = { button({ }, 1, function (c) client.focus = c; c:raise() end),
    button({ }, 3, function () awful.menu.clients({ width=250 }) end),
    button({ }, 4, function () awful.client.focus.byidx(1) end),
    button({ }, 5, function () awful.client.focus.byidx(-1) 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({ button({ }, 1, function () awful.layout.inc(layouts, 1) end),
    button({ }, 3, function () awful.layout.inc(layouts, -1) end),
    button({ }, 4, function () awful.layout.inc(layouts, 1) end),
    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)
    -- 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],
    mypromptbox[s],
    mytextbox,
    mylayoutbox[s],
    s == 1 and mysystray or nil }
    mywibox[s].screen = s
    end
    -- {{{ Mouse bindings
    awesome.buttons({
    button({ }, 3, function () mymainmenu:toggle() end),
    button({ }, 4, awful.tag.viewnext),
    button({ }, 5, awful.tag.viewprev)
    -- {{{ Key bindings
    -- Bind keyboard digits
    -- 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
    keybinding({ modkey }, i,
    function ()
    local screen = mouse.screen
    if tags[screen][i] then
    awful.tag.viewonly(tags[screen][i])
    end
    end):add()
    keybinding({ modkey, "Control" }, i,
    function ()
    local screen = mouse.screen
    if tags[screen][i] then
    tags[screen][i].selected = not tags[screen][i].selected
    end
    end):add()
    keybinding({ modkey, "Shift" }, i,
    function ()
    if client.focus then
    if tags[client.focus.screen][i] then
    awful.client.movetotag(tags[client.focus.screen][i])
    end
    end
    end):add()
    keybinding({ modkey, "Control", "Shift" }, i,
    function ()
    if client.focus then
    if tags[client.focus.screen][i] then
    awful.client.toggletag(tags[client.focus.screen][i])
    end
    end
    end):add()
    end
    keybinding({ modkey }, "Left", awful.tag.viewprev):add()
    keybinding({ modkey }, "Right", awful.tag.viewnext):add()
    keybinding({ modkey }, "Escape", awful.tag.history.restore):add()
    -- Standard program
    keybinding({ modkey }, "Return", function () awful.util.spawn(terminal) end):add()
    keybinding({ modkey, "Control" }, "r", function ()
    mypromptbox[mouse.screen].text =
    awful.util.escape(awful.util.restart())
    end):add()
    keybinding({ modkey, "Shift" }, "q", awesome.quit):add()
    -- Client manipulation
    keybinding({ modkey }, "m", awful.client.maximize):add()
    keybinding({ modkey }, "f", function () if client.focus then client.focus.fullscreen = not client.focus.fullscreen end end):add()
    keybinding({ modkey, "Shift" }, "c", function () if client.focus then client.focus:kill() end end):add()
    keybinding({ modkey }, "j", function () awful.client.focus.byidx(1); if client.focus then client.focus:raise() end end):add()
    keybinding({ modkey }, "k", function () awful.client.focus.byidx(-1); if client.focus then client.focus:raise() end end):add()
    keybinding({ modkey, "Shift" }, "j", function () awful.client.swap.byidx(1) end):add()
    keybinding({ modkey, "Shift" }, "k", function () awful.client.swap.byidx(-1) end):add()
    keybinding({ modkey, "Control" }, "j", function () awful.screen.focus(1) end):add()
    keybinding({ modkey, "Control" }, "k", function () awful.screen.focus(-1) end):add()
    keybinding({ modkey, "Control" }, "space", awful.client.togglefloating):add()
    keybinding({ modkey, "Control" }, "Return", function () if client.focus then client.focus:swap(awful.client.getmaster()) end end):add()
    keybinding({ modkey }, "o", awful.client.movetoscreen):add()
    keybinding({ modkey }, "Tab", awful.client.focus.history.previous):add()
    keybinding({ modkey }, "u", awful.client.urgent.jumpto):add()
    keybinding({ modkey, "Shift" }, "r", function () if client.focus then client.focus:redraw() end end):add()
    -- Layout manipulation
    keybinding({ modkey }, "l", function () awful.tag.incmwfact(0.05) end):add()
    keybinding({ modkey }, "h", function () awful.tag.incmwfact(-0.05) end):add()
    keybinding({ modkey, "Shift" }, "h", function () awful.tag.incnmaster(1) end):add()
    keybinding({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end):add()
    keybinding({ modkey, "Control" }, "h", function () awful.tag.incncol(1) end):add()
    keybinding({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end):add()
    keybinding({ modkey }, "space", function () awful.layout.inc(layouts, 1) end):add()
    keybinding({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end):add()
    -- Prompt
    keybinding({ modkey }, "F1", function ()
    awful.prompt.run({ prompt = "Run: " }, mypromptbox[mouse.screen], awful.util.spawn, awful.completion.bash,
    awful.util.getdir("cache") .. "/history")
    end):add()
    keybinding({ modkey }, "F4", function ()
    awful.prompt.run({ prompt = "Run Lua code: " }, mypromptbox[mouse.screen], awful.util.eval, awful.prompt.bash,
    awful.util.getdir("cache") .. "/history_eval")
    end):add()
    keybinding({ modkey, "Ctrl" }, "i", function ()
    local s = mouse.screen
    if mypromptbox[s].text then
    mypromptbox[s].text = nil
    elseif client.focus then
    mypromptbox[s].text = nil
    if client.focus.class then
    mypromptbox[s].text = "Class: " .. client.focus.class .. " "
    end
    if client.focus.instance then
    mypromptbox[s].text = mypromptbox[s].text .. "Instance: ".. client.focus.instance .. " "
    end
    if client.focus.role then
    mypromptbox[s].text = mypromptbox[s].text .. "Role: ".. client.focus.role
    end
    end
    end):add()
    -- Client awful tagging: this is useful to tag some clients and then do stuff like move to tag on them
    keybinding({ modkey }, "t", awful.client.togglemarked):add()
    for i = 1, keynumber do
    keybinding({ 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):add()
    end
    -- {{{ 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 the mouse enters a client.
    awful.hooks.mouse_enter.register(function (c)
    -- Sloppy focus, but disabled for magnifier layout
    if awful.layout.get(c.screen) ~= "magnifier"
    and awful.client.focus.filter(c) then
    client.focus = c
    end
    end)
    -- Hook function to execute when a new client appears.
    awful.hooks.manage.register(function (c)
    if use_titlebar then
    -- Add a titlebar
    awful.titlebar.add(c, { modkey = modkey })
    end
    -- Add mouse bindings
    c:buttons({
    button({ }, 1, function (c) client.focus = c; c:raise() end),
    button({ modkey }, 1, function (c) c:mouse_move() end),
    button({ modkey }, 3, function (c) c:mouse_resize() end)
    -- 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
    c.floating = floatapps[cls]
    elseif floatapps[inst] then
    c.floating = 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 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.honorsizehints = false
    end)
    -- Hook function to execute when arranging the screen.
    -- (tag switch, new client, etc)
    awful.hooks.arrange.register(function (screen)
    local layout = awful.layout.get(screen)
    if 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
    -- Uncomment if you want mouse warping
    if client.focus then
    local c_c = client.focus:fullgeometry()
    local m_c = mouse.coords()
    if m_c.x < c_c.x or m_c.x >= c_c.x + c_c.width or
    m_c.y < c_c.y or m_c.y >= c_c.y + c_c.height then
    if table.maxn(m_c.buttons) == 0 then
    mouse.coords({ x = c_c.x + 5, y = c_c.y + 5})
    end
    end
    end
    end)
    -- Hook called every second
    awful.hooks.timer.register(1, function ()
    -- For unix time_t lovers
    mytextbox.text = " " .. os.time() .. " time_t "
    -- Otherwise use:
    -- mytextbox.text = " " .. os.date() .. " "
    end)
    Then if I try this one, I just get a black screen, I have all the required things:
    -- Version 2
    -- This config is for use with awesome 3.0 stable.
    -- If you have any suggestions or questions, feel free
    -- to pass me a message, find me in #awesome on OFTC, or
    -- email me at <lucas[at]glacicle.com>
    -- I use both wicked and eminent, so to use it,
    -- you'll need to get both those helper libraries too.
    -- Note that I use all-custom keybindings, so you might
    -- want to copy the default rc.lua's keybindings
    -- into here if you wish to use those, although you might
    -- find you like mine better :P
    ---- {{{ Require lua libraries
    -- Shipped with awesome
    require("awful")
    require("beautiful")
    -- External
    require("wicked") -- Widgets
    require("eminent") -- Dynamic tagging
    ---- {{{ 'Beautiful' theme settings
    -- Font
    beautiful.font = "Dina 8"
    -- Background
    beautiful.bg_normal = '#414141'
    beautiful.bg_focus = '#414141'
    beautiful.bg_sbfocus = '#414141'
    beautiful.bg_urgent = '#414141'
    -- Foreground
    beautiful.fg_normal = '#999999'
    beautiful.fg_focus = '#335565'
    beautiful.fg_urgent = '#A000000'
    -- Border
    beautiful.border_width = 2
    beautiful.border_normal = '#414141'
    beautiful.border_focus = '#335565'
    beautiful.border_marked = '#91231c'
    -- Wallpaper
    -- wallpaper_cmd = awsetbg /storage/images/backgrounds/nature/looking.jpg
    ---- {{{ Modkeys
    key = {}
    key.none = {}
    key.alt = {"Mod1"}
    key.super = {"Mod4"}
    key.shift = {"Shift"}
    key.control = {"Control"}
    key.super_alt = {key.super[1], key.alt[1]}
    key.super_shift = {key.super[1], key.shift[1]}
    key.super_control = {key.super[1], key.control[1]}
    key.control_alt = {key.control[1], key.alt[1]}
    key.shift_alt = {key.shift[1], key.alt[1]}
    ---- {{{ Settings
    -- Initialise tables
    settings = {}
    settings.widget = {}
    settings.apps = {}
    settings.tag = {}
    settings.bindings = {}
    -- {{{ General
    -- Widget spacer and separator
    settings.widget_spacer = " "
    settings.widget_separator = " "
    -- Warp mouse
    settings.warp_mouse = true
    -- New become master
    settings.new_become_master = false
    -- Tag mwfact
    settings.tag.mwfact = 0.618033988769
    -- {{{ Applications
    -- Terminal application
    settings.apps.terminal = 'urxvt'
    -- Command to lock the screen
    settings.apps.lock_screen = 'xscreensaver-command -lock'
    -- Command to turn screen off with DPMS
    settings.apps.screen_off = 'sleep 1; xset dpms force off'
    -- File manager application
    settings.apps.filemanager = settings.apps.terminal..' -e zsh -c "vifm %s"'
    -- {{{ Floating windows
    settings.floating = {
    ["gimp"] = true,
    ["urxvtcnotify"] = true,
    ["MPlayer"] = true,
    -- {{{ Other
    -- Check what widget mode to use
    settings.widget_mode = 'desktop'
    -- Highlight statusbar of focussed screen on multiple-monitor setups
    if screen.count() > 1 then
    settings.statusbar_highlight_focus = {true, 1}
    end
    ---- {{{ Keybindings
    -- Initialise table
    settings.bindings.wm = {}
    settings.bindings.mouse = {}
    -- {{{ Open the filemanager at specific locations
    settings.bindings.filemanager = {
    -- Alt+d: Data partition
    ["/storage"] = {key.alt, "#40"},
    -- Alt+a: Home Directory
    [os.getenv("HOME")] = {key.alt, "#38"},
    -- {{{ Run specific commands
    settings.bindings.commands = {
    -- Alt+q: Open Terminal
    [settings.apps.terminal] = {key.alt, "#24"},
    -- Mod+k: GNU Screen
    -- [settings.apps.gnu_screen] = {key.super, "#45"},
    -- Mod+l: Lock screen
    [settings.apps.lock_screen] = {key.super, "#46"},
    -- Mod+o: Screen off with DPMS
    [settings.apps.screen_off] = {key.super, "#32"},
    -- {{{ Tag bindings
    settings.bindings.wm.tag = {
    -- Mod+a: Switch to previous tag
    [function() eminent.tag.prev(mouse.screen) end] = {key.super, "#38"},
    -- Mod+s: Switch to next tag
    [function() eminent.tag.next(mouse.screen) end] = {key.super, "#39"},
    -- Alt+\: Switch to float layout
    [function() awful.layout.set('floating') end] = {key.alt, "#51"},
    -- Alt+z: Switch to max layout
    [function() awful.layout.set('max') end] = {key.alt, "#52"},
    -- Alt+x: Switch to tile layout
    [function() awful.layout.set('tile') end] = {key.alt, "#53"},
    -- {{{ Prompt bindings
    settings.bindings.prompt = {
    -- Alt+w: Run prompt
    [{awful.spawn, " Run: "}] = {key.alt, "#25"},
    -- Mod+Alt+w: Lua eval prompt
    [{awful.eval, " Run Lua: "}] = {key.super_alt, "#25"},
    -- {{{ Miscellaneous bindings
    settings.bindings.wm.misc = {
    -- Mod+Alt+r: Restart awesome
    [awesome.restart] = {key.super_alt, "#27"},
    -- Mod+e: Switch focus to next screen
    [function() awful.screen.focus(1) end] = {key.super, "#26"},
    -- Mod+d: Switch focus to previous screen
    [function() awful.screen.focus(-1) end] = {key.super, "#40"},
    -- {{{ Keyboard digit bindings
    settings.bindings.digits = {
    -- Mod+##: View tag
    [awful.tag.viewonly] = key.super,
    -- Mod+Shift+##: Toggle tag view
    [function(t) t.selected = not t.selected end] = key.super_shift,
    -- Mod+Control+##: Move window to tag
    [awful.client.movetotag] = key.super_control,
    -- Mod+Alt+##: Toggle window on tag
    [awful.client.toggletag] = key.super_alt,
    -- {{{ Mouse bindings
    settings.bindings.mouse.desktop = {
    -- Right click on desktop: Open terminal
    [function() awful.spawn(settings.apps.terminal) end] = {key.none, 3},
    settings.bindings.mouse.client = {
    -- Alt+Left: Move window
    [function(c) c:mouse_move() end] = {key.alt, 1},
    -- Alt+Right: Resize window
    [function(c) c:mouse_resize({corner="bottomright"}) end] = {key.alt, 3},
    ---- {{{ Markup helper functions
    -- Inline markup is a tad ugly, so use these functions
    -- to dynamically create markup, we hook them into
    -- the beautiful namespace for clarity.
    beautiful.markup = {}
    function beautiful.markup.bg(color, text)
    return '<bg color="'..color..'" />'..text
    end
    function beautiful.markup.fg(color, text)
    return '<span color="'..color..'">'..text..'</span>'
    end
    function beautiful.markup.font(font, text)
    return '<span font_desc="'..font..'">'..text..'</span>'
    end
    function beautiful.markup.title(t)
    return t
    end
    function beautiful.markup.title_normal(t)
    return beautiful.title(t)
    end
    function beautiful.markup.title_focus(t)
    return beautiful.markup.bg(beautiful.bg_focus, beautiful.markup.fg(beautiful.fg_focus, beautiful.markup.title(t)))
    end
    function beautiful.markup.title_urgent(t)
    return beautiful.markup.bg(beautiful.bg_urgent, beautiful.markup.fg(beautiful.fg_urgent, beautiful.markup.title(t)))
    end
    function beautiful.markup.bold(text)
    return '<b>'..text..'</b>'
    end
    function beautiful.markup.heading(text)
    return beautiful.markup.fg(beautiful.fg_focus, beautiful.markup.bold(text))
    end
    ---- {{{ Widgets
    settings.statusbars = {}
    settings.widgets = {}
    settings.statusbars[1] = {{
    position = "top",
    height = 18,
    fg = beautiful.fg_normal,
    bg = beautiful.bg_normal,
    name = "mainstatusbar",
    }, "all"}
    settings.promptbar = {
    position = "top",
    height = 18,
    fg = beautiful.fg_normal,
    bg = beautiful.bg_normal,
    name = "promptbar",
    -- {{{ Taglist
    maintaglist = widget({
    type = 'taglist',
    name = 'maintaglist'
    function maintaglist.label(t)
    return awful.widget.taglist.label.noempty(t)
    end
    maintaglist:mouse_add(mouse(key.none, 1, function (o, t) awful.tag.viewonly(t) end))
    table.insert(settings.widgets, {1, maintaglist})
    if settings.widget_mode ~= 'none' then
    -- {{{ MPD Widget
    mpdwidget = widget({
    type = 'textbox',
    name = 'mpdwidget',
    align = 'right'
    wicked.register(mpdwidget, wicked.widgets.mpd, function (widget, args)
    -- I don't want the stream name on my statusbar, so I gsub it out,
    -- feel free to remove this bit
    return settings.widget_spacer..beautiful.markup.heading('MPD')..': '
    ..args[1]:gsub('AnimeNfo Radio | Serving you the best Anime music!: ','')
    ..settings.widget_spacer..settings.widget_separator end)
    table.insert(settings.widgets, {1, mpdwidget})
    -- {{{ GMail Widget
    gmailwidget = widget({
    type = 'textbox',
    name = 'gmailwidget',
    align = 'right'
    gmailwidget:mouse_add(mouse(key.none, 1, function () wicked.update(gmailwidget) end))
    function read_gmail_temp(format)
    local f = io.open('/tmp/gmail-temp')
    if f == nil then
    return {'n/a'}
    end
    local n = f:read()
    if n == nil or f == ' ' or f == '' then
    f:close()
    return {'n/a'}
    end
    return {n}
    end
    wicked.register(gmailwidget, read_gmail_temp, function (widget, args)
    local n = args[1]
    local out = settings.widget_spacer..beautiful.markup.heading('GMail')..': '
    if n ~= "n/a" and tonumber(n) > 0 then
    out = out..beautiful.markup.bg(beautiful.bg_urgent, beautiful.markup.fg(beautiful.fg_urgent, tostring(n)))
    else
    out = out..tostring(n)
    end
    out = out..settings.widget_spacer..settings.widget_separator
    return out
    end, 120)
    -- Start timer to fill the temp file
    awful.hooks.timer.register(110, function ()
    -- Call GMail check script to check for new email
    os.execute(os.getenv("HOME")..'/other/.gmail.py > /tmp/gmail-temp &')
    end, true)
    wicked.update(gmailwidget)
    table.insert(settings.widgets, {1, gmailwidget})
    -- {{{ Load Averages Widget
    loadwidget = widget({
    type = 'textbox',
    name = 'loadwidget',
    align = 'right'
    function widget_loadavg(format)
    -- Use /proc/loadavg to get the average system load on 1, 5 and 15 minute intervals
    local f = io.open('/proc/loadavg')
    local n = f:read()
    f:close()
    -- Find the third space
    local pos = n:find(' ', n:find(' ', n:find(' ')+1)+1)
    return {n:sub(1,pos-1)}
    end
    wicked.register(loadwidget, widget_loadavg,
    settings.widget_spacer..beautiful.markup.heading('Load')..': $1'..settings.widget_spacer..settings.widget_separator, 2)
    table.insert(settings.widgets, {1, loadwidget})
    -- {{{ CPU Usage Widget
    cputextwidget = widget({
    type = 'textbox',
    name = 'cputextwidget',
    align = 'right'
    wicked.register(cputextwidget, wicked.widgets.cpu,
    settings.widget_spacer..beautiful.markup.heading('CPU')..': $1%'..settings.widget_spacer..settings.widget_separator,
    nil, nil, 2)
    table.insert(settings.widgets, {1, cputextwidget})
    -- {{{ CPU Graph Widget
    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 = '#285577',
    vertical_gradient = false
    wicked.register(cpugraphwidget, wicked.widgets.cpu, '$1', 1, 'cpu')
    table.insert(settings.widgets, {1, cpugraphwidget})
    -- {{{ Memory Usage Widget
    memtextwidget = widget({
    type = 'textbox',
    name = 'memtextwidget',
    align = 'right'
    wicked.register(memtextwidget, wicked.widgets.mem,
    settings.widget_spacer..beautiful.markup.heading('MEM')..': '..
    '$1% ($2/$3)'..settings.widget_spacer..settings.widget_separator,
    3, nil, {2, 4, 4})
    table.insert(settings.widgets, {1, memtextwidget})
    -- {{{ Memory Graph Widget
    memgraphwidget = widget({
    type = 'graph',
    name = 'memgraphwidget',
    align = 'right'
    memgraphwidget.height = 0.85
    memgraphwidget.width = 45
    memgraphwidget.bg = '#333333'
    memgraphwidget.border_color = '#0a0a0a'
    memgraphwidget.grow = 'left'
    memgraphwidget:plot_properties_set('mem', {
    fg = '#AEC6D8',
    fg_center = '#285577',
    fg_end = '#285577',
    vertical_gradient = false
    wicked.register(memgraphwidget, wicked.widgets.mem, '$1', 1, 'mem')
    table.insert(settings.widgets, {1, memgraphwidget})
    -- {{{ Other Widget
    settings.widget_spacerwidget = widget({ type = 'textbox', name = 'settings.widget_spacerwidget', align = 'right' })
    settings.widget_spacerwidget.text = settings.widget_spacer..settings.widget_separator
    table.insert(settings.widgets, {1, settings.widget_spacerwidget})
    end
    -- You shouldn't have to edit the code after this,
    -- it takes care of applying the settings above.
    ---- {{{ Initialisations
    -- Register beautiful with awful
    awful.beautiful.register(beautiful)
    -- Set default colors
    awesome.colors_set({
    fg = beautiful.fg_normal,
    bg = beautiful.bg_normal })
    -- Set default font
    awesome.font_set(beautiful.font)
    -- Table of layouts to cover with awful.layout.inc, order matters.
    layouts =
    "tile",
    "tileleft",
    "tilebottom",
    "tiletop",
    "fairh",
    "fairv",
    "magnifier",
    "max",
    "fullscreen",
    "spiral",
    "dwindle",
    "floating"
    -- Define tag tables
    tag_settings = {
    { name="main", layout=layouts[1] },
    { name="work", layout=layouts[1] },
    { name="float", layout=layouts[12] }
    -- Initialize tags in awesome 3.1
    tags = {}
    for s = 1, screen.count() do
    tags[s] = {}
    for tagnumber = 1, 3 do
    tags[s][tagnumber] = tag({ name = tag_settings[tagnumber].name, layout = tag_settings[tagnumber].layout })
    tags[s][tagnumber].screen = s
    awful.layout.set(layouts[1], tags[s][tagnumber])
    end
    tags[s][1].selected = true
    end
    ---- {{{ Create statusbars
    local mainstatusbar = {}
    for i, b in pairs(settings.statusbars) do
    mainstatusbar[i] = {}
    for s=1,screen.count() do
    this_screen = false
    if b[2] ~= "all" then
    for sc in pairs(b[2]) do
    if sc == s then
    this_screen = true
    break
    end
    end
    end
    if b[2] == "all" or this_screen then
    mainstatusbar[i][s] = statusbar(b[1])
    local widgets = {}
    for ii, w in pairs(settings.widgets) do
    if w[1] == i then
    table.insert(widgets, w[2])
    end
    end
    mainstatusbar[i][s]:widgets(widgets)
    mainstatusbar[i][s].screen = s
    end
    end
    end
    ---- {{{ Create prompt statusbar
    local mainpromptbar = statusbar(settings.promptbar)
    local mainpromptbox = widget({type = "textbox", align = "left", name = "mainpromptbox"})
    mainpromptbar:widgets({mainpromptbox})
    mainpromptbar.screen = nil
    ---- {{{ Useful functions
    -- {{{ Mouse warp function
    function mouse_warp(c, force)
    -- Allow skipping a warp
    if warp_skip then
    warp_skip = false
    return
    end
    -- Get vars
    local sel = c or client.focus
    if sel == nil then return end
    local coords = sel:coords()
    local m = mouse.coords()
    -- Settings
    mouse_padd = 6
    border_area = 5
    -- Check if mouse is not already inside the window
    if (( m.x < coords.x-border_area or
    m.y < coords.y-border_area or
    m.x > coords.x+coords.width+border_area or
    m.y > coords.y+coords.height+border_area
    ) and (
    table.maxn(m.buttons) == 0
    )) or force
    then
    mouse.coords({ x=coords.x+mouse_padd, y=coords.y+mouse_padd})
    end
    end
    -- {{{ Prompt with statusbar
    function prompt_statusbar(s, callback, prompt)
    if not callback then callback = awful.spawn end
    if not prompt then prompt = " Run: " end
    for i, b in pairs(mainstatusbar) do
    for ii, bb in pairs(b) do
    if bb.screen == s then
    bb.screen = nil
    end
    end
    end
    mainpromptbar.screen = s
    awful.prompt.run({prompt = prompt}, mainpromptbox, callback,
    awful.completion.bash, os.getenv("HOME") .. "/.cache/awesome_history", 50, function ()
    mainpromptbar.screen = nil
    for i, b in pairs(mainstatusbar) do
    for ii, bb in pairs(b) do
    if ii == s then
    bb.screen = ii
    end
    end
    end
    end)
    end
    ---- {{{ Create bindings
    --- This reads the binding tables and turns them into actual keybindings
    -- Always qwerty
    -- WM Bindings
    for i,table in pairs(settings.bindings.wm) do
    for f, keys in pairs(table) do
    keybinding(keys[1], keys[2], f):add()
    end
    end
    -- Keyboard digit bindings
    for i=1,9 do
    for f, mod in pairs(settings.bindings.digits) do
    keybinding(mod, i, function()
    t = eminent.tag.getn(i, nil, true)
    if not t then return end
    f(t)
    end):add()
    end
    end
    -- Prompt Bindings
    for prompt, keys in pairs(settings.bindings.prompt) do
    keybinding(keys[1], keys[2], function() prompt_statusbar(mouse.screen, unpack(prompt)) end):add()
    end
    -- Filemanager bindings
    for loc, keys in pairs(settings.bindings.filemanager) do
    keybinding(keys[1], keys[2], function() awful.spawn(string.format(settings.apps.filemanager, loc)) end):add()
    end
    -- Custom command bindings
    for command, keys in pairs(settings.bindings.commands) do
    keybinding(keys[1], keys[2], function() awful.spawn(command) end):add()
    end
    -- Desktop mouse bindings
    for f, keys in pairs(settings.bindings.mouse.desktop) do
    awesome.mouse_add(mouse(keys[1], keys[2], f))
    end
    ---- {{{ Set hooks
    -- {{{ Focus hook
    awful.hooks.focus.register(function (c)
    -- Skip over my urxvtcnotify
    if c.name and c.name:lower():find('urxvtcnotify') and awful.client.next(1) ~= c then
    awful.client.focusbyidx(1)
    return
    end
    -- Set border
    c.border_color = beautiful.border_focus
    -- Raise the client
    c:raise()
    -- Set statusbar color
    if settings.statusbar_highlight_focus and settings.statusbar_highlight_focus[1] then
    if last_screen == nil or last_screen ~= c.screen then
    mainstatusbar[settings.statusbar_highlight_focus[2]][c.screen].bg = beautiful.bg_sbfocus
    if last_screen then
    mainstatusbar[settings.statusbar_highlight_focus[2]][last_screen].bg = beautiful.bg_normal
    end
    end
    last_screen = c.screen
    end
    end)
    -- {{{ Unfocus hook
    awful.hooks.unfocus.register(function (c)
    -- Set border
    c.border_color = beautiful.border_normal
    end)
    -- {{{ Mouseover hook
    awful.hooks.mouseover.register(function (c)
    -- Set focus for sloppy focus
    client.focus = c
    end)
    -- {{{ Manage hook
    awful.hooks.manage.register(function (c)
    local class = ""
    local name = ""
    if c.class then
    class = c.class:lower()
    end
    if c.name then
    name = c.name:lower()
    end
    -- Create border
    c.border_width = beautiful.border_width
    c.border_color = beautiful.border_normal
    -- Add mouse bindings
    for f, keys in pairs(settings.bindings.mouse.client) do
    c:mouse_add(mouse(keys[1], keys[2], f))
    end
    -- Check if floating
    for app, i in pairs(settings.floating) do
    if class:find(app) or name:find(app) then
    c.floating = i
    break
    end
    end
    if name:find('urxvtcnotify') then
    -- I got sick of libnotify/notification-daemon
    -- and their dependencies, so I'm using a little
    -- urxvtc window with some text in it as notifications :P
    -- This makes it appear at the correct place,
    -- feel free to remove the whole section, you probably
    -- won't need it.
    c.screen = 3
    c:coords({
    x = 1680*2+1400,
    y = 18,
    width = 276,
    height = 106
    c.border_color = beautiful.border_normal
    local tags = {}
    for i,t in pairs(eminent.tags[3]) do
    if eminent.tag.isoccupied(3, t) then
    table.insert(tags, t)
    end
    end
    c:tags(tags)
    return 0
    end
    -- Focus new clients
    client.focus = c
    -- Prevent new windows from becoming master
    if not settings.new_become_master then
    awful.client.swap(1, c)
    end
    -- Don't honor size hints
    c.honorsizehints = false
    end)
    -- {{{ Arrange hook
    awful.hooks.arrange.register(function(s)
    -- Warp the mouse
    if settings.warp_mouse then
    mouse_warp()
    end
    -- Check focus
    if not client.focus then
    local c = awful.client.focus.history.get(s, 0)
    if c then client.focus = c end
    end
    end)
    -- vim: set filetype=lua fdm=marker tabstop=4 shiftwidth=4 expandtab smarttab autoindent smartindent nu:

    The most likely reason for you seeing the default settings, or nothing is that there is some error in the configuration file. You would have to take a look at the error output of xorg. Since I start X using startx I can look at it on the first sterminal (ALT - CTRL - F1). I don't know where the output would go if you use GDM or something similar.
    If there are errors you could post them here and people might be able to help.
    If the comment of the second config file is correct then the config most likely wont work with awesome 3.1 since the sytax of the config file changed between 3.0 and 3.1
    Another possibility to get a working config would be to copy the default awesome config into your ~/.config/awesome folder and then gradually make changes to it, exchanging content for stuff from other configs, that way you'd know which change brakes something.

  • Awesome3 dialog boxes and pop-ups appearing partly offscreen

    Dialog boxes like when opening a specific file in evince (with C-o or file->open) are appearing floating (as they should) but with almost half of the box offscreen. Its irritating to have to move my hand to my mouse every time and move the window into full view as otherwise I use the keyboard exclusively, so I'm wondering if anyone knows how to set a default location on screen for pop-up dialog boxes like this.
    Thanks for any help provided.
    here is my rc.lua:
    -- awesome 3 configuration file
    -- Include awesome library, with lots of useful function!
    require("awful")
    require("tabulous")
    require("beautiful")
    --extra non-default library
    require("wicked")
    -- {{{ Variable definitions
    -- This is a file path to a theme file which will defines colors.
    theme_path = "/home/ojcp/.config/awesome/themes/default"
    -- This is used later as the default terminal to run.
    terminal = "terminal"
    editor = "emacs"
    browserName = "Gran Paradiso"
    browser = "firefox"
    pdfview = "evince"
    office = "abiword"
    spreadsheet = "Gnumeric"
    -- Default modkey.
    -- Usually, Mod4 is the key with a logo between Control and Alt.
    -- If you do not like this or do not have such a key,
    -- I suggest you to remap Mod4 to another key using xmodmap or other tools.
    -- However, you can use another modifier like Mod1, but it may interact with others.
    modkey = "Mod4"
    -- Table of layouts to cover with awful.layout.inc, order matters.
    layouts =
    "tile",
    "tileleft",
    "tilebottom",
    "tiletop",
    "fairh",
    "fairv",
    "magnifier",
    "max",
    "spiral",
    "dwindle",
    "floating"
    -- Table of clients that should be set floating. The index may be either
    -- the application class or instance. The instance is useful when running
    -- a console app in a terminal like (Music on Console)
    -- xterm -name mocp -e mocp
    floatapps =
    -- by class
    ["MPlayer"] = true,
    ["pinentry"] = true,
    ["gimp"] = true,
    -- by instance
    ["mocp"] = true
    -- Applications to be moved to a pre-defined tag by class or instance.
    -- Use the screen and tags indices.
    apptags =
    [browserName] = {screen = 1, tag = 2},
    [editor] = {screen = 1, tag = 4},
    [office] = {screen = 1, tag = 3},
    [pdfview] = {screen = 1, tag = 3},
    [spreadsheet] = {screen = 1, tag = 3}
    -- Define if we want to use titlebar on all applications.
    use_titlebar = false
    -- {{{ Initialization
    -- Initialize theme (colors).
    beautiful.init(theme_path)
    -- Register theme in awful.
    -- This allows to not pass plenty of arguments to each function
    -- to inform it about colors we want it to draw.
    awful.beautiful.register(beautiful)
    -- Uncomment this to activate autotabbing
    -- tabulous.autotab_start()
    -- {{{ Tags
    -- Define tags table.
    tags = {}
    for s = 1, screen.count() do
    -- Each screen has its own tag table.
    tags[s] = {}
    tagnames = {"chmu","net","doc","emacs", "misc", "float"}
    -- Create 9 tags per screen.
    for tagnumber = 1, 6 do
    if tagnumber < 6 then
    tags[s][tagnumber] = tag({ name = tagnames[tagnumber], layout = layouts[1] })
    else
    tags[s][tagnumber] = tag({ name = tagnames[tagnumber], layout = layouts[11] })
    end
    -- Add tags to screen one by one
    tags[s][tagnumber].screen = s
    end
    -- I'm sure you want to see at least one tag.
    tags[s][1].selected = true
    end
    -- {{{ Statusbar
    -- Create a taglist widget
    mytaglist = widget({ type = "taglist", name = "mytaglist" })
    mytaglist:mouse_add(mouse({}, 1, function (object, tag) awful.tag.viewonly(tag) end))
    mytaglist:mouse_add(mouse({ modkey }, 1, function (object, tag) awful.client.movetotag(tag) end))
    mytaglist:mouse_add(mouse({}, 3, function (object, tag) tag.selected = not tag.selected end))
    mytaglist:mouse_add(mouse({ modkey }, 3, function (object, tag) awful.client.toggletag(tag) end))
    mytaglist:mouse_add(mouse({ }, 4, awful.tag.viewnext))
    mytaglist:mouse_add(mouse({ }, 5, awful.tag.viewprev))
    mytaglist.label = awful.widget.taglist.label.all
    -- Create a tasklist widget
    mytasklist = widget({ type = "tasklist", name = "mytasklist" })
    mytasklist:mouse_add(mouse({ }, 1, function (object, c) client.focus = c; c:raise() end))
    mytasklist:mouse_add(mouse({ }, 4, function () awful.client.focusbyidx(1) end))
    mytasklist:mouse_add(mouse({ }, 5, function () awful.client.focusbyidx(-1) end))
    mytasklist.label = awful.widget.tasklist.label.currenttags
    -- Create a textbox widget
    mytextbox = widget({ type = "textbox", name = "mytextbox", align = "right" })
    -- Set the default text in textbox
    mytextbox.text = "<b><small> awesome " .. AWESOME_VERSION .. " </small></b>"
    mypromptbox = widget({ type = "textbox", name = "mypromptbox", align = "left" })
    -- Create an iconbox widget
    myiconbox = widget({ type = "textbox", name = "myiconbox", align = "left" })
    myiconbox.text = "<bg image=\"/usr/share/awesome/icons/awesome16.png\" resize=\"true\"/>"
    -- Create a systray
    mysystray = widget({ type = "systray", name = "mysystray", align = "right" })
    -- Create an iconbox widget which will contains an icon indicating which layout we're using.
    -- We need one layoutbox per screen.
    mylayoutbox = {}
    for s = 1, screen.count() do
    mylayoutbox[s] = widget({ type = "textbox", name = "mylayoutbox", align = "right" })
    mylayoutbox[s]:mouse_add(mouse({ }, 1, function () awful.layout.inc(layouts, 1) end))
    mylayoutbox[s]:mouse_add(mouse({ }, 3, function () awful.layout.inc(layouts, -1) end))
    mylayoutbox[s]:mouse_add(mouse({ }, 4, function () awful.layout.inc(layouts, 1) end))
    mylayoutbox[s]:mouse_add(mouse({ }, 5, function () awful.layout.inc(layouts, -1) end))
    mylayoutbox[s].text = "<bg image=\"/usr/share/awesome/icons/layouts/tilew.png\" resize=\"true\"/>"
    end
    -- Create battery widget
    batterytext = widget({type = "textbox", name = "batterytext", align = "right"})
    batterytext.text = " bat: "
    mybatterymonitor = widget({type = "progressbar", name = "batterywidget", align = "right" })
    mybatterymonitor.width = 50
    mybatterymonitor.height = 0.6
    mybatterymonitor.border_padding = 1
    mybatterymonitor.border_width = 1
    mybatterymonitor.ticks_count = 20
    mybatterymonitor.ticks_gap = 1
    mybatterymonitor.vertical = false
    mybatterymonitor:bar_properties_set('bat', {
    bg = 'black',
    fg = 'blue4',
    fg_off = 'black',
    reverse = false,
    min_value = 0,
    max_value = 100
    -- Create membar
    membartext = widget({ type = "textbox", name = "membartext", align = "right" })
    membartext.text = " mem: "
    membarwidget = widget({
    type = 'progressbar',
    name = 'membarwidget',
    align = 'right'
    membarwidget.width = 50
    membarwidget.height = 0.6
    membarwidget.border_padding = 1
    membarwidget.gap = 5
    membarwidget.ticks_count = 20
    membarwidget.ticks_gap = 1
    membarwidget:bar_properties_set('mem', {
    bg = 'black',
    fg = '#285577',
    fg_center = '#285577',
    fg_end = '#285577',
    fg_off = 'black',
    reverse = false,
    min_value = 0,
    max_value = 100
    wicked.register(membarwidget, wicked.widgets.mem, '$1', 1, 'mem')
    -- CPU graph
    cputext = widget ({ type = "textbox", name = "cputext", align = "right"})
    cputext.text = " cpu: "
    cpugraphwidget = widget({
    type = 'graph',
    name = 'cpugraphwidget',
    align = 'right'
    cpugraphwidget.height = 0.85
    cpugraphwidget.width = 45
    cpugraphwidget.bg = 'black'
    cpugraphwidget.border_width = 1
    cpugraphwidget.grow = 'left'
    cpugraphwidget:plot_properties_set('cpu', {
    fg = '#AEC6D8',
    fg_center = '#285577',
    fg_end = '#285577',
    vertical_gradient = false
    wicked.register(cpugraphwidget, wicked.widgets.cpu, '$1', 1, 'cpu')
    -- mpd display
    --mpdwidget = widget({
    -- type = 'textbox',
    -- name = 'mpdwidget',
    -- align = 'left'
    --wicked.register(mpdwidget, wicked.widgets.mpd,
    -- function (widget, args)
    -- if args[1]:find("volume:") == nil then
    -- return ' <span color="white">Now Playing:</span> '..args[1]
    -- else
    -- return ''
    -- end
    -- end)
    -- Create a statusbar for each screen and add it
    mystatusbar = {}
    for s = 1, screen.count() do
    mystatusbar[s] = statusbar({ position = "top", name = "mystatusbar" .. s,
    fg = beautiful.fg_normal, bg = beautiful.bg_normal })
    -- Add widgets to the statusbar - order matters
    mystatusbar[s]:widgets({
    mytaglist,
    --mytasklist,
    myiconbox,
    mypromptbox,
    mytasklist,
    --mpdwidget,
    cputext,
    cpugraphwidget,
    membartext,
    membarwidget,
    batterytext,
    mybatterymonitor,
    mytextbox,
    mylayoutbox[s],
    s == 1 and mysystray or nil
    mystatusbar[s].screen = s
    end
    --bottomStatusBar = {}
    --for s = 1, screen.count() do
    -- bottomStatusBar[s] = statusbar({ position = "bottom", name = "bottomStatusBar" .. s,
    -- fg = beautiful.fg_normal, bg = beautiful.bg_normal })
    -- -- Add widgets to the statusbar - order matters
    -- bottomStatusBar[s]:widgets({
    -- --mytaglist,
    -- mytasklist,
    -- --myiconbox,
    -- --mypromptbox,
    -- --testbox,
    -- --mytextbox,
    -- --mylayoutbox[s],
    -- --s == 1 and mysystray or nil
    -- bottomStatusBar[s].screen = s
    --end
    -- {{{ Mouse bindings
    awesome.mouse_add(mouse({ }, 3, function () awful.spawn(terminal) end))
    awesome.mouse_add(mouse({ }, 4, awful.tag.viewnext))
    awesome.mouse_add(mouse({ }, 5, awful.tag.viewprev))
    -- {{{ Key bindings
    -- Bind keyboard digits
    -- 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
    keybinding({ modkey }, i,
    function ()
    local screen = mouse.screen
    if tags[screen][i] then
    awful.tag.viewonly(tags[screen][i])
    end
    end):add()
    keybinding({ modkey, "Control" }, i,
    function ()
    local screen = mouse.screen
    if tags[screen][i] then
    tags[screen][i].selected = not tags[screen][i].selected
    end
    end):add()
    keybinding({ modkey, "Shift" }, i,
    function ()
    local sel = client.focus
    if sel then
    if tags[sel.screen][i] then
    awful.client.movetotag(tags[sel.screen][i])
    end
    end
    end):add()
    keybinding({ modkey, "Control", "Shift" }, i,
    function ()
    local sel = client.focus
    if sel then
    if tags[sel.screen][i] then
    awful.client.toggletag(tags[sel.screen][i])
    end
    end
    end):add()
    end
    keybinding({ modkey }, "Left", awful.tag.viewprev):add()
    keybinding({ modkey }, "Right", awful.tag.viewnext):add()
    keybinding({ modkey }, "Escape", awful.tag.history.restore):add()
    -- Standard program
    keybinding({ modkey }, "Return", function () awful.spawn(terminal) end):add()
    keybinding({ }, "F4", function () awful.spawn(browser) end):add()
    keybinding({ modkey, "Control" }, "r", awesome.restart):add()
    keybinding({ modkey, "Shift" }, "q", awesome.quit):add()
    -- Client manipulation
    keybinding({ modkey }, "m", awful.client.maximize):add()
    keybinding({ modkey, "Shift" }, "c", function () client.focus:kill() end):add()
    keybinding({ modkey }, "d", function () awful.client.focusbyidx(1); client.focus:raise() end):add()
    keybinding({ modkey }, "f", function () awful.client.focusbyidx(-1); client.focus:raise() end):add()
    keybinding({ modkey, "Shift" }, "d", function () awful.client.swap(1) end):add()
    keybinding({ modkey, "Shift" }, "f", function () awful.client.swap(-1) end):add()
    keybinding({ modkey, "Control" }, "d", function () awful.screen.focus(1) end):add()
    keybinding({ modkey, "Control" }, "f", function () awful.screen.focus(-1) end):add()
    keybinding({ modkey, "Control" }, "space", awful.client.togglefloating):add()
    keybinding({ modkey, "Control" }, "Return", function () client.focus:swap(awful.client.master()) end):add()
    keybinding({ modkey }, "o", awful.client.movetoscreen):add()
    keybinding({ modkey }, "Tab", awful.client.focus.history.previous):add()
    keybinding({ modkey }, "u", awful.client.urgent.jumpto):add()
    keybinding({ modkey, "Shift" }, "r", function () client.focus:redraw() end):add()
    -- Layout manipulation
    keybinding({ modkey }, "l", function () awful.tag.incmwfact(0.05) end):add()
    keybinding({ modkey }, "h", function () awful.tag.incmwfact(-0.05) end):add()
    keybinding({ modkey, "Shift" }, "h", function () awful.tag.incnmaster(1) end):add()
    keybinding({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end):add()
    keybinding({ modkey, "Control" }, "h", function () awful.tag.incncol(1) end):add()
    keybinding({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end):add()
    keybinding({ modkey }, "space", function () awful.layout.inc(layouts, 1) end):add()
    keybinding({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end):add()
    -- Prompt
    keybinding({ modkey }, "F1", function ()
    awful.prompt.run({ prompt = "Run: " }, mypromptbox, awful.spawn, awful.completion.bash,
    os.getenv("HOME") .. "/.cache/awesome/history") end):add()
    keybinding({ modkey }, "F4", function ()
    awful.prompt.run({ prompt = "Run Lua code: " }, mypromptbox, awful.eval, awful.prompt.bash,
    os.getenv("HOME") .. "/.cache/awesome/history_eval") end):add()
    keybinding({ modkey, "Ctrl" }, "i", function ()
    if mypromptbox.text then
    mypromptbox.text = nil
    else
    mypromptbox.text = nil
    if client.focus.class then
    mypromptbox.text = "Class: " .. client.focus.class .. " "
    end
    if client.focus.instance then
    mypromptbox.text = mypromptbox.text .. "Instance: ".. client.focus.instance .. " "
    end
    if client.focus.role then
    mypromptbox.text = mypromptbox.text .. "Role: ".. client.focus.role
    end
    end
    end):add()
    --- Tabulous, tab manipulation
    keybinding({ modkey, "Control" }, "y", function ()
    local tabbedview = tabulous.tabindex_get()
    local nextclient = awful.client.next(1)
    if not tabbedview then
    tabbedview = tabulous.tabindex_get(nextclient)
    if not tabbedview then
    tabbedview = tabulous.tab_create()
    tabulous.tab(tabbedview, nextclient)
    else
    tabulous.tab(tabbedview, client.focus)
    end
    else
    tabulous.tab(tabbedview, nextclient)
    end
    end):add()
    keybinding({ modkey, "Shift" }, "y", tabulous.untab):add()
    keybinding({ modkey }, "y", function ()
    local tabbedview = tabulous.tabindex_get()
    if tabbedview then
    local n = tabulous.next(tabbedview)
    tabulous.display(tabbedview, n)
    end
    end):add()
    -- Client awful tagging: this is useful to tag some clients and then do stuff like move to tag on them
    keybinding({ modkey }, "t", awful.client.togglemarked):add()
    keybinding({ modkey, 'Shift' }, "t", function ()
    local tabbedview = tabulous.tabindex_get()
    local clients = awful.client.getmarked()
    if not tabbedview then
    tabbedview = tabulous.tab_create(clients[1])
    table.remove(clients, 1)
    end
    for k,c in pairs(clients) do
    tabulous.tab(tabbedview, c)
    end
    end):add()
    for i = 1, keynumber do
    keybinding({ 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):add()
    end
    -- {{{ Hooks
    -- Hook function to execute when focusing a client.
    function hook_focus(c)
    if not awful.client.ismarked(c) then
    c.border_color = beautiful.border_focus
    end
    end
    -- Hook function to execute when unfocusing a client.
    function hook_unfocus(c)
    if not awful.client.ismarked(c) then
    c.border_color = beautiful.border_normal
    end
    end
    -- Hook function to execute when marking a client
    function hook_marked(c)
    c.border_color = beautiful.border_marked
    end
    -- Hook function to execute when unmarking a client
    function hook_unmarked(c)
    c.border_color = beautiful.border_focus
    end
    -- Hook function to execute when the mouse is over a client.
    function hook_mouseover(c)
    -- Sloppy focus, but disabled for magnifier layout
    if awful.layout.get(c.screen) ~= "magnifier" then
    client.focus = c
    end
    end
    -- Hook function to execute when a new client appears.
    function hook_manage(c)
    -- Set floating placement to be smart!
    c.floating_placement = "smart"
    if use_titlebar then
    -- Add a titlebar
    awful.titlebar.add(c, { modkey = modkey })
    end
    -- Add mouse bindings
    c:mouse_add(mouse({ }, 1, function (c) client.focus = c; c:raise() end))
    c:mouse_add(mouse({ modkey }, 1, function (c) c:mouse_move() end))
    c:mouse_add(mouse({ modkey }, 3, function (c) c:mouse_resize() end))
    -- 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
    client.focus = c
    -- Check if the application should be floating.
    local cls = c.class
    local inst = c.instance
    if floatapps[cls] then
    c.floating = floatapps[cls]
    elseif floatapps[inst] then
    c.floating = 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
    -- 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
    c.honorsizehints = true
    end
    -- Hook function to execute when arranging the screen
    -- (tag switch, new client, etc)
    function hook_arrange(screen)
    local layout = awful.layout.get(screen)
    if layout then
    mylayoutbox[screen].text =
    "<bg image=\"/usr/share/awesome/icons/layouts/" .. awful.layout.get(screen) .. "w.png\" resize=\"true\"/>"
    else
    mylayoutbox[screen].text = "No layout."
    end
    -- If no window has focus, give focus to the latest in history
    if not client.focus then
    local c = awful.client.focus.history.get(screen, 0)
    if c then client.focus = c end
    end
    -- Uncomment if you want mouse warping
    local sel = client.focus
    if sel then
    local c_c = sel:coords()
    local m_c = mouse.coords()
    if m_c.x < c_c.x or m_c.x >= c_c.x + c_c.width or
    m_c.y < c_c.y or m_c.y >= c_c.y + c_c.height then
    if table.maxn(m_c.buttons) == 0 then
    mouse.coords({ x = c_c.x + 5, y = c_c.y + 5})
    end
    end
    end
    end
    -- Hook called every second
    function hook_timer ()
    -- For unix time_t lovers
    -- mytextbox.text = " " .. os.time() .. " time_t "
    -- Otherwise use:
    mytextbox.text = " " .. os.date() .. " "
    end
    -- Custom functions
    local function get_bat()
    local a = io.open("/sys/class/power_supply/BAT0/energy_full")
    for line in a:lines() do
    full = line
    end
    a:close()
    local b = io.open("/sys/class/power_supply/BAT0/energy_now")
    for line in b:lines() do
    now = line
    end
    b:close()
    batt=math.floor(now*100/full)
    mybatterymonitor:bar_data_add("bat",batt)
    end
    -- Set up some hooks
    awful.hooks.focus.register(hook_focus)
    awful.hooks.unfocus.register(hook_unfocus)
    awful.hooks.marked.register(hook_marked)
    awful.hooks.unmarked.register(hook_unmarked)
    awful.hooks.manage.register(hook_manage)
    awful.hooks.mouseover.register(hook_mouseover)
    awful.hooks.arrange.register(hook_arrange)
    awful.hooks.timer.register(1, hook_timer)
    awful.hooks.timer.register(5, get_bat)
    --startup script

    Same problem here. Also happens to me in wmii. I think if the WM puts the window in floating mode without telling it where to appear somethings will appear wrong.
    For me it's the Firefox Upload selection box.
    It doesn't happen in ratpoison, but you can tell the floating window is getting moved after it spawns. (ratpoison has editable rules for where to put these windows)
    Last edited by Procyon (2008-11-07 22:34:40)

  • Z77-GD65, problems with video signal

    Got some problem: with external graphics card (ASUS GTX660-DC2TG-2GD5) the signal disappears after a while (about 1-3 minutes) - display goes off and has floating table "No signal".
    Without external card, through the integrated video - all works fine.
    Has anybode had this problem?
    I had a BIOS like 10.0 and then updated it to the latest version ( 10.8 ) via M-FLASH, but nothing has changed.
    My system:
    . MSI Z77A-GD65 (RTL) LGA1155 < Z77> 3xPCI-E+Dsub+DVI+HDMI+GbLAN+1394 SATA RAID ATX 4DDR-III
    . CPU Intel Core i7-3770 BOX 3.4 ГГц / 4core / SVGA HD Graphics 4000 / 1+8Mb / 77 Wt / 5 / LGA1155
    . Corsair Vengeance < CMZ8GX3M2A2133C11R> DDR-III DIMM 8Gb KIT 2*4Gb < PC3-17000>
    . ASUS GTX660-DC2TG-2GD5
    . Corsair TX750 < CP-9020042-EU> 750W ATX (24+2x4+4x6 / 8pin)

    Yes, the forum's USB method is the safest there is. That and the reflash will ensure the ME firmware has been updated properly. Yes, you do have a safety net with the B BIOS chip.
    As a side note, you shouldn't have any graphics problems when W7 is installed like some have with W8.
    Edit: Problem is you need an OS installed with the forum method.
    2nd edit: Recommend then to run on the onboard ports to the monitor with the discrete card removed to get the OS, drivers, reflash, etc. taken care of. Then the matter of the graphics card not working right can be addressed.
    3rd edit: Has the graphics card been tested in another machine to verify it is not possibly faulty?
    4th edit: Sorry about all the edits, but as I think about it, more things come to mind. Have you been connecting the discrete card with HDMI or DVI? Some compatibility issue can be a possibility with a non compliant v1.4 HDMI cable or a monitor conflict. Some Apple monitors have been known to be problematic from time to time.

  • Inserting pictures into a div in a certain formation. help. thanks!

    I'm new to forums and Dreamweaver cs4 and code... I really could use  some help. I want to put pics where the black boxes are but i cant seem  to get them stacked as they look. I also want to be able to have  words/paragraphs to the left of the four pictures. I tried; insert picts  with padding/floating, tables, seperate divs, create web photo album, i  just cant  get them lined up like that. I'm using dreamweaver cs4 and i  have my layout seperated with divs, so the white body part is a  indidual loating div. Please help. Thanks.
    ps. The "right body" div (white box) is set at like 600w x 400h. I dont want that dimenstion to change.
    thanks again everyone who can help.

    You want something like this??
    http://alt-web.com/TEMPLATES/2-col-fixed-with-floats.shtml
    View source in browser to see the code.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

Maybe you are looking for

  • Background job abend error

    Hi all, my background job abends with following errors.      1. Error when assigning SID: Action VAL_SID_CONVERT table Z......      2. Activation of M records from DataStore object Z...... terminated      3. Process 000002 returned with errors. Can a

  • Loading data in a drop down menu using jsp

    hello everyone... I'm very new to JSP programming....i'm facing a problem regarding loading the data in a drop down menu at the button click..... what i'm doing is...i'v taken a button and at the button click the data from "Sql Server 2000" shd load

  • My iPad screen seems to have frozen

    My iPad screen seems to have frozen and I cannot even power off any suggestions?

  • Opening photo in email.

    When I receive a photo attachment in an email - I cannot see it- it appears as a question mark. I have changed the >settings>mail, contacts>load remote images> to "on". This does not fix it. Any other ideas? Thanks.

  • Can I change the location of the Info popup window?

    Whenever I double click an event to edit or add information, it appears at the far upper left corner of my screen. I have to move my mouse that way to edit it; on a 27 inch screen that is very inconvenient. If I move the window and close it, the next