-- awesome 3 configuration file
AWESOME_DATADIR = "/home/madduck/code"
-package.path = AWESOME_DATADIR .. "/awesome/?.lua;" .. package.path
+package.path = AWESOME_DATADIR .. "/awesome/lib/?.lua;" .. package.path
-- Include awesome library, with lots of useful function!
require("awful")
}
-- Color & Appearance definitions, we use these later to display things
-font = "RotisSansSerif 8"
+font = "RotisSansSerif 10"
border_width = 1
bg_normal = "#222222"
for tagnumber = 1, 9 do
tags[s][tagnumber] = tag.new({ name = tagnumber })
-- Add tags to screen one by one
- tags[s][tagnumber]:mwfact_set(0.618033988769)
+ -- split at 0.5/50% exactly
+ tags[s][tagnumber]:mwfact_set(0.5)
tags[s][tagnumber]:add(s)
end
-- I'm sure you want to see at least one tag.
mytextbox = widget.new({ type = "textbox", name = "mytextbox", align = "right" })
-- Set the default text in textbox
mytextbox:set("text", "<b><small> awesome " .. AWESOME_VERSION .. " </small></b>")
-mymenubox = widget.new({ type = "textbox", name = "mytextbox", align = "left" })
-
--- Create an iconbox widget
-myiconbox = widget.new({ type = "iconbox", name = "myiconbox", align = "left" })
-myiconbox:set("image", AWESOME_DATADIR .. "/awesome/icons/awesome16.png")
+mymenubox = widget.new({ type = "textbox", name = "mymenubox", align = "left" })
-- Create a systray
mysystray = widget.new({ type = "systray", name = "mysystray", align = "right" })
-- We need one layoutbox per screen.
mylayoutbox = {}
for s = 1, screen.count() do
- mylayoutbox[s] = widget.new({ type = "iconbox", name = "myiconbox", align = "right" })
+ mylayoutbox[s] = widget.new({ type = "iconbox", name = "mylayoutbox", align = "right" })
mylayoutbox[s]:mouse_add(mouse.new({ }, 1, function () awful.layout.inc(layouts, 1) end))
mylayoutbox[s]:mouse_add(mouse.new({ }, 3, function () awful.layout.inc(layouts, -1) end))
mylayoutbox[s]:mouse_add(mouse.new({ }, 4, function () awful.layout.inc(layouts, 1) end))
mystatusbar[s] = statusbar.new({ position = "top", name = "mystatusbar" .. s,
fg = fg_normal, bg = bg_normal })
-- Add widgets to the statusbar - order matters
+ -- #TODO order is not really taken into account
mystatusbar[s]:widget_add(mytaglist)
- mystatusbar[s]:widget_add(myiconbox)
mystatusbar[s]:widget_add(mytasklist)
+ mystatusbar[s]:widget_add(mylayoutbox[s])
mystatusbar[s]:widget_add(mymenubox)
mystatusbar[s]:widget_add(mytextbox)
- mystatusbar[s]:widget_add(mylayoutbox[s])
mystatusbar[s]:add(s)
end
mystatusbar[screen.count()]:widget_add(mysystray)
keybinding.new({ modkey, "Shift" }, "q", awesome.quit):add()
-- Client manipulation
-keybinding.new({ modkey, "Shift" }, "c", function () client.focus_get():kill() end):add()
-keybinding.new({ modkey }, "j", function () awful.client.focus(1); client.focus_get():raise() end):add()
-keybinding.new({ modkey }, "k", function () awful.client.focus(-1); client.focus_get():raise() end):add()
-keybinding.new({ modkey, "Shift" }, "j", function () awful.client.swap(1) end):add()
-keybinding.new({ modkey, "Shift" }, "k", function () awful.client.swap(-1) end):add()
-keybinding.new({ modkey, "Control" }, "j", function () awful.screen.focus(1) end):add()
-keybinding.new({ modkey, "Control" }, "k", function () awful.screen.focus(-1) end):add()
+keybinding.new({ modkey }, "Escape", function () client.focus_get():kill() end):add()
+keybinding.new({ modkey }, "k", function () awful.client.focus(1); client.focus_get():raise() end):add()
+keybinding.new({ modkey }, "j", function () awful.client.focus(-1); client.focus_get():raise() end):add()
+keybinding.new({ modkey, "Shift" }, "k", function () awful.client.swap(1) end):add()
+keybinding.new({ modkey, "Shift" }, "j", function () awful.client.swap(-1) end):add()
+keybinding.new({ modkey, "Control" }, "k", function () awful.screen.focus(1) end):add()
+keybinding.new({ modkey, "Control" }, "j", function () awful.screen.focus(-1) end):add()
keybinding.new({ modkey, "Control" }, "space", awful.client.togglefloating):add()
+keybinding.new({ modkey, "Control" }, "Return", function () client.focus_get():swap(awful.client.master()) end):add()
keybinding.new({ modkey }, "o", awful.client.movetoscreen):add()
-- Layout manipulation
keybinding.new({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end):add()
-- Menu
-keybinding.new({ modkey }, "F1", function () awful.menu("Run: ", mymenubox, awful.spawn) end):add()
-keybinding.new({ modkey }, "F4", function () awful.menu("Run Lua code: ", mymenubox, awful.eval) end):add()
+keybinding.new({ modkey }, "F1", function ()
+ awful.menu({ prompt = "Run: ", cursor_fg = fg_focus, cursor_bg = bg_focus }, mymenubox, awful.spawn)
+ end):add()
+keybinding.new({ modkey }, "F4", function ()
+ awful.menu({ prompt = "Run Lua code: ", cursor_fg = fg_focus, cursor_bg = bg_focus }, mymenubox, awful.eval)
+ end):add()
--- Tabulous, tab manipulation
keybinding.new({ modkey, "Control" }, "y", function ()
if c:name_get():lower():find("mplayer") then
c:floating_set(true)
end
+ if c:name_get():find("pinentry") then
+ c:floating_set(true)
+ end
+ if c:name_get():lower():find("twinkle") then
+ c:floating_set(true)
+ end
+ if c:name_get():find("GIMP") then
+ c:floating_set(true)
+ end
end
-- Hook function to execute when arranging the screen