--- /etc/xdg/awesome/rc.lua 2008-08-04 19:57:37.000000000 +0200 +++ .config/awesome/rc.lua 2008-08-05 20:20:42.000000000 +0200 @@ -40,7 +40,7 @@ } -- Color & Appearance definitions, we use these later to display things -font = "sans 8" +font = "sans 10" border_width = 1 bg_normal = "#222222" @@ -49,7 +49,7 @@ bg_focus = "#535d6c" fg_focus = "#ffffff" -border_focus = bg_focus +border_focus = "#ff0000" border_marked = "#91231C" bg_urgent = "#ff0000" @@ -63,15 +63,17 @@ -- }}} +tagnames = { "一", "二", "三", "四", "五", "六", "七", "八", "九", "十" } + -- {{{ 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, 9 do - tags[s][tagnumber] = tag({ name = tagnumber, layout = layouts[1] }) + -- Create 5 tags per screen + for tagnumber = 1, 5 do + tags[s][tagnumber] = tag({ name = tagnames[tagnumber], layout = layouts[1] }) -- Add tags to screen one by one tags[s][tagnumber].mwfact = 0.618033988769 tags[s][tagnumber].screen = s @@ -100,7 +102,7 @@ function mytasklist.label(c, screen) return awful.widget.tasklist.label.currenttags(c, screen, bg_focus, fg_focus, bg_urgent, fg_urgent) end -- Create a textbox widget -mytextbox = widget({ type = "textbox", name = "mytextbox", align = "right" }) +mytextbox = widget({ type = "textbox", name = "mytextbox", align = "left" }) -- Set the default text in textbox mytextbox.text = " awesome " .. AWESOME_VERSION .. " " mypromptbox = widget({ type = "textbox", name = "mypromptbox", align = "left" }) @@ -127,14 +129,14 @@ -- 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 = fg_normal, bg = bg_normal }) + mystatusbar[s] = statusbar({ position = "left", name = "mystatusbar" .. s, + fg = fg_normal, bg = bg_normal, height = 24 }) -- Add widgets to the statusbar - order matters + mystatusbar[s]:widget_add(mytextbox) mystatusbar[s]:widget_add(mytaglist) - mystatusbar[s]:widget_add(myiconbox) mystatusbar[s]:widget_add(mytasklist) mystatusbar[s]:widget_add(mypromptbox) - mystatusbar[s]:widget_add(mytextbox) +-- mystatusbar[s]:widget_add(myiconbox) mystatusbar[s]:widget_add(mylayoutbox[s]) mystatusbar[s].screen = s end @@ -385,10 +387,7 @@ -- Hook called every second function hook_timer () - -- For unix time_t lovers - mytextbox.text = " " .. os.time() .. " time_t " - -- Otherwise use: - -- mytextbox.text = " " .. os.date() .. " " + mytextbox.text = " " .. os.date('%H:%M') .. " " end -- Set up some hooks @@ -399,5 +398,5 @@ awful.hooks.manage(hook_manage) awful.hooks.mouseover(hook_mouseover) awful.hooks.arrange(hook_arrange) -awful.hooks.timer(1, hook_timer) +awful.hooks.timer(10, hook_timer) -- }}}