diff --git a/#rc.lua# b/3.4/#rc.lua#
similarity index 100%
rename from #rc.lua#
rename to 3.4/#rc.lua#
diff --git a/README.md b/3.4/README.md
similarity index 100%
rename from README.md
rename to 3.4/README.md
diff --git a/3.4/icons/LICENSE b/3.4/icons/LICENSE
new file mode 100644
index 0000000..ce5da9d
--- /dev/null
+++ b/3.4/icons/LICENSE
@@ -0,0 +1,12 @@
+All 'awesome' icons in this package were created by Adrian C. (anrxc).
+They are licensed under the same terms as the awesome distribution itself
+- GNU General Public License version 2. To view a human-readable summary
+of this license, visit: http://creativecommons.org/licenses/GPL/2.0/
+
+The widget icons with the exception of: 'chat', 'crypt', 'power' and
+'rss' icons (which were made by me) were originally made by 'sm4tik'
+for purposes of 'dzen', I could not find any licensing information
+attached to those original bitmaps. Assuming they are in the public
+domain I am licensing the widget icons under the terms of the
+Creative Commons Attribution-Share Alike license. To view a copy of
+this license, visit: http://creativecommons.org/licenses/by-sa/3.0/
diff --git a/3.4/icons/awesome.png b/3.4/icons/awesome.png
new file mode 100644
index 0000000..44697e6
Binary files /dev/null and b/3.4/icons/awesome.png differ
diff --git a/3.4/icons/bat.png b/3.4/icons/bat.png
new file mode 100644
index 0000000..37081f5
Binary files /dev/null and b/3.4/icons/bat.png differ
diff --git a/3.4/icons/cal.png b/3.4/icons/cal.png
new file mode 100644
index 0000000..fdb2701
Binary files /dev/null and b/3.4/icons/cal.png differ
diff --git a/3.4/icons/chat.png b/3.4/icons/chat.png
new file mode 100644
index 0000000..5dd010e
Binary files /dev/null and b/3.4/icons/chat.png differ
diff --git a/3.4/icons/cpu.png b/3.4/icons/cpu.png
new file mode 100644
index 0000000..b80080c
Binary files /dev/null and b/3.4/icons/cpu.png differ
diff --git a/3.4/icons/crypto.png b/3.4/icons/crypto.png
new file mode 100644
index 0000000..20f0313
Binary files /dev/null and b/3.4/icons/crypto.png differ
diff --git a/3.4/icons/disk.png b/3.4/icons/disk.png
new file mode 100644
index 0000000..db9a6fe
Binary files /dev/null and b/3.4/icons/disk.png differ
diff --git a/3.4/icons/down.png b/3.4/icons/down.png
new file mode 100644
index 0000000..53c2d89
Binary files /dev/null and b/3.4/icons/down.png differ
diff --git a/3.4/icons/info.png b/3.4/icons/info.png
new file mode 100644
index 0000000..fd54609
Binary files /dev/null and b/3.4/icons/info.png differ
diff --git a/icons/layouts/copia de dwindle.png b/3.4/icons/layouts/copia de dwindle.png
similarity index 100%
rename from icons/layouts/copia de dwindle.png
rename to 3.4/icons/layouts/copia de dwindle.png
diff --git a/icons/layouts/copia de fairh.png b/3.4/icons/layouts/copia de fairh.png
similarity index 100%
rename from icons/layouts/copia de fairh.png
rename to 3.4/icons/layouts/copia de fairh.png
diff --git a/icons/layouts/copia de fairv.png b/3.4/icons/layouts/copia de fairv.png
similarity index 100%
rename from icons/layouts/copia de fairv.png
rename to 3.4/icons/layouts/copia de fairv.png
diff --git a/icons/layouts/copia de floating.png b/3.4/icons/layouts/copia de floating.png
similarity index 100%
rename from icons/layouts/copia de floating.png
rename to 3.4/icons/layouts/copia de floating.png
diff --git a/icons/layouts/copia de fullscreen.png b/3.4/icons/layouts/copia de fullscreen.png
similarity index 100%
rename from icons/layouts/copia de fullscreen.png
rename to 3.4/icons/layouts/copia de fullscreen.png
diff --git a/icons/layouts/copia de magnifier.png b/3.4/icons/layouts/copia de magnifier.png
similarity index 100%
rename from icons/layouts/copia de magnifier.png
rename to 3.4/icons/layouts/copia de magnifier.png
diff --git a/icons/layouts/copia de max.png b/3.4/icons/layouts/copia de max.png
similarity index 100%
rename from icons/layouts/copia de max.png
rename to 3.4/icons/layouts/copia de max.png
diff --git a/icons/layouts/copia de spiral.png b/3.4/icons/layouts/copia de spiral.png
similarity index 100%
rename from icons/layouts/copia de spiral.png
rename to 3.4/icons/layouts/copia de spiral.png
diff --git a/icons/layouts/copia de tile.png b/3.4/icons/layouts/copia de tile.png
similarity index 100%
rename from icons/layouts/copia de tile.png
rename to 3.4/icons/layouts/copia de tile.png
diff --git a/icons/layouts/copia de tilebottom.png b/3.4/icons/layouts/copia de tilebottom.png
similarity index 100%
rename from icons/layouts/copia de tilebottom.png
rename to 3.4/icons/layouts/copia de tilebottom.png
diff --git a/icons/layouts/copia de tileleft.png b/3.4/icons/layouts/copia de tileleft.png
similarity index 100%
rename from icons/layouts/copia de tileleft.png
rename to 3.4/icons/layouts/copia de tileleft.png
diff --git a/icons/layouts/copia de tiletop.png b/3.4/icons/layouts/copia de tiletop.png
similarity index 100%
rename from icons/layouts/copia de tiletop.png
rename to 3.4/icons/layouts/copia de tiletop.png
diff --git a/icons/layouts/dwindle.png b/3.4/icons/layouts/dwindle.png
similarity index 100%
rename from icons/layouts/dwindle.png
rename to 3.4/icons/layouts/dwindle.png
diff --git a/icons/layouts/fairh.png b/3.4/icons/layouts/fairh.png
similarity index 100%
rename from icons/layouts/fairh.png
rename to 3.4/icons/layouts/fairh.png
diff --git a/icons/layouts/fairv.png b/3.4/icons/layouts/fairv.png
similarity index 100%
rename from icons/layouts/fairv.png
rename to 3.4/icons/layouts/fairv.png
diff --git a/icons/layouts/floating.png b/3.4/icons/layouts/floating.png
similarity index 100%
rename from icons/layouts/floating.png
rename to 3.4/icons/layouts/floating.png
diff --git a/icons/layouts/fullscreen.png b/3.4/icons/layouts/fullscreen.png
similarity index 100%
rename from icons/layouts/fullscreen.png
rename to 3.4/icons/layouts/fullscreen.png
diff --git a/icons/layouts/magnifier.png b/3.4/icons/layouts/magnifier.png
similarity index 100%
rename from icons/layouts/magnifier.png
rename to 3.4/icons/layouts/magnifier.png
diff --git a/icons/layouts/max.png b/3.4/icons/layouts/max.png
similarity index 100%
rename from icons/layouts/max.png
rename to 3.4/icons/layouts/max.png
diff --git a/icons/layouts/spiral.png b/3.4/icons/layouts/spiral.png
similarity index 100%
rename from icons/layouts/spiral.png
rename to 3.4/icons/layouts/spiral.png
diff --git a/icons/layouts/tile.png b/3.4/icons/layouts/tile.png
similarity index 100%
rename from icons/layouts/tile.png
rename to 3.4/icons/layouts/tile.png
diff --git a/icons/layouts/tilebottom.png b/3.4/icons/layouts/tilebottom.png
similarity index 100%
rename from icons/layouts/tilebottom.png
rename to 3.4/icons/layouts/tilebottom.png
diff --git a/icons/layouts/tileleft.png b/3.4/icons/layouts/tileleft.png
similarity index 100%
rename from icons/layouts/tileleft.png
rename to 3.4/icons/layouts/tileleft.png
diff --git a/icons/layouts/tiletop.png b/3.4/icons/layouts/tiletop.png
similarity index 100%
rename from icons/layouts/tiletop.png
rename to 3.4/icons/layouts/tiletop.png
diff --git a/3.4/icons/mail.png b/3.4/icons/mail.png
new file mode 100644
index 0000000..56989f0
Binary files /dev/null and b/3.4/icons/mail.png differ
diff --git a/3.4/icons/mem.png b/3.4/icons/mem.png
new file mode 100644
index 0000000..16adb2f
Binary files /dev/null and b/3.4/icons/mem.png differ
diff --git a/3.4/icons/music.png b/3.4/icons/music.png
new file mode 100644
index 0000000..4c2764d
Binary files /dev/null and b/3.4/icons/music.png differ
diff --git a/3.4/icons/pacman.png b/3.4/icons/pacman.png
new file mode 100644
index 0000000..466c34f
Binary files /dev/null and b/3.4/icons/pacman.png differ
diff --git a/3.4/icons/phones.png b/3.4/icons/phones.png
new file mode 100644
index 0000000..8b6c26a
Binary files /dev/null and b/3.4/icons/phones.png differ
diff --git a/3.4/icons/power-bat-high.png b/3.4/icons/power-bat-high.png
new file mode 100644
index 0000000..37081f5
Binary files /dev/null and b/3.4/icons/power-bat-high.png differ
diff --git a/3.4/icons/power.png b/3.4/icons/power.png
new file mode 100644
index 0000000..b8add29
Binary files /dev/null and b/3.4/icons/power.png differ
diff --git a/3.4/icons/rss.png b/3.4/icons/rss.png
new file mode 100644
index 0000000..62d361e
Binary files /dev/null and b/3.4/icons/rss.png differ
diff --git a/3.4/icons/sat.png b/3.4/icons/sat.png
new file mode 100644
index 0000000..485f36e
Binary files /dev/null and b/3.4/icons/sat.png differ
diff --git a/3.4/icons/sun.png b/3.4/icons/sun.png
new file mode 100644
index 0000000..2f22c8e
Binary files /dev/null and b/3.4/icons/sun.png differ
diff --git a/icons/taglist/squarefz.png b/3.4/icons/taglist/squarefz.png
similarity index 100%
rename from icons/taglist/squarefz.png
rename to 3.4/icons/taglist/squarefz.png
diff --git a/icons/taglist/squarefza.png b/3.4/icons/taglist/squarefza.png
similarity index 100%
rename from icons/taglist/squarefza.png
rename to 3.4/icons/taglist/squarefza.png
diff --git a/icons/taglist/squarez.png b/3.4/icons/taglist/squarez.png
similarity index 100%
rename from icons/taglist/squarez.png
rename to 3.4/icons/taglist/squarez.png
diff --git a/icons/taglist/squareza.png b/3.4/icons/taglist/squareza.png
similarity index 100%
rename from icons/taglist/squareza.png
rename to 3.4/icons/taglist/squareza.png
diff --git a/3.4/icons/temp.png b/3.4/icons/temp.png
new file mode 100644
index 0000000..2e712e9
Binary files /dev/null and b/3.4/icons/temp.png differ
diff --git a/3.4/icons/time.png b/3.4/icons/time.png
new file mode 100644
index 0000000..3fb987d
Binary files /dev/null and b/3.4/icons/time.png differ
diff --git a/icons/titlebar/close_focus.png b/3.4/icons/titlebar/close_focus.png
similarity index 100%
rename from icons/titlebar/close_focus.png
rename to 3.4/icons/titlebar/close_focus.png
diff --git a/icons/titlebar/close_normal.png b/3.4/icons/titlebar/close_normal.png
similarity index 100%
rename from icons/titlebar/close_normal.png
rename to 3.4/icons/titlebar/close_normal.png
diff --git a/icons/titlebar/floating_focus_active.png b/3.4/icons/titlebar/floating_focus_active.png
similarity index 100%
rename from icons/titlebar/floating_focus_active.png
rename to 3.4/icons/titlebar/floating_focus_active.png
diff --git a/icons/titlebar/floating_focus_inactive.png b/3.4/icons/titlebar/floating_focus_inactive.png
similarity index 100%
rename from icons/titlebar/floating_focus_inactive.png
rename to 3.4/icons/titlebar/floating_focus_inactive.png
diff --git a/icons/titlebar/floating_normal_active.png b/3.4/icons/titlebar/floating_normal_active.png
similarity index 100%
rename from icons/titlebar/floating_normal_active.png
rename to 3.4/icons/titlebar/floating_normal_active.png
diff --git a/icons/titlebar/floating_normal_inactive.png b/3.4/icons/titlebar/floating_normal_inactive.png
similarity index 100%
rename from icons/titlebar/floating_normal_inactive.png
rename to 3.4/icons/titlebar/floating_normal_inactive.png
diff --git a/icons/titlebar/maximized_focus_active.png b/3.4/icons/titlebar/maximized_focus_active.png
similarity index 100%
rename from icons/titlebar/maximized_focus_active.png
rename to 3.4/icons/titlebar/maximized_focus_active.png
diff --git a/icons/titlebar/maximized_focus_inactive.png b/3.4/icons/titlebar/maximized_focus_inactive.png
similarity index 100%
rename from icons/titlebar/maximized_focus_inactive.png
rename to 3.4/icons/titlebar/maximized_focus_inactive.png
diff --git a/icons/titlebar/maximized_normal_active.png b/3.4/icons/titlebar/maximized_normal_active.png
similarity index 100%
rename from icons/titlebar/maximized_normal_active.png
rename to 3.4/icons/titlebar/maximized_normal_active.png
diff --git a/icons/titlebar/maximized_normal_inactive.png b/3.4/icons/titlebar/maximized_normal_inactive.png
similarity index 100%
rename from icons/titlebar/maximized_normal_inactive.png
rename to 3.4/icons/titlebar/maximized_normal_inactive.png
diff --git a/icons/titlebar/ontop_focus_active.png b/3.4/icons/titlebar/ontop_focus_active.png
similarity index 100%
rename from icons/titlebar/ontop_focus_active.png
rename to 3.4/icons/titlebar/ontop_focus_active.png
diff --git a/icons/titlebar/ontop_focus_inactive.png b/3.4/icons/titlebar/ontop_focus_inactive.png
similarity index 100%
rename from icons/titlebar/ontop_focus_inactive.png
rename to 3.4/icons/titlebar/ontop_focus_inactive.png
diff --git a/icons/titlebar/ontop_normal_active.png b/3.4/icons/titlebar/ontop_normal_active.png
similarity index 100%
rename from icons/titlebar/ontop_normal_active.png
rename to 3.4/icons/titlebar/ontop_normal_active.png
diff --git a/icons/titlebar/ontop_normal_inactive.png b/3.4/icons/titlebar/ontop_normal_inactive.png
similarity index 100%
rename from icons/titlebar/ontop_normal_inactive.png
rename to 3.4/icons/titlebar/ontop_normal_inactive.png
diff --git a/icons/titlebar/sticky_focus_active.png b/3.4/icons/titlebar/sticky_focus_active.png
similarity index 100%
rename from icons/titlebar/sticky_focus_active.png
rename to 3.4/icons/titlebar/sticky_focus_active.png
diff --git a/icons/titlebar/sticky_focus_inactive.png b/3.4/icons/titlebar/sticky_focus_inactive.png
similarity index 100%
rename from icons/titlebar/sticky_focus_inactive.png
rename to 3.4/icons/titlebar/sticky_focus_inactive.png
diff --git a/icons/titlebar/sticky_normal_active.png b/3.4/icons/titlebar/sticky_normal_active.png
similarity index 100%
rename from icons/titlebar/sticky_normal_active.png
rename to 3.4/icons/titlebar/sticky_normal_active.png
diff --git a/icons/titlebar/sticky_normal_inactive.png b/3.4/icons/titlebar/sticky_normal_inactive.png
similarity index 100%
rename from icons/titlebar/sticky_normal_inactive.png
rename to 3.4/icons/titlebar/sticky_normal_inactive.png
diff --git a/3.4/icons/up.png b/3.4/icons/up.png
new file mode 100644
index 0000000..e79b296
Binary files /dev/null and b/3.4/icons/up.png differ
diff --git a/3.4/icons/vol.png b/3.4/icons/vol.png
new file mode 100644
index 0000000..31b396f
Binary files /dev/null and b/3.4/icons/vol.png differ
diff --git a/3.4/icons/wifi.png b/3.4/icons/wifi.png
new file mode 100644
index 0000000..d3db077
Binary files /dev/null and b/3.4/icons/wifi.png differ
diff --git a/osk.lua b/3.4/osk.lua
similarity index 100%
rename from osk.lua
rename to 3.4/osk.lua
diff --git a/3.4/rc.lua b/3.4/rc.lua
new file mode 100644
index 0000000..cf7e258
--- /dev/null
+++ b/3.4/rc.lua
@@ -0,0 +1,471 @@
+-- Standard awesome library
+require("awful")
+require("awful.autofocus")
+require("awful.rules")
+
+-- Theme handling library
+require("beautiful")
+-- Notification library
+require("naughty")
+require("obvious")
+--obvious
+require("obvious.popup_run_prompt")
+--require("obvious.battery")
+require("obvious.wlan")
+require("obvious.clock")
+require("obvious.volume_alsa")
+require("obvious.net")
+
+require("vicious")
+-- Load Debian menu entries
+require("debian.menu")
+
+-- {{{ Variable definitions
+-- Themes define colours, icons, and wallpapers
+beautiful.init("/usr/share/awesome/themes/default/theme.lua")
+
+-- Variable with the config directory
+confdir = awful.util.getdir("config")
+
+
+-- This is used later as the default terminal and editor to run.
+terminal = "x-terminal-emulator"
+editor = os.getenv("EDITOR") or "editor"
+editor_cmd = terminal .. " -e " .. editor
+browser = "nautilus --no-desktop --browser"
+initawesome = "sh /home/guerre/.awesomestart"
+icewe= "iceweasel"
+lock= "xscreensaver-command -lock"
+--lock= "sh /home/fguerrer/lock"
+xterm="xterm"
+weechat = terminal .. " -name weechat -e weechat-curses"
+firefoxbeta="sh /home/guerre/Descargas/firefox/firefox"
+start="sh /home/guerre/.awesomestart"
+--brilloup= "sh /home/guerre/scripts/video_brightnessup.sh"
+--brillodown= "sh /home/guerre/scripts/video_brightnessdown.sh"
+
+-- 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 =
+{
+ awful.layout.suit.tile,
+ awful.layout.suit.tile.left,
+ awful.layout.suit.tile.bottom,
+ awful.layout.suit.tile.top,
+ awful.layout.suit.fair,
+ awful.layout.suit.fair.horizontal,
+ awful.layout.suit.spiral,
+ awful.layout.suit.spiral.dwindle,
+ awful.layout.suit.max,
+ awful.layout.suit.max.fullscreen,
+ awful.layout.suit.magnifier,
+ awful.layout.suit.floating
+}
+-- }}}
+
+-- {{{ Tags
+-- Define a tag table which hold all screen tags.
+
+-- **************************************
+-- {{{ Tags
+-- Define a tag table which hold all screen tags.
+tags = {}
+tags.settings = {
+ { name = "1", layout = layouts[5] },
+ { name = "2", layout = layouts[9] },
+ { name = "3", layout = layouts[1] },
+ { name = "4", layout = layouts[1] },
+ { name = "5", layout = layouts[12] },
+ { name = "6", layout = layouts[12] },
+ { name = "7", layout = layouts[12] },
+ { name = "8", layout = layouts[3] },
+ { name = "9", layout = layouts[1] }
+}
+
+for s = 1, screen.count() do
+ tags[s] = {}
+ for i, v in ipairs(tags.settings) do
+ tags[s][i] = tag({ name = v.name })
+ tags[s][i].screen = s
+ awful.tag.setproperty(tags[s][i], "layout", v.layout)
+ end
+ tags[s][1].selected = true
+end
+-- }}}
+
+
+
+-- {{{ Menu
+-- Create a laucher widget and a main menu
+myawesomemenu = {
+ { "manual", terminal .. " -e man awesome" },
+ { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
+ { "restart", awesome.restart },
+ { "quit", awesome.quit }
+}
+
+mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
+ { "Debian", debian.menu.Debian_menu.Debian },
+ { "open terminal", terminal }
+ }
+ })
+
+mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
+ menu = mymainmenu })
+-- }}}
+-- Reusable separators.
+spacer = widget({ type = "textbox", name = "spacer" })
+separator = widget({ type = "textbox", name = "separator" })
+spacer.text = " "
+separator.text = "|"
+--clock
+clockicon = widget({ type = "imagebox", name = "clockicon"})
+clockicon.image = image(confdir.."/icons/time.png")
+
+-- Volúmen Alsa
+ volicon = widget({ type = "imagebox" })
+ volicon.image = image(confdir.."/icons/vol.png")
+ volwidget = widget({ type = "textbox" })
+ vicious.register(volwidget, vicious.widgets.volume, " Vol: $1% ", 2, "PCM")
+
+-- Mouse-Buttons
+volicon:buttons(awful.util.table.join(
+awful.button({ }, 1, function () awful.util.spawn("amixer -q sset PCM toggle", false) end),
+awful.button({ }, 4, function () awful.util.spawn("amixer -q sset PCM 1%+",false) end),
+awful.button({ }, 5, function () awful.util.spawn("amixer -q sset PCM 1%-",false) end)))
+
+--
+
+
+-- }}}
+-- Create a textclock widget
+mytextclock = awful.widget.textclock({ align = "right" })
+
+
+-- Create a systray
+mysystray = widget({ type = "systray" })
+
+-- Create a wibox for each screen and add it
+mywibox = {}
+mypromptbox = {}
+mylayoutbox = {}
+mytaglist = {}
+mytaglist.buttons = awful.util.table.join(
+ awful.button({ }, 1, awful.tag.viewonly),
+ awful.button({ modkey }, 1, awful.client.movetotag),
+ awful.button({ }, 3, awful.tag.viewtoggle),
+ awful.button({ modkey }, 3, awful.client.toggletag),
+ awful.button({ }, 4, awful.tag.viewnext),
+ awful.button({ }, 5, awful.tag.viewprev)
+ )
+mytasklist = {}
+mytasklist.buttons = awful.util.table.join(
+ awful.button({ }, 1, function (c)
+ if not c:isvisible() then
+ awful.tag.viewonly(c:tags()[1])
+ end
+ client.focus = c
+ c:raise()
+ end),
+ awful.button({ }, 3, function ()
+ if instance then
+ instance:hide()
+ instance = nil
+ else
+ instance = awful.menu.clients({ width=250 })
+ end
+ end),
+ awful.button({ }, 4, function ()
+ awful.client.focus.byidx(1)
+ if client.focus then client.focus:raise() end
+ end),
+ awful.button({ }, 5, function ()
+ awful.client.focus.byidx(-1)
+ if client.focus then client.focus:raise() end
+ end))
+
+for s = 1, screen.count() do
+ -- Create a promptbox for each screen
+ mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
+ -- Create an imagebox widget which will contains an icon indicating which layout we're using.
+ -- We need one layoutbox per screen.
+ mylayoutbox[s] = awful.widget.layoutbox(s)
+ mylayoutbox[s]:buttons(awful.util.table.join(
+ awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
+ awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
+ awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
+ awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
+ -- Create a taglist widget
+ mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
+
+ -- Create a tasklist widget
+ mytasklist[s] = awful.widget.tasklist(function(c)
+ return awful.widget.tasklist.label.currenttags(c, s)
+ end, mytasklist.buttons)
+
+ -- Create the wibox
+ mywibox[s] = awful.wibox({ position = "top", screen = s })
+ -- Add widgets to the wibox - order matters
+ mywibox[s].widgets = {
+ {
+ mylauncher,
+ mytaglist[s],
+ mypromptbox[s],
+ layout = awful.widget.layout.horizontal.leftright
+ },
+ mylayoutbox[s],
+ s == 1 and mysystray or nil,
+ mytextclock,
+ clockicon,
+ spacer,
+ separator,
+ volwidget,
+ volicon,
+ separator,
+ spacer,
+ cpuwidget,
+ --obvious.volume_alsa(),
+ mytasklist[s],
+ layout = awful.widget.layout.horizontal.rightleft
+ }
+end
+-- }}}
+
+
+root.buttons(awful.util.table.join(
+ awful.button({ }, 3, function () mymainmenu:toggle() end),
+ awful.button({ }, 4, awful.tag.viewnext),
+ awful.button({ }, 5, awful.tag.viewprev)
+))
+-- }}}
+
+-- {{{ Key bindings
+globalkeys = awful.util.table.join(
+ awful.key({ modkey, }, "Left", awful.tag.viewprev ),
+ awful.key({ modkey, }, "Right", awful.tag.viewnext ),
+ awful.key({ modkey, }, "Escape", awful.tag.history.restore),
+
+ awful.key({ modkey, }, "j",
+ function ()
+ awful.client.focus.byidx( 1)
+ if client.focus then client.focus:raise() end
+ end),
+ awful.key({ modkey, }, "k",
+ function ()
+ awful.client.focus.byidx(-1)
+ if client.focus then client.focus:raise() end
+ end),
+ awful.key({ modkey, }, "w", function () mymainmenu:show(true) end),
+
+ -- Layout manipulation
+ awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
+ awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
+ awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
+ awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
+ awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
+ awful.key({ modkey, }, "Tab",
+ function ()
+ awful.client.focus.history.previous()
+ if client.focus then
+ client.focus:raise()
+ end
+ end),
+
+ -- Standard program
+ awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
+ awful.key({ modkey, "Control" }, "r", awesome.restart),
+ awful.key({ modkey, "Shift" }, "q", awesome.quit),
+
+ awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
+ awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
+ awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
+ awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
+ awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
+ awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
+ awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
+ awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
+ awful.key({ modkey, }, "b", function() awful.util.spawn(browser) end),
+ -- awful.key({ modkey, }, "i", function() awful.util.spawn(icewe) end),
+ -- awful.key({ modkey }, "r", obvious.popup_run_prompt.run_prompt),
+ awful.key({ modkey, }, "c", function() awful.util.spawn(lock) end),
+ awful.key({ modkey, }, "t", function () awful.util.spawn(xterm) end),
+ awful.key({ modkey }, "i", function () awful.util.spawn(firefoxbeta) end),
+ awful.key({ modkey }, "o", function () awful.util.spawn(start) end),
+-- Prompt
+ awful.key({ modkey }, "F1", function () mypromptbox[mouse.screen]:run() end),
+ awful.key({}, "#123", function () awful.util.spawn("amixer -q sset Master 5+", false) end),
+ awful.key({}, "#122", function () awful.util.spawn("amixer -q sset Master 5-", false) end),
+ -- end),
+
+ awful.key({ modkey }, "F2",
+ function ()
+ awful.prompt.run({ prompt = "Run: " },
+ mypromptbox[mouse.screen].widget,
+ awful.util.spawn,
+ awful.completion.bash,
+ awful.util.getdir("cache") .. "/history")
+ end),
+
+ awful.key({ modkey }, "s",
+ function ()
+ awful.prompt.run({ prompt = "SSH: " },
+ mypromptbox[mouse.screen].widget,
+ function (s)
+ awful.util.spawn(terminal .. " -e ssh -p60 -l ipaddress " .. s)
+ end)
+ end),
+ -- Prompt
+ awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
+
+ awful.key({ modkey }, "x",
+ function ()
+ awful.prompt.run({ prompt = "Run Lua code: " },
+ mypromptbox[mouse.screen].widget,
+ awful.util.eval, nil,
+ awful.util.getdir("cache") .. "/history_eval")
+ end)
+)
+
+clientkeys = awful.util.table.join(
+ awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
+ awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
+ awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
+ awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
+ awful.key({ modkey, }, "o", awful.client.movetoscreen ),
+ awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
+ awful.key({ modkey, }, "n", function (c) c.minimized = not c.minimized end),
+ awful.key({ modkey, }, "m",
+ function (c)
+ c.maximized_horizontal = not c.maximized_horizontal
+ c.maximized_vertical = not c.maximized_vertical
+ end)
+)
+
+-- Compute the maximum number of digit we need, limited to 9
+keynumber = 0
+for s = 1, screen.count() do
+ keynumber = math.min(9, math.max(#tags[s], keynumber));
+end
+
+-- Bind all key numbers to tags.
+-- Be careful: we use keycodes to make it works on any keyboard layout.
+-- This should map on the top row of your keyboard, usually 1 to 9.
+for i = 1, keynumber do
+ globalkeys = awful.util.table.join(globalkeys,
+ awful.key({ modkey }, "#" .. i + 9,
+ function ()
+ local screen = mouse.screen
+ if tags[screen][i] then
+ awful.tag.viewonly(tags[screen][i])
+ end
+ end),
+ awful.key({ modkey, "Control" }, "#" .. i + 9,
+ function ()
+ local screen = mouse.screen
+ if tags[screen][i] then
+ awful.tag.viewtoggle(tags[screen][i])
+ end
+ end),
+ awful.key({ modkey, "Shift" }, "#" .. i + 9,
+ function ()
+ if client.focus and tags[client.focus.screen][i] then
+ awful.client.movetotag(tags[client.focus.screen][i])
+ end
+ end),
+ awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
+ function ()
+ if client.focus and tags[client.focus.screen][i] then
+ awful.client.toggletag(tags[client.focus.screen][i])
+ end
+ end))
+end
+
+clientbuttons = awful.util.table.join(
+ awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
+ awful.button({ modkey }, 1, awful.mouse.client.move),
+ awful.button({ modkey }, 3, awful.mouse.client.resize))
+
+-- Set keys
+root.keys(globalkeys)
+-- }}}
+
+-- {{{ Rules
+awful.rules.rules = {
+ -- All clients will match this rule.
+ { rule = { },
+ properties = { border_width = beautiful.border_width,
+ border_color = beautiful.border_normal,
+ focus = true,
+ keys = clientkeys,
+ buttons = clientbuttons } },
+ { rule = { class = "MPlayer" },
+ properties = { floating = true } },
+ { rule = { class = "pinentry" },
+ properties = { floating = true } },
+ { rule = { class = "gimp" },
+ properties = { floating = true } },
+ -- Set Firefox to always map on tags number 2 of screen 1.
+ { rule = { instance = "Navigator" },
+ properties = { tag = tags[1][2] } },
+ { rule = { instance = "Firefox" },
+ properties = { tag = tags[1][2] } },
+ { rule = { class = "VirtualBox" },
+ properties = { tag = tags[1][9] } },
+ { rule = { class = "Pidgin" },
+ properties = { tag = tags[1][5] } },
+ { rule = { class = "emesene" },
+ properties = { tag = tags[1][5] } },
+ { rule = { class = "Controler.py" },
+ properties = { tag = tags[1][5] } },
+ { rule = { instance = "weechat" },
+ properties = { tag = tags[1][9] } },
+ { rule = { class = "weechat 0.3.0" },
+ properties = { tag = tags[1][9] } },
+ { rule = { class = "weechat-curses" },
+ properties = { tag = tags[1][4] } },
+ { rule = { class = "Mail" },
+ properties = { tag = tags[1][6] } },
+ { rule = { class = "Thunderbird" },
+ properties = { tag = tags[1][6] } },
+ { rule = { class = "Skype" },
+ properties = { tag = tags[1][9] } },
+
+}
+-- }}}
+
+-- {{{ Signals
+-- Signal function to execute when a new client appears.
+client.add_signal("manage", function (c, startup)
+ -- Add a titlebar
+ -- awful.titlebar.add(c, { modkey = modkey })
+
+ -- Enable sloppy focus
+ c:add_signal("mouse::enter", function(c)
+ if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
+ and awful.client.focus.filter(c) then
+ client.focus = c
+ end
+ end)
+
+ if not startup then
+ -- Set the windows at the slave,
+ -- i.e. put it at the end of others instead of setting it master.
+ -- awful.client.setslave(c)
+
+ -- Put windows in a smart way, only if they does not set an initial position.
+ if not c.size_hints.user_position and not c.size_hints.program_position then
+ awful.placement.no_overlap(c)
+ awful.placement.no_offscreen(c)
+ end
+ end
+end)
+
+client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end)
+client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
+-- }}}
diff --git a/rc.lua-f b/3.4/rc.lua-f
similarity index 100%
rename from rc.lua-f
rename to 3.4/rc.lua-f
diff --git a/rc.lua.2 b/3.4/rc.lua.2
similarity index 100%
rename from rc.lua.2
rename to 3.4/rc.lua.2
diff --git a/rc.lua.30082011 b/3.4/rc.lua.30082011
similarity index 100%
rename from rc.lua.30082011
rename to 3.4/rc.lua.30082011
diff --git a/rc.lua.backup b/3.4/rc.lua.backup
similarity index 100%
rename from rc.lua.backup
rename to 3.4/rc.lua.backup
diff --git a/rc.lua.backup2410 b/3.4/rc.lua.backup2410
similarity index 100%
rename from rc.lua.backup2410
rename to 3.4/rc.lua.backup2410
diff --git a/rc.lua.backup2410.1 b/3.4/rc.lua.backup2410.1
similarity index 100%
rename from rc.lua.backup2410.1
rename to 3.4/rc.lua.backup2410.1
diff --git a/rc.lua.dual b/3.4/rc.lua.dual
similarity index 100%
rename from rc.lua.dual
rename to 3.4/rc.lua.dual
diff --git a/rc.lua.new b/3.4/rc.lua.new
similarity index 100%
rename from rc.lua.new
rename to 3.4/rc.lua.new
diff --git a/rc.lua~ b/3.4/rc.lua~
similarity index 100%
rename from rc.lua~
rename to 3.4/rc.lua~
diff --git a/rc2410.lua b/3.4/rc2410.lua
similarity index 100%
rename from rc2410.lua
rename to 3.4/rc2410.lua
diff --git a/scratchpad.lua b/3.4/scratchpad.lua
similarity index 100%
rename from scratchpad.lua
rename to 3.4/scratchpad.lua
diff --git a/teardrop.lua b/3.4/teardrop.lua
similarity index 100%
rename from teardrop.lua
rename to 3.4/teardrop.lua
diff --git a/zenburn.lua b/3.4/zenburn.lua
similarity index 100%
rename from zenburn.lua
rename to 3.4/zenburn.lua
diff --git a/blingbling b/blingbling
new file mode 160000
index 0000000..a8c5e68
--- /dev/null
+++ b/blingbling
@@ -0,0 +1 @@
+Subproject commit a8c5e68510f1d6e6505ddca327f2a8df7fe93274
diff --git a/icons/ac.png b/icons/ac.png
new file mode 100644
index 0000000..db33398
Binary files /dev/null and b/icons/ac.png differ
diff --git a/icons/bat-empty.png b/icons/bat-empty.png
new file mode 100644
index 0000000..c1c6e7a
Binary files /dev/null and b/icons/bat-empty.png differ
diff --git a/icons/bat-low.png b/icons/bat-low.png
new file mode 100644
index 0000000..25d806a
Binary files /dev/null and b/icons/bat-low.png differ
diff --git a/icons/bat.png b/icons/bat.png
index 37081f5..493a15d 100644
Binary files a/icons/bat.png and b/icons/bat.png differ
diff --git a/icons/clock.png b/icons/clock.png
new file mode 100644
index 0000000..c76752b
Binary files /dev/null and b/icons/clock.png differ
diff --git a/icons/pacman-open.png b/icons/pacman-open.png
new file mode 100644
index 0000000..745de53
Binary files /dev/null and b/icons/pacman-open.png differ
diff --git a/icons/pacman.png b/icons/pacman.png
index 466c34f..f466574 100644
Binary files a/icons/pacman.png and b/icons/pacman.png differ
diff --git a/icons/vol.png b/icons/vol.png
index 31b396f..ae25aca 100644
Binary files a/icons/vol.png and b/icons/vol.png differ
diff --git a/obvious b/obvious
deleted file mode 160000
index 71cf36f..0000000
--- a/obvious
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 71cf36fa106523a2a03d4c7906a00d3637836a21
diff --git a/rc.lua b/rc.lua
index cf7e258..eccc531 100644
--- a/rc.lua
+++ b/rc.lua
@@ -1,48 +1,63 @@
-- Standard awesome library
-require("awful")
+local gears = require("gears")
+local awful = require("awful")
+awful.rules = require("awful.rules")
require("awful.autofocus")
-require("awful.rules")
-
+-- Widget and layout library
+local wibox = require("wibox")
+local vicious = require("vicious")
-- Theme handling library
-require("beautiful")
+local beautiful = require("beautiful")
-- Notification library
-require("naughty")
-require("obvious")
---obvious
-require("obvious.popup_run_prompt")
---require("obvious.battery")
-require("obvious.wlan")
-require("obvious.clock")
-require("obvious.volume_alsa")
-require("obvious.net")
-
-require("vicious")
+local naughty = require("naughty")
+local menubar = require("menubar")
+local wi = require("wi")
-- Load Debian menu entries
require("debian.menu")
+-- {{{ Error handling
+-- Check if awesome encountered an error during startup and fell back to
+-- another config (This code will only ever execute for the fallback config)
+if awesome.startup_errors then
+ naughty.notify({ preset = naughty.config.presets.critical,
+ title = "Oops, there were errors during startup!",
+ text = awesome.startup_errors })
+end
+
+-- Handle runtime errors after startup
+do
+ local in_error = false
+ awesome.connect_signal("debug::error", function (err)
+ -- Make sure we don't go into an endless error loop
+ if in_error then return end
+ in_error = true
+
+ naughty.notify({ preset = naughty.config.presets.critical,
+ title = "Oops, an error happened!",
+ text = err })
+ in_error = false
+ end)
+end
+-- }}}
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
-beautiful.init("/usr/share/awesome/themes/default/theme.lua")
-
--- Variable with the config directory
-confdir = awful.util.getdir("config")
-
+-- beautiful.init(awful.util.getdir("config") .. "/themes/default/theme.lua")
+beautiful.init("/usr/share/awesome/themes/facu3/theme.lua")
-- This is used later as the default terminal and editor to run.
-terminal = "x-terminal-emulator"
+terminal = "urxvt"
+editor = os.getenv("EDITOR") or "vim"
+editor_cmd = terminal .. " -e " .. editor
+terminal = "urxvt"
editor = os.getenv("EDITOR") or "editor"
editor_cmd = terminal .. " -e " .. editor
browser = "nautilus --no-desktop --browser"
-initawesome = "sh /home/guerre/.awesomestart"
-icewe= "iceweasel"
lock= "xscreensaver-command -lock"
---lock= "sh /home/fguerrer/lock"
-xterm="xterm"
+xterm="xterm -fg gray100 -fa Mono -fs 10"
weechat = terminal .. " -name weechat -e weechat-curses"
-firefoxbeta="sh /home/guerre/Descargas/firefox/firefox"
-start="sh /home/guerre/.awesomestart"
---brilloup= "sh /home/guerre/scripts/video_brightnessup.sh"
---brillodown= "sh /home/guerre/scripts/video_brightnessdown.sh"
+iceweasel="/home/guerre/bin/firefox.sh"
+olx_ssh="urxvt -e ssh olx"
+olx_chroot="urxvt -name Terminal -e sudo dchroot -qd su - guerre"
-- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt.
@@ -52,104 +67,95 @@ start="sh /home/guerre/.awesomestart"
modkey = "Mod4"
-- Table of layouts to cover with awful.layout.inc, order matters.
-layouts =
+local layouts =
{
awful.layout.suit.tile,
awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
- awful.layout.suit.fair,
- awful.layout.suit.fair.horizontal,
- awful.layout.suit.spiral,
- awful.layout.suit.spiral.dwindle,
- awful.layout.suit.max,
- awful.layout.suit.max.fullscreen,
- awful.layout.suit.magnifier,
awful.layout.suit.floating
}
-- }}}
--- {{{ Tags
--- Define a tag table which hold all screen tags.
-
--- **************************************
+-- {{{ Wallpaper
+if beautiful.wallpaper then
+ for s = 1, screen.count() do
+ gears.wallpaper.maximized(beautiful.wallpaper, s, true)
+ end
+end
+-- }}}
+
-- {{{ Tags
-- Define a tag table which hold all screen tags.
tags = {}
-tags.settings = {
- { name = "1", layout = layouts[5] },
- { name = "2", layout = layouts[9] },
- { name = "3", layout = layouts[1] },
- { name = "4", layout = layouts[1] },
- { name = "5", layout = layouts[12] },
- { name = "6", layout = layouts[12] },
- { name = "7", layout = layouts[12] },
- { name = "8", layout = layouts[3] },
- { name = "9", layout = layouts[1] }
-}
-
for s = 1, screen.count() do
- tags[s] = {}
- for i, v in ipairs(tags.settings) do
- tags[s][i] = tag({ name = v.name })
- tags[s][i].screen = s
- awful.tag.setproperty(tags[s][i], "layout", v.layout)
- end
- tags[s][1].selected = true
+ -- Each screen has its own tag table.
+ tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1])
end
-- }}}
-
-
-- {{{ Menu
-- Create a laucher widget and a main menu
myawesomemenu = {
{ "manual", terminal .. " -e man awesome" },
- { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
+ { "edit config", editor_cmd .. " " .. awesome.conffile },
{ "restart", awesome.restart },
{ "quit", awesome.quit }
}
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
- { "Debian", debian.menu.Debian_menu.Debian },
+ { "Debian", debian.menu.Debian_menu.Debian },
+ {"iceweasel", "iceweasel.sh"},
+ {"chromium", "chromium.sh"},
+ {"geany", "geany"},
+ {"vim", editor_cmd},
{ "open terminal", terminal }
}
})
-mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
+mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
menu = mymainmenu })
+
+-- Menubar configuration
+menubar.utils.terminal = terminal -- Set the terminal for applications that require it
-- }}}
--- Reusable separators.
-spacer = widget({ type = "textbox", name = "spacer" })
-separator = widget({ type = "textbox", name = "separator" })
-spacer.text = " "
-separator.text = "|"
---clock
-clockicon = widget({ type = "imagebox", name = "clockicon"})
-clockicon.image = image(confdir.."/icons/time.png")
-
--- Volúmen Alsa
- volicon = widget({ type = "imagebox" })
- volicon.image = image(confdir.."/icons/vol.png")
- volwidget = widget({ type = "textbox" })
- vicious.register(volwidget, vicious.widgets.volume, " Vol: $1% ", 2, "PCM")
-
--- Mouse-Buttons
-volicon:buttons(awful.util.table.join(
-awful.button({ }, 1, function () awful.util.spawn("amixer -q sset PCM toggle", false) end),
-awful.button({ }, 4, function () awful.util.spawn("amixer -q sset PCM 1%+",false) end),
-awful.button({ }, 5, function () awful.util.spawn("amixer -q sset PCM 1%-",false) end)))
-
---
+-- {{{ Wibox
--- }}}
-- Create a textclock widget
-mytextclock = awful.widget.textclock({ align = "right" })
+clockicon = wibox.widget.imagebox()
+clockicon:set_image("/home/guerre/.config/awesome/icons/clock.png")
+mytextclock = awful.widget.textclock()
+
+-- Seperation
+spacer = wibox.widget.textbox()
+spacer:set_markup(" ")
+seperator = wibox.widget.textbox()
+seperator:set_markup("|")
+dash = wibox.widget.textbox()
+dash:set_markup("-")
+
+-- Volume Widget
+volicon = wibox.widget.imagebox()
+volicon:set_image("/home/guerre/.config/awesome/icons/vol.png")
+volwidget = wibox.widget.textbox()
+vicious.register(volwidget, vicious.widgets.volume, " $1% ", 2, "Master")
+
+-- Wifi Widget
+wifiicon = wibox.widget.imagebox()
+wifiicon:set_image("/home/guerre/.config/awesome/icons/wifi.png")
+wifiwidget = wibox.widget.textbox()
+vicious.register(wifiwidget, vicious.widgets.wifi, " ${link}%", 5, "wlan0")
+
+-- -- Create a battery widget
+baticon = wibox.widget.imagebox()
+baticon:set_image("/home/guerre/.config/awesome/icons/bat.png")
+-- -- Initialize widget
+batwidget = wibox.widget.textbox()
+-- -- Register widget
+vicious.register(batwidget, vicious.widgets.bat, "$1$2", 32, "BAT1")
--- Create a systray
-mysystray = widget({ type = "systray" })
-- Create a wibox for each screen and add it
mywibox = {}
@@ -161,17 +167,26 @@ mytaglist.buttons = awful.util.table.join(
awful.button({ modkey }, 1, awful.client.movetotag),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, awful.client.toggletag),
- awful.button({ }, 4, awful.tag.viewnext),
- awful.button({ }, 5, awful.tag.viewprev)
- )
+ awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
+ awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end))
+
mytasklist = {}
mytasklist.buttons = awful.util.table.join(
awful.button({ }, 1, function (c)
- if not c:isvisible() then
- awful.tag.viewonly(c:tags()[1])
+ if c == client.focus then
+ c.minimized = true
+ else
+ -- Without this, the following
+ -- :isvisible() makes no sense
+ c.minimized = false
+ if not c:isvisible() then
+ awful.tag.viewonly(c:tags()[1])
+ end
+ -- This will also un-minimize
+ -- the client, if needed
+ client.focus = c
+ c:raise()
end
- client.focus = c
- c:raise()
end),
awful.button({ }, 3, function ()
if instance then
@@ -192,7 +207,7 @@ mytasklist.buttons = awful.util.table.join(
for s = 1, screen.count() do
-- Create a promptbox for each screen
- mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
+ mypromptbox[s] = awful.widget.prompt()
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
mylayoutbox[s] = awful.widget.layoutbox(s)
@@ -202,42 +217,54 @@ for s = 1, screen.count() do
awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
-- Create a taglist widget
- mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
+ mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)
-- Create a tasklist widget
- mytasklist[s] = awful.widget.tasklist(function(c)
- return awful.widget.tasklist.label.currenttags(c, s)
- end, mytasklist.buttons)
+ mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
-- Create the wibox
- mywibox[s] = awful.wibox({ position = "top", screen = s })
- -- Add widgets to the wibox - order matters
- mywibox[s].widgets = {
- {
- mylauncher,
- mytaglist[s],
- mypromptbox[s],
- layout = awful.widget.layout.horizontal.leftright
- },
- mylayoutbox[s],
- s == 1 and mysystray or nil,
- mytextclock,
- clockicon,
- spacer,
- separator,
- volwidget,
- volicon,
- separator,
- spacer,
- cpuwidget,
- --obvious.volume_alsa(),
- mytasklist[s],
- layout = awful.widget.layout.horizontal.rightleft
- }
+ mywibox[s] = awful.wibox({ position = "top", height = "16", screen = s })
+
+ -- Widgets that are aligned to the left
+ local left_layout = wibox.layout.fixed.horizontal()
+ left_layout:add(mylauncher)
+ left_layout:add(mytaglist[s])
+ left_layout:add(spacer)
+ left_layout:add(mypromptbox[s])
+
+ -- Widgets that are aligned to the right
+ local right_layout = wibox.layout.fixed.horizontal()
+ right_layout:add(wifiicon)
+ right_layout:add(wifiwidget)
+ right_layout:add(spacer)
+ right_layout:add(cpuicon)
+ right_layout:add(cpuwidget)
+ right_layout:add(spacer)
+ right_layout:add(memicon)
+ right_layout:add(memused)
+ right_layout:add(spacer)
+ right_layout:add(baticon)
+ right_layout:add(batpct)
+ right_layout:add(spacer)
+ right_layout:add(volicon)
+ right_layout:add(volpct)
+ right_layout:add(spacer)
+ right_layout:add(clockicon)
+ right_layout:add(mytextclock)
+ if s == 1 then right_layout:add(wibox.widget.systray()) end
+ right_layout:add(mylayoutbox[s])
+
+ -- Now bring it all together (with the tasklist in the middle)
+ local layout = wibox.layout.align.horizontal()
+ layout:set_left(left_layout)
+ layout:set_middle(mytasklist[s])
+ layout:set_right(right_layout)
+
+ mywibox[s]:set_widget(layout)
end
-- }}}
-
+-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext),
@@ -261,7 +288,17 @@ globalkeys = awful.util.table.join(
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end),
- awful.key({ modkey, }, "w", function () mymainmenu:show(true) end),
+
+ awful.key({ modkey, }, "a", function () mymainmenu:show() end),
+ awful.key({ }, "Print", function () awful.util.spawn("scrot /home/guerre/Pictures/screenshots/%Y-%m-%d-%T-screenshot.png") end),
+
+ awful.key({ }, "XF86AudioRaiseVolume", function ()
+ awful.util.spawn("amixer set Master 2%+", false) end),
+ awful.key({ }, "XF86AudioLowerVolume", function ()
+ awful.util.spawn("amixer set Master 2%-", false) end),
+ awful.key({ }, "XF86AudioMute", function ()
+ awful.util.spawn("amixer sset Master toggle", false) end),
+
-- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
@@ -277,49 +314,32 @@ globalkeys = awful.util.table.join(
end
end),
+ -- CUSTOM
+
+ awful.key({ },"#156", function() awful.util.spawn(lock) end),
+ awful.key({ modkey, }, "t", function () awful.util.spawn(xterm) end),
+ awful.key({ modkey }, "i", function () awful.util.spawn(iceweasel) end),
+ awful.key({ modkey }, "c", function () awful.util.spawn(olx_chroot) end),
+ awful.key({ modkey }, "s", function () awful.util.spawn(olx_ssh) end),
+
+
+
-- Standard program
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
awful.key({ modkey, "Control" }, "r", awesome.restart),
awful.key({ modkey, "Shift" }, "q", awesome.quit),
- awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
- awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
+ awful.key({ modkey, }, "v", function () awful.tag.incmwfact( 0.05) end),
+ awful.key({ modkey, }, "w", function () awful.tag.incmwfact(-0.05) end),
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
- awful.key({ modkey, }, "b", function() awful.util.spawn(browser) end),
- -- awful.key({ modkey, }, "i", function() awful.util.spawn(icewe) end),
- -- awful.key({ modkey }, "r", obvious.popup_run_prompt.run_prompt),
- awful.key({ modkey, }, "c", function() awful.util.spawn(lock) end),
- awful.key({ modkey, }, "t", function () awful.util.spawn(xterm) end),
- awful.key({ modkey }, "i", function () awful.util.spawn(firefoxbeta) end),
- awful.key({ modkey }, "o", function () awful.util.spawn(start) end),
--- Prompt
- awful.key({ modkey }, "F1", function () mypromptbox[mouse.screen]:run() end),
- awful.key({}, "#123", function () awful.util.spawn("amixer -q sset Master 5+", false) end),
- awful.key({}, "#122", function () awful.util.spawn("amixer -q sset Master 5-", false) end),
- -- end),
-
- awful.key({ modkey }, "F2",
- function ()
- awful.prompt.run({ prompt = "Run: " },
- mypromptbox[mouse.screen].widget,
- awful.util.spawn,
- awful.completion.bash,
- awful.util.getdir("cache") .. "/history")
- end),
- awful.key({ modkey }, "s",
- function ()
- awful.prompt.run({ prompt = "SSH: " },
- mypromptbox[mouse.screen].widget,
- function (s)
- awful.util.spawn(terminal .. " -e ssh -p60 -l ipaddress " .. s)
- end)
- end),
+ awful.key({ modkey, "Control" }, "n", awful.client.restore),
+
-- Prompt
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
@@ -329,7 +349,9 @@ globalkeys = awful.util.table.join(
mypromptbox[mouse.screen].widget,
awful.util.eval, nil,
awful.util.getdir("cache") .. "/history_eval")
- end)
+ end),
+ -- Menubar
+ awful.key({ modkey }, "p", function() menubar.show() end)
)
clientkeys = awful.util.table.join(
@@ -338,8 +360,13 @@ clientkeys = awful.util.table.join(
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
- awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
- awful.key({ modkey, }, "n", function (c) c.minimized = not c.minimized end),
+ awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
+ awful.key({ modkey, }, "n",
+ function (c)
+ -- The client currently has the input focus, so it cannot be
+ -- minimized, since minimized clients can't have the focus.
+ c.minimized = true
+ end),
awful.key({ modkey, }, "m",
function (c)
c.maximized_horizontal = not c.maximized_horizontal
@@ -350,7 +377,7 @@ clientkeys = awful.util.table.join(
-- 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));
+ keynumber = math.min(9, math.max(#tags[s], keynumber))
end
-- Bind all key numbers to tags.
@@ -399,54 +426,37 @@ root.keys(globalkeys)
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
- properties = { border_width = beautiful.border_width,
+ properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
- focus = true,
- keys = clientkeys,
- buttons = clientbuttons } },
- { rule = { class = "MPlayer" },
- properties = { floating = true } },
- { rule = { class = "pinentry" },
- properties = { floating = true } },
- { rule = { class = "gimp" },
- properties = { floating = true } },
- -- Set Firefox to always map on tags number 2 of screen 1.
- { rule = { instance = "Navigator" },
- properties = { tag = tags[1][2] } },
- { rule = { instance = "Firefox" },
- properties = { tag = tags[1][2] } },
- { rule = { class = "VirtualBox" },
- properties = { tag = tags[1][9] } },
- { rule = { class = "Pidgin" },
- properties = { tag = tags[1][5] } },
- { rule = { class = "emesene" },
- properties = { tag = tags[1][5] } },
- { rule = { class = "Controler.py" },
- properties = { tag = tags[1][5] } },
- { rule = { instance = "weechat" },
- properties = { tag = tags[1][9] } },
- { rule = { class = "weechat 0.3.0" },
- properties = { tag = tags[1][9] } },
- { rule = { class = "weechat-curses" },
- properties = { tag = tags[1][4] } },
- { rule = { class = "Mail" },
- properties = { tag = tags[1][6] } },
- { rule = { class = "Thunderbird" },
- properties = { tag = tags[1][6] } },
- { rule = { class = "Skype" },
- properties = { tag = tags[1][9] } },
+ size_hints_honor = false,
+ focus = awful.client.focus.filter,
+ keys = clientkeys, } },
+ { rule = { class = "MPlayer" }, properties = { floating = true } },
+ { rule = { class = "pinentry" }, properties = { floating = true } },
+ { rule = { class = "gimp" }, properties = { floating = true } },
+ { rule = { instance = "Navigator" }, properties = { tag = tags[1][2] } },
+ { rule = { instance = "Firefox" }, properties = { tag = tags[1][2] } },
+ { rule = { class = "Iceweasel" }, properties = { tag = tags[1][2] } },
+ { rule = { class = "VirtualBox" }, properties = { tag = tags[1][7] } },
+ { rule = { class = "Pidgin" }, properties = { tag = tags[1][5] } },
+ { rule = { instance = "weechat" }, properties = { tag = tags[1][9] } },
+ { rule = { class = "weechat 0.3.0" }, properties = { tag = tags[1][9] } },
+ { rule = { class = "weechat-curses" }, properties = { tag = tags[1][9] } },
+ { rule = { class = "Mail" }, properties = { tag = tags[2][6] } },
+ { rule = { class = "Thunderbird" }, properties = { tag = tags[2][6] } },
+ { rule = { class = "Icedove" }, properties = { tag = tags[2][6] } },
+ { rule = { class = "Msgcompose" }, properties = { tag = tags[2][6] } },
+ { rule = { class = "Skype" }, properties = { tag = tags[1][8] } },
}
+
-- }}}
-- {{{ Signals
-- Signal function to execute when a new client appears.
-client.add_signal("manage", function (c, startup)
- -- Add a titlebar
- -- awful.titlebar.add(c, { modkey = modkey })
-
+client.connect_signal("manage", function (c, startup)
-- Enable sloppy focus
- c:add_signal("mouse::enter", function(c)
+ c:connect_signal("mouse::enter", function(c)
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
and awful.client.focus.filter(c) then
client.focus = c
@@ -458,14 +468,69 @@ client.add_signal("manage", function (c, startup)
-- i.e. put it at the end of others instead of setting it master.
-- awful.client.setslave(c)
- -- Put windows in a smart way, only if they does not set an initial position.
+ -- Put windows in a smart way, only if they do not set an initial position.
if not c.size_hints.user_position and not c.size_hints.program_position then
awful.placement.no_overlap(c)
awful.placement.no_offscreen(c)
end
end
+
+ local titlebars_enabled = false
+ if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
+ -- Widgets that are aligned to the left
+ local left_layout = wibox.layout.fixed.horizontal()
+ left_layout:add(awful.titlebar.widget.iconwidget(c))
+
+ -- Widgets that are aligned to the right
+ local right_layout = wibox.layout.fixed.horizontal()
+ right_layout:add(awful.titlebar.widget.floatingbutton(c))
+ right_layout:add(awful.titlebar.widget.maximizedbutton(c))
+ right_layout:add(awful.titlebar.widget.stickybutton(c))
+ right_layout:add(awful.titlebar.widget.ontopbutton(c))
+ right_layout:add(awful.titlebar.widget.closebutton(c))
+
+ -- The title goes in the middle
+ local title = awful.titlebar.widget.titlewidget(c)
+ title:buttons(awful.util.table.join(
+ awful.button({ }, 1, function()
+ client.focus = c
+ c:raise()
+ awful.mouse.client.move(c)
+ end),
+ awful.button({ }, 3, function()
+ client.focus = c
+ c:raise()
+ awful.mouse.client.resize(c)
+ end)
+ ))
+
+ -- Now bring it all together
+ local layout = wibox.layout.align.horizontal()
+ layout:set_left(left_layout)
+ layout:set_right(right_layout)
+ layout:set_middle(title)
+
+ awful.titlebar(c):set_widget(layout)
+ end
end)
-client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end)
-client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
+client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
+client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}
+
+function run_once(prg)
+ awful.util.spawn_with_shell("pgrep -u $USER -x " .. prg .. " || (" .. prg .. ")")
+end
+
+
+do
+ local cmds =
+ {
+ run_once("/usr/local/bin/trackpoint"),
+ run_once("/usr/bin/xscreensaver &"),
+ run_once("setxkbmap us altgr-intl compose:menu"),
+ run_once("unclutter"),
+ }
+
+ awful.util.spawn(i)
+ end
diff --git a/rc.lua-wicd b/rc.lua-wicd
new file mode 100644
index 0000000..cc6eb0b
--- /dev/null
+++ b/rc.lua-wicd
@@ -0,0 +1,595 @@
+-- Standard awesome library
+local gears = require("gears")
+local awful = require("awful")
+awful.rules = require("awful.rules")
+require("awful.autofocus")
+-- Widget and layout library
+local wibox = require("wibox")
+local vicious = require("vicious")
+-- Theme handling library
+local beautiful = require("beautiful")
+-- Notification library
+local naughty = require("naughty")
+local menubar = require("menubar")
+local wi = require("wi")
+-- Load Debian menu entries
+require("debian.menu")
+-- {{{ Error handling
+-- Check if awesome encountered an error during startup and fell back to
+-- another config (This code will only ever execute for the fallback config)
+if awesome.startup_errors then
+ naughty.notify({ preset = naughty.config.presets.critical,
+ title = "Oops, there were errors during startup!",
+ text = awesome.startup_errors })
+end
+
+-- Handle runtime errors after startup
+do
+ local in_error = false
+ awesome.connect_signal("debug::error", function (err)
+ -- Make sure we don't go into an endless error loop
+ if in_error then return end
+ in_error = true
+
+ naughty.notify({ preset = naughty.config.presets.critical,
+ title = "Oops, an error happened!",
+ text = err })
+ in_error = false
+ end)
+end
+-- }}}
+
+-- {{{ Variable definitions
+-- Themes define colours, icons, and wallpapers
+-- beautiful.init(awful.util.getdir("config") .. "/themes/default/theme.lua")
+beautiful.init("/usr/share/awesome/themes/facu3/theme.lua")
+
+-- This is used later as the default terminal and editor to run.
+terminal = "urxvt"
+editor = os.getenv("EDITOR") or "vim"
+editor_cmd = terminal .. " -e " .. editor
+terminal = "urxvt"
+editor = os.getenv("EDITOR") or "editor"
+editor_cmd = terminal .. " -e " .. editor
+browser = "nautilus --no-desktop --browser"
+lock= "xscreensaver-command -lock"
+xterm="xterm -fg gray100 -fa Mono -fs 10"
+weechat = terminal .. " -name weechat -e weechat-curses"
+iceweasel="/home/guerre/bin/firefox.sh"
+olx_ssh="urxvt -e ssh olx"
+olx_chroot="urxvt -name Terminal -e sudo dchroot -qd su - guerre"
+
+-- 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.
+local layouts =
+{
+ awful.layout.suit.tile,
+ awful.layout.suit.tile.left,
+ awful.layout.suit.tile.bottom,
+ awful.layout.suit.tile.top,
+ awful.layout.suit.floating
+}
+-- }}}
+
+-- {{{ Wallpaper
+if beautiful.wallpaper then
+ for s = 1, screen.count() do
+ gears.wallpaper.maximized(beautiful.wallpaper, s, true)
+ end
+end
+-- }}}
+
+-- {{{ Tags
+-- Define a tag table which hold all screen tags.
+tags = {}
+for s = 1, screen.count() do
+ -- Each screen has its own tag table.
+ tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1])
+end
+-- }}}
+
+-- {{{ Menu
+-- Create a laucher widget and a main menu
+myawesomemenu = {
+ { "manual", terminal .. " -e man awesome" },
+ { "edit config", editor_cmd .. " " .. awesome.conffile },
+ { "restart", awesome.restart },
+ { "quit", awesome.quit }
+}
+
+mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
+ { "Debian", debian.menu.Debian_menu.Debian },
+ {"iceweasel", "iceweasel.sh"},
+ {"chromium", "chromium.sh"},
+ {"geany", "geany"},
+ {"vim", editor_cmd},
+ { "open terminal", terminal }
+ }
+ })
+
+mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
+ menu = mymainmenu })
+
+-- Menubar configuration
+menubar.utils.terminal = terminal -- Set the terminal for applications that require it
+-- }}}
+
+-- {{{ Wibox
+
+-- Create a textclock widget
+clockicon = wibox.widget.imagebox()
+clockicon:set_image("/home/guerre/.config/awesome/icons/clock.png")
+mytextclock = awful.widget.textclock()
+
+-- Seperation
+spacer = wibox.widget.textbox()
+spacer:set_markup(" ")
+seperator = wibox.widget.textbox()
+seperator:set_markup("|")
+dash = wibox.widget.textbox()
+dash:set_markup("-")
+
+-- Volume Widget
+volicon = wibox.widget.imagebox()
+volicon:set_image("/home/guerre/.config/awesome/icons/vol.png")
+volwidget = wibox.widget.textbox()
+vicious.register(volwidget, vicious.widgets.volume, " $1% ", 2, "Master")
+
+-- Wifi Widget
+wifiicon = wibox.widget.imagebox()
+wifiicon:set_image("/home/guerre/.config/awesome/icons/wifi.png")
+wifiwidget = wibox.widget.textbox()
+vicious.register(wifiwidget, vicious.widgets.wifi, " ${link}%", 5, "wlan0")
+
+-- -- Create a battery widget
+baticon = wibox.widget.imagebox()
+baticon:set_image("/home/guerre/.config/awesome/icons/bat.png")
+-- -- Initialize widget
+batwidget = wibox.widget.textbox()
+-- -- Register widget
+vicious.register(batwidget, vicious.widgets.bat, "$1$2", 32, "BAT1")
+
+
+
+-- {{{ Net Widget
+local wicd = require("wicd")
+local blingbling = require("blingbling")
+
+net = wibox.widget.textbox()
+netwidget = blingbling.net({interface = 'wlan0', show_text = true, background_color = "#070707", text_color = "#aaaaaa", graph_color = "#ffffff", graph_line_color = "#00000000", background_graph_color = "#070707", background_text_color = "#00000000", font = "termsyn", font_size = "11"})
+net_t = awful.tooltip({ objects = { net, netwidget }})
+
+vicious.register(net, vicious.widgets.wifi,
+function (widget, args)
+tor = ''
+if (awful.util.pread("ip route show") ~= '') then -- FIXME do it with another way :/
+ip_addr = (string.match(string.match(awful.util.pread("ip route show"),"%ssrc%s[%d]+%.[d%]+%.[%d]+%.[%d]+"), "[%d]+%.[d%]+%.[%d]+%.[%d]+")) or ''
+gateway = (string.match(awful.util.pread("ip r | awk '/^def/{print $3}'"), "[%d]+%.[d%]+%.[%d]+%.[%d]+")) or ''
+ext_ip = (string.match(awful.util.pread("curl --silent --connect-timeout 3 -S http://ipecho.net/plain 2>&1"), "[%d]+%.[d%]+%.[%d]+%.[%d]+")) or ''
+tor_ip = (string.match(awful.util.pread("curl --silent -S -x socks4a://localhost:9050 http://ipecho.net/plain 2>&1"), "[%d]+%.[d%]+%.[%d]+%.[%d]+")) or '' -- FIXME awesome hang when tor is running
+if tor_ip ~= '' then
+ tor = "\nTor IP: " .. tor_ip
+end
+else
+ip_addr = 'N/A'
+gateway = 'N/A'
+ext_ip = 'N/A'
+end
+if args["{ssid}"] ~= "N/A" then
+ netwidget:set_interface(wlan)
+ net_t:set_text("" .. args["{ssid}"] .. " " .. args["{linp}"] .. "%\nLAN IP: " .. ip_addr .. "\nGateway: " .. gateway .. "\nWAN IP: " .. ext_ip .. tor)
+ if args["{linp}"] >= 75 then
+ return " "ƥ "
+ elseif args["{linp}"] >= 40 then
+ return " Ʀ "
+ elseif args["{linp}"] >= 20 then
+ return " Ƨ "
+ else
+ return " ƨ "
+ end
+else
+ if ip_addr == 'N/A' then
+ netwidget:set_interface(nil)
+ net_t:set_text("no connection")
+ return " Ɨ "
+ else
+ netwidget:set_interface(eth)
+ net_t:set_text("Wired\nLAN IP: " .. ip_addr .. "\nGateway: " .. gateway .. "\nWAN IP: " .. ext_ip .. tor)
+ return " Ƥ "
+ end
+end
+end, 5, wlan)
+net_t:add_to_object(net)
+net_t:add_to_object(netwidget)
+
+netwidget:buttons(net:buttons(awful.util.table.join(awful.button({ }, 1, function () wicd.launch() end),
+ awful.button({ altkey }, 1, function () awful.util.spawn("wicd-client -n") end),
+ awful.button({ }, 3, function () wicd.toggle() end) )))
+
+-- }}}
+
+
+
+-- Create a wibox for each screen and add it
+mywibox = {}
+mypromptbox = {}
+mylayoutbox = {}
+mytaglist = {}
+mytaglist.buttons = awful.util.table.join(
+ awful.button({ }, 1, awful.tag.viewonly),
+ awful.button({ modkey }, 1, awful.client.movetotag),
+ awful.button({ }, 3, awful.tag.viewtoggle),
+ awful.button({ modkey }, 3, awful.client.toggletag),
+ awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
+ awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end))
+
+mytasklist = {}
+mytasklist.buttons = awful.util.table.join(
+ awful.button({ }, 1, function (c)
+ if c == client.focus then
+ c.minimized = true
+ else
+ -- Without this, the following
+ -- :isvisible() makes no sense
+ c.minimized = false
+ if not c:isvisible() then
+ awful.tag.viewonly(c:tags()[1])
+ end
+ -- This will also un-minimize
+ -- the client, if needed
+ client.focus = c
+ c:raise()
+ end
+ end),
+ awful.button({ }, 3, function ()
+ if instance then
+ instance:hide()
+ instance = nil
+ else
+ instance = awful.menu.clients({ width=250 })
+ end
+ end),
+ awful.button({ }, 4, function ()
+ awful.client.focus.byidx(1)
+ if client.focus then client.focus:raise() end
+ end),
+ awful.button({ }, 5, function ()
+ awful.client.focus.byidx(-1)
+ if client.focus then client.focus:raise() end
+ end))
+
+for s = 1, screen.count() do
+ -- Create a promptbox for each screen
+ mypromptbox[s] = awful.widget.prompt()
+ -- Create an imagebox widget which will contains an icon indicating which layout we're using.
+ -- We need one layoutbox per screen.
+ mylayoutbox[s] = awful.widget.layoutbox(s)
+ mylayoutbox[s]:buttons(awful.util.table.join(
+ awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
+ awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
+ awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
+ awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
+ -- Create a taglist widget
+ mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)
+
+ -- Create a tasklist widget
+ mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
+
+ -- Create the wibox
+ mywibox[s] = awful.wibox({ position = "top", height = "16", screen = s })
+
+ -- Widgets that are aligned to the left
+ local left_layout = wibox.layout.fixed.horizontal()
+ left_layout:add(mylauncher)
+ left_layout:add(mytaglist[s])
+ left_layout:add(spacer)
+ left_layout:add(mypromptbox[s])
+
+ -- Widgets that are aligned to the right
+ local right_layout = wibox.layout.fixed.horizontal()
+ right_layout:add(wifiicon)
+ right_layout:add(wifiwidget)
+ right_layout:add(spacer)
+ right_layout:add(cpuicon)
+ right_layout:add(cpuwidget)
+ right_layout:add(spacer)
+ right_layout:add(memicon)
+ right_layout:add(memused)
+ right_layout:add(spacer)
+ right_layout:add(baticon)
+ right_layout:add(batpct)
+ right_layout:add(spacer)
+ right_layout:add(volicon)
+ right_layout:add(volpct)
+ right_layout:add(spacer)
+ right_layout:add(clockicon)
+ right_layout:add(mytextclock)
+ if s == 1 then right_layout:add(wibox.widget.systray()) end
+ right_layout:add(mylayoutbox[s])
+
+ -- Now bring it all together (with the tasklist in the middle)
+ local layout = wibox.layout.align.horizontal()
+ layout:set_left(left_layout)
+ layout:set_middle(mytasklist[s])
+ layout:set_right(right_layout)
+
+ mywibox[s]:set_widget(layout)
+end
+-- }}}
+
+-- {{{ Mouse bindings
+root.buttons(awful.util.table.join(
+ awful.button({ }, 3, function () mymainmenu:toggle() end),
+ awful.button({ }, 4, awful.tag.viewnext),
+ awful.button({ }, 5, awful.tag.viewprev)
+))
+-- }}}
+
+-- {{{ Key bindings
+globalkeys = awful.util.table.join(
+ awful.key({ modkey, }, "Left", awful.tag.viewprev ),
+ awful.key({ modkey, }, "Right", awful.tag.viewnext ),
+ awful.key({ modkey, }, "Escape", awful.tag.history.restore),
+
+ awful.key({ modkey, }, "j",
+ function ()
+ awful.client.focus.byidx( 1)
+ if client.focus then client.focus:raise() end
+ end),
+ awful.key({ modkey, }, "k",
+ function ()
+ awful.client.focus.byidx(-1)
+ if client.focus then client.focus:raise() end
+ end),
+
+ awful.key({ modkey, }, "a", function () mymainmenu:show() end),
+ awful.key({ }, "Print", function () awful.util.spawn("scrot /home/guerre/Pictures/screenshots/%Y-%m-%d-%T-screenshot.png") end),
+
+ awful.key({ }, "XF86AudioRaiseVolume", function ()
+ awful.util.spawn("amixer set Master 2%+", false) end),
+ awful.key({ }, "XF86AudioLowerVolume", function ()
+ awful.util.spawn("amixer set Master 2%-", false) end),
+ awful.key({ }, "XF86AudioMute", function ()
+ awful.util.spawn("amixer sset Master toggle", false) end),
+
+
+ -- Layout manipulation
+ awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
+ awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
+ awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
+ awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
+ awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
+ awful.key({ modkey, }, "Tab",
+ function ()
+ awful.client.focus.history.previous()
+ if client.focus then
+ client.focus:raise()
+ end
+ end),
+
+ -- CUSTOM
+
+ awful.key({ },"#156", function() awful.util.spawn(lock) end),
+ awful.key({ modkey, }, "t", function () awful.util.spawn(xterm) end),
+ awful.key({ modkey }, "i", function () awful.util.spawn(iceweasel) end),
+ awful.key({ modkey }, "c", function () awful.util.spawn(olx_chroot) end),
+ awful.key({ modkey }, "s", function () awful.util.spawn(olx_ssh) end),
+
+
+
+ -- Standard program
+ awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
+ awful.key({ modkey, "Control" }, "r", awesome.restart),
+ awful.key({ modkey, "Shift" }, "q", awesome.quit),
+
+ awful.key({ modkey, }, "v", function () awful.tag.incmwfact( 0.05) end),
+ awful.key({ modkey, }, "w", function () awful.tag.incmwfact(-0.05) end),
+ awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
+ awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
+ awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
+ awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
+ awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
+ awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
+
+ awful.key({ modkey, "Control" }, "n", awful.client.restore),
+
+ -- Prompt
+ awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
+
+ awful.key({ modkey }, "x",
+ function ()
+ awful.prompt.run({ prompt = "Run Lua code: " },
+ mypromptbox[mouse.screen].widget,
+ awful.util.eval, nil,
+ awful.util.getdir("cache") .. "/history_eval")
+ end),
+ -- Menubar
+ awful.key({ modkey }, "p", function() menubar.show() end)
+)
+
+clientkeys = awful.util.table.join(
+ awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
+ awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
+ awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
+ awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
+ awful.key({ modkey, }, "o", awful.client.movetoscreen ),
+ awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
+ awful.key({ modkey, }, "n",
+ function (c)
+ -- The client currently has the input focus, so it cannot be
+ -- minimized, since minimized clients can't have the focus.
+ c.minimized = true
+ end),
+ awful.key({ modkey, }, "m",
+ function (c)
+ c.maximized_horizontal = not c.maximized_horizontal
+ c.maximized_vertical = not c.maximized_vertical
+ end)
+)
+
+-- Compute the maximum number of digit we need, limited to 9
+keynumber = 0
+for s = 1, screen.count() do
+ keynumber = math.min(9, math.max(#tags[s], keynumber))
+end
+
+-- Bind all key numbers to tags.
+-- Be careful: we use keycodes to make it works on any keyboard layout.
+-- This should map on the top row of your keyboard, usually 1 to 9.
+for i = 1, keynumber do
+ globalkeys = awful.util.table.join(globalkeys,
+ awful.key({ modkey }, "#" .. i + 9,
+ function ()
+ local screen = mouse.screen
+ if tags[screen][i] then
+ awful.tag.viewonly(tags[screen][i])
+ end
+ end),
+ awful.key({ modkey, "Control" }, "#" .. i + 9,
+ function ()
+ local screen = mouse.screen
+ if tags[screen][i] then
+ awful.tag.viewtoggle(tags[screen][i])
+ end
+ end),
+ awful.key({ modkey, "Shift" }, "#" .. i + 9,
+ function ()
+ if client.focus and tags[client.focus.screen][i] then
+ awful.client.movetotag(tags[client.focus.screen][i])
+ end
+ end),
+ awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
+ function ()
+ if client.focus and tags[client.focus.screen][i] then
+ awful.client.toggletag(tags[client.focus.screen][i])
+ end
+ end))
+end
+
+clientbuttons = awful.util.table.join(
+ awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
+ awful.button({ modkey }, 1, awful.mouse.client.move),
+ awful.button({ modkey }, 3, awful.mouse.client.resize))
+
+-- Set keys
+root.keys(globalkeys)
+-- }}}
+
+-- {{{ Rules
+awful.rules.rules = {
+ -- All clients will match this rule.
+ { rule = { },
+ properties = { border_width = beautiful.border_width,
+ border_color = beautiful.border_normal,
+ size_hints_honor = false,
+ focus = awful.client.focus.filter,
+ keys = clientkeys, } },
+ { rule = { class = "MPlayer" }, properties = { floating = true } },
+ { rule = { class = "pinentry" }, properties = { floating = true } },
+ { rule = { class = "gimp" }, properties = { floating = true } },
+ { rule = { instance = "Navigator" }, properties = { tag = tags[1][2] } },
+ { rule = { instance = "Firefox" }, properties = { tag = tags[1][2] } },
+ { rule = { class = "Iceweasel" }, properties = { tag = tags[1][2] } },
+ { rule = { class = "VirtualBox" }, properties = { tag = tags[1][7] } },
+ { rule = { class = "Pidgin" }, properties = { tag = tags[1][5] } },
+ { rule = { instance = "weechat" }, properties = { tag = tags[1][9] } },
+ { rule = { class = "weechat 0.3.0" }, properties = { tag = tags[1][9] } },
+ { rule = { class = "weechat-curses" }, properties = { tag = tags[1][9] } },
+ { rule = { class = "Mail" }, properties = { tag = tags[1][6] } },
+ { rule = { class = "Thunderbird" }, properties = { tag = tags[1][6] } },
+ { rule = { class = "Icedove" }, properties = { tag = tags[1][6] } },
+ { rule = { class = "Msgcompose" }, properties = { tag = tags[1][6] } },
+ { rule = { class = "Skype" }, properties = { tag = tags[1][8] } },
+
+}
+
+-- }}}
+
+-- {{{ Signals
+-- Signal function to execute when a new client appears.
+client.connect_signal("manage", function (c, startup)
+ -- Enable sloppy focus
+ c:connect_signal("mouse::enter", function(c)
+ if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
+ and awful.client.focus.filter(c) then
+ client.focus = c
+ end
+ end)
+
+ if not startup then
+ -- Set the windows at the slave,
+ -- i.e. put it at the end of others instead of setting it master.
+ -- awful.client.setslave(c)
+
+ -- Put windows in a smart way, only if they do not set an initial position.
+ if not c.size_hints.user_position and not c.size_hints.program_position then
+ awful.placement.no_overlap(c)
+ awful.placement.no_offscreen(c)
+ end
+ end
+
+ local titlebars_enabled = false
+ if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
+ -- Widgets that are aligned to the left
+ local left_layout = wibox.layout.fixed.horizontal()
+ left_layout:add(awful.titlebar.widget.iconwidget(c))
+
+ -- Widgets that are aligned to the right
+ local right_layout = wibox.layout.fixed.horizontal()
+ right_layout:add(awful.titlebar.widget.floatingbutton(c))
+ right_layout:add(awful.titlebar.widget.maximizedbutton(c))
+ right_layout:add(awful.titlebar.widget.stickybutton(c))
+ right_layout:add(awful.titlebar.widget.ontopbutton(c))
+ right_layout:add(awful.titlebar.widget.closebutton(c))
+
+ -- The title goes in the middle
+ local title = awful.titlebar.widget.titlewidget(c)
+ title:buttons(awful.util.table.join(
+ awful.button({ }, 1, function()
+ client.focus = c
+ c:raise()
+ awful.mouse.client.move(c)
+ end),
+ awful.button({ }, 3, function()
+ client.focus = c
+ c:raise()
+ awful.mouse.client.resize(c)
+ end)
+ ))
+
+ -- Now bring it all together
+ local layout = wibox.layout.align.horizontal()
+ layout:set_left(left_layout)
+ layout:set_right(right_layout)
+ layout:set_middle(title)
+
+ awful.titlebar(c):set_widget(layout)
+ end
+end)
+
+client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
+client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
+-- }}}
+
+function run_once(prg)
+ awful.util.spawn_with_shell("pgrep -u $USER -x " .. prg .. " || (" .. prg .. ")")
+end
+
+
+do
+ local cmds =
+ {
+ run_once("/usr/local/bin/trackpoint"),
+ run_once("/usr/bin/xscreensaver &"),
+ run_once("setxkbmap us altgr-intl compose:menu"),
+ run_once("unclutter"),
+ }
+
+ awful.util.spawn(i)
+ end
diff --git a/themes/sky/awesome-icon.png b/themes/sky/awesome-icon.png
new file mode 100644
index 0000000..551564e
Binary files /dev/null and b/themes/sky/awesome-icon.png differ
diff --git a/themes/sky/layouts/dwindle.png b/themes/sky/layouts/dwindle.png
new file mode 100644
index 0000000..7d898fa
Binary files /dev/null and b/themes/sky/layouts/dwindle.png differ
diff --git a/themes/sky/layouts/fairh.png b/themes/sky/layouts/fairh.png
new file mode 100644
index 0000000..e8d7ddb
Binary files /dev/null and b/themes/sky/layouts/fairh.png differ
diff --git a/themes/sky/layouts/fairv.png b/themes/sky/layouts/fairv.png
new file mode 100644
index 0000000..ef47f9f
Binary files /dev/null and b/themes/sky/layouts/fairv.png differ
diff --git a/themes/sky/layouts/floating.png b/themes/sky/layouts/floating.png
new file mode 100644
index 0000000..978f723
Binary files /dev/null and b/themes/sky/layouts/floating.png differ
diff --git a/themes/sky/layouts/fullscreen.png b/themes/sky/layouts/fullscreen.png
new file mode 100644
index 0000000..b1de003
Binary files /dev/null and b/themes/sky/layouts/fullscreen.png differ
diff --git a/themes/sky/layouts/magnifier.png b/themes/sky/layouts/magnifier.png
new file mode 100644
index 0000000..d69ac68
Binary files /dev/null and b/themes/sky/layouts/magnifier.png differ
diff --git a/themes/sky/layouts/max.png b/themes/sky/layouts/max.png
new file mode 100644
index 0000000..37491f9
Binary files /dev/null and b/themes/sky/layouts/max.png differ
diff --git a/themes/sky/layouts/spiral.png b/themes/sky/layouts/spiral.png
new file mode 100644
index 0000000..600d1ec
Binary files /dev/null and b/themes/sky/layouts/spiral.png differ
diff --git a/themes/sky/layouts/tile.png b/themes/sky/layouts/tile.png
new file mode 100644
index 0000000..550393a
Binary files /dev/null and b/themes/sky/layouts/tile.png differ
diff --git a/themes/sky/layouts/tilebottom.png b/themes/sky/layouts/tilebottom.png
new file mode 100644
index 0000000..1dcc227
Binary files /dev/null and b/themes/sky/layouts/tilebottom.png differ
diff --git a/themes/sky/layouts/tileleft.png b/themes/sky/layouts/tileleft.png
new file mode 100644
index 0000000..14e13f5
Binary files /dev/null and b/themes/sky/layouts/tileleft.png differ
diff --git a/themes/sky/layouts/tiletop.png b/themes/sky/layouts/tiletop.png
new file mode 100644
index 0000000..2bcb161
Binary files /dev/null and b/themes/sky/layouts/tiletop.png differ
diff --git a/themes/sky/sky-background.png b/themes/sky/sky-background.png
new file mode 100644
index 0000000..bbc07cc
Binary files /dev/null and b/themes/sky/sky-background.png differ
diff --git a/themes/sky/theme.lua b/themes/sky/theme.lua
new file mode 100644
index 0000000..f81fb37
--- /dev/null
+++ b/themes/sky/theme.lua
@@ -0,0 +1,80 @@
+-------------------------------
+-- "Sky" awesome theme --
+-- By Andrei "Garoth" Thorp --
+-------------------------------
+-- If you want SVGs and extras, get them from garoth.com/awesome/sky-theme
+
+-- BASICS
+theme = {}
+theme.font = "sans 8"
+
+theme.bg_focus = "#e2eeea"
+theme.bg_normal = "#729fcf"
+theme.bg_urgent = "#fce94f"
+theme.bg_minimize = "#0067ce"
+theme.bg_systray = theme.bg_normal
+
+theme.fg_normal = "#2e3436"
+theme.fg_focus = "#2e3436"
+theme.fg_urgent = "#2e3436"
+theme.fg_minimize = "#2e3436"
+
+theme.border_width = 2
+theme.border_normal = "#dae3e0"
+theme.border_focus = "#729fcf"
+theme.border_marked = "#eeeeec"
+
+-- IMAGES
+theme.layout_fairh = "/usr/share/awesome/themes/sky/layouts/fairh.png"
+theme.layout_fairv = "/usr/share/awesome/themes/sky/layouts/fairv.png"
+theme.layout_floating = "/usr/share/awesome/themes/sky/layouts/floating.png"
+theme.layout_magnifier = "/usr/share/awesome/themes/sky/layouts/magnifier.png"
+theme.layout_max = "/usr/share/awesome/themes/sky/layouts/max.png"
+theme.layout_fullscreen = "/usr/share/awesome/themes/sky/layouts/fullscreen.png"
+theme.layout_tilebottom = "/usr/share/awesome/themes/sky/layouts/tilebottom.png"
+theme.layout_tileleft = "/usr/share/awesome/themes/sky/layouts/tileleft.png"
+theme.layout_tile = "/usr/share/awesome/themes/sky/layouts/tile.png"
+theme.layout_tiletop = "/usr/share/awesome/themes/sky/layouts/tiletop.png"
+theme.layout_spiral = "/usr/share/awesome/themes/sky/layouts/spiral.png"
+theme.layout_dwindle = "/usr/share/awesome/themes/sky/layouts/dwindle.png"
+
+theme.awesome_icon = "/usr/share/awesome/themes/sky/awesome-icon.png"
+
+-- from default for now...
+theme.menu_submenu_icon = "/usr/share/awesome/themes/default/submenu.png"
+theme.taglist_squares_sel = "/usr/share/awesome/themes/default/taglist/squarefw.png"
+theme.taglist_squares_unsel = "/usr/share/awesome/themes/default/taglist/squarew.png"
+
+-- MISC
+theme.wallpaper = "/usr/share/awesome/themes/sky/sky-background.png"
+theme.taglist_squares = "true"
+theme.titlebar_close_button = "true"
+theme.menu_height = 15
+theme.menu_width = 100
+
+-- Define the image to load
+theme.titlebar_close_button_normal = "/usr/share/awesome/themes/default/titlebar/close_normal.png"
+theme.titlebar_close_button_focus = "/usr/share/awesome/themes/default/titlebar/close_focus.png"
+
+theme.titlebar_ontop_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_normal_inactive.png"
+theme.titlebar_ontop_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_focus_inactive.png"
+theme.titlebar_ontop_button_normal_active = "/usr/share/awesome/themes/default/titlebar/ontop_normal_active.png"
+theme.titlebar_ontop_button_focus_active = "/usr/share/awesome/themes/default/titlebar/ontop_focus_active.png"
+
+theme.titlebar_sticky_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_normal_inactive.png"
+theme.titlebar_sticky_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_focus_inactive.png"
+theme.titlebar_sticky_button_normal_active = "/usr/share/awesome/themes/default/titlebar/sticky_normal_active.png"
+theme.titlebar_sticky_button_focus_active = "/usr/share/awesome/themes/default/titlebar/sticky_focus_active.png"
+
+theme.titlebar_floating_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/floating_normal_inactive.png"
+theme.titlebar_floating_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/floating_focus_inactive.png"
+theme.titlebar_floating_button_normal_active = "/usr/share/awesome/themes/default/titlebar/floating_normal_active.png"
+theme.titlebar_floating_button_focus_active = "/usr/share/awesome/themes/default/titlebar/floating_focus_active.png"
+
+theme.titlebar_maximized_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_normal_inactive.png"
+theme.titlebar_maximized_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_focus_inactive.png"
+theme.titlebar_maximized_button_normal_active = "/usr/share/awesome/themes/default/titlebar/maximized_normal_active.png"
+theme.titlebar_maximized_button_focus_active = "/usr/share/awesome/themes/default/titlebar/maximized_focus_active.png"
+
+return theme
+-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
diff --git a/themes/zenburn/awesome-icon.png b/themes/zenburn/awesome-icon.png
new file mode 100644
index 0000000..70978d3
Binary files /dev/null and b/themes/zenburn/awesome-icon.png differ
diff --git a/themes/zenburn/layouts/dwindle.png b/themes/zenburn/layouts/dwindle.png
new file mode 100644
index 0000000..1aa4bf2
Binary files /dev/null and b/themes/zenburn/layouts/dwindle.png differ
diff --git a/themes/zenburn/layouts/fairh.png b/themes/zenburn/layouts/fairh.png
new file mode 100644
index 0000000..e176bb3
Binary files /dev/null and b/themes/zenburn/layouts/fairh.png differ
diff --git a/themes/zenburn/layouts/fairv.png b/themes/zenburn/layouts/fairv.png
new file mode 100644
index 0000000..7c0a92c
Binary files /dev/null and b/themes/zenburn/layouts/fairv.png differ
diff --git a/themes/zenburn/layouts/floating.png b/themes/zenburn/layouts/floating.png
new file mode 100644
index 0000000..a399092
Binary files /dev/null and b/themes/zenburn/layouts/floating.png differ
diff --git a/themes/zenburn/layouts/fullscreen.png b/themes/zenburn/layouts/fullscreen.png
new file mode 100644
index 0000000..a0c795c
Binary files /dev/null and b/themes/zenburn/layouts/fullscreen.png differ
diff --git a/themes/zenburn/layouts/magnifier.png b/themes/zenburn/layouts/magnifier.png
new file mode 100644
index 0000000..bca6db9
Binary files /dev/null and b/themes/zenburn/layouts/magnifier.png differ
diff --git a/themes/zenburn/layouts/max.png b/themes/zenburn/layouts/max.png
new file mode 100644
index 0000000..96a237a
Binary files /dev/null and b/themes/zenburn/layouts/max.png differ
diff --git a/themes/zenburn/layouts/spiral.png b/themes/zenburn/layouts/spiral.png
new file mode 100644
index 0000000..8f5aeed
Binary files /dev/null and b/themes/zenburn/layouts/spiral.png differ
diff --git a/themes/zenburn/layouts/tile.png b/themes/zenburn/layouts/tile.png
new file mode 100644
index 0000000..3fcc904
Binary files /dev/null and b/themes/zenburn/layouts/tile.png differ
diff --git a/themes/zenburn/layouts/tilebottom.png b/themes/zenburn/layouts/tilebottom.png
new file mode 100644
index 0000000..dfe7832
Binary files /dev/null and b/themes/zenburn/layouts/tilebottom.png differ
diff --git a/themes/zenburn/layouts/tileleft.png b/themes/zenburn/layouts/tileleft.png
new file mode 100644
index 0000000..c5decfd
Binary files /dev/null and b/themes/zenburn/layouts/tileleft.png differ
diff --git a/themes/zenburn/layouts/tiletop.png b/themes/zenburn/layouts/tiletop.png
new file mode 100644
index 0000000..b251661
Binary files /dev/null and b/themes/zenburn/layouts/tiletop.png differ
diff --git a/themes/zenburn/taglist/squarefz.png b/themes/zenburn/taglist/squarefz.png
new file mode 100644
index 0000000..0927720
Binary files /dev/null and b/themes/zenburn/taglist/squarefz.png differ
diff --git a/themes/zenburn/taglist/squarez.png b/themes/zenburn/taglist/squarez.png
new file mode 100644
index 0000000..9b41c26
Binary files /dev/null and b/themes/zenburn/taglist/squarez.png differ
diff --git a/themes/zenburn/theme.lua b/themes/zenburn/theme.lua
new file mode 100644
index 0000000..0a7fa77
--- /dev/null
+++ b/themes/zenburn/theme.lua
@@ -0,0 +1,134 @@
+-------------------------------
+-- "Zenburn" awesome theme --
+-- By Adrian C. (anrxc) --
+-------------------------------
+
+-- Alternative icon sets and widget icons:
+-- * http://awesome.naquadah.org/wiki/Nice_Icons
+
+---------------------------------------------------
+-- dark blue theme for awesome wm
+-- By Chris S. (cs@nevious.ch)
+-- Original theme: zenburn by Adrian C. (anrxc)
+--
+-- Licence:
+-- GNU GPLv2
+----------------------------------------------------
+
+-- {{{ Main
+theme = {}
+theme.wallpaper_cmd = {"awsetbg -t -r " .. awful.util.getdir("config") .. "/themes/zenburn/wallpapers/"}
+-- }}}
+
+-- {{{ Styles
+theme.font = "terminus 8"
+
+-- {{{ Colors
+theme.fg_normal = "#d7d2d0"
+theme.fg_focus = "#3599c9"
+theme.fg_urgent = "#e34c10"
+theme.bg_normal = "#3b3b3b"
+theme.bg_focus = "#2d2d2d"
+theme.bg_urgent = "#3F3F3F"
+-- }}}
+
+-- {{{ Borders
+theme.border_width = "1"
+theme.border_normal = "#3f3f3f"
+theme.border_focus = "#00a6dc"
+theme.border_marked = "#CC9393"
+-- }}}
+
+-- {{{ Titlebars
+theme.titlebar_bg_focus = "#254090"
+theme.titlebar_bg_normal = "#3F3F3F"
+-- }}}
+
+-- There are other variable sets
+-- overriding the default one when
+-- defined, the sets are:
+-- [taglist|tasklist]_[bg|fg]_[focus|urgent]
+-- titlebar_[normal|focus]
+-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
+theme.taglist_bg_focus = "#000000"
+-- }}}
+
+-- {{{ Widgets
+-- You can add as many variables as
+-- you wish and access them by using
+-- beautiful.variable in your rc.lua
+--theme.fg_widget = "#AECF96"
+--theme.fg_center_widget = "#88A175"
+--theme.fg_end_widget = "#FF5656"
+--theme.bg_widget = "#494B4F"
+-- theme.border_widget = "#3F3F3F"
+-- }}}
+
+-- {{{ Mouse finder
+theme.mouse_finder_color = "#CC9393"
+-- mouse_finder_[timeout|animate_timeout|radius|factor]
+-- }}}
+
+-- {{{ Menu
+-- Variables set for theming the menu:
+-- menu_[bg|fg]_[normal|focus]
+-- menu_[border_color|border_width]
+theme.menu_height = "15"
+theme.menu_width = "100"
+theme.menu_border_color = "#000000"
+-- }}}
+
+-- {{{ Icons
+-- {{{ Taglist
+theme.taglist_squares_sel = "/usr/share/awesome/themes/zenburn/taglist/squarefz.png"
+theme.taglist_squares_unsel = "/usr/share/awesome/themes/zenburn/taglist/squarez.png"
+--theme.taglist_squares_resize = "false"
+-- }}}
+
+-- {{{ Misc
+theme.awesome_icon = "/usr/share/awesome/themes/zenburn/awesome-icon.png"
+theme.menu_submenu_icon = "/usr/share/awesome/themes/default/submenu.png"
+-- }}}
+
+-- {{{ Layout
+theme.layout_tile = "/usr/share/awesome/themes/zenburn/layouts/tile.png"
+theme.layout_tileleft = "/usr/share/awesome/themes/zenburn/layouts/tileleft.png"
+theme.layout_tilebottom = "/usr/share/awesome/themes/zenburn/layouts/tilebottom.png"
+theme.layout_tiletop = "/usr/share/awesome/themes/zenburn/layouts/tiletop.png"
+theme.layout_fairv = "/usr/share/awesome/themes/zenburn/layouts/fairv.png"
+theme.layout_fairh = "/usr/share/awesome/themes/zenburn/layouts/fairh.png"
+theme.layout_spiral = "/usr/share/awesome/themes/zenburn/layouts/spiral.png"
+theme.layout_dwindle = "/usr/share/awesome/themes/zenburn/layouts/dwindle.png"
+theme.layout_max = "/usr/share/awesome/themes/zenburn/layouts/max.png"
+theme.layout_fullscreen = "/usr/share/awesome/themes/zenburn/layouts/fullscreen.png"
+theme.layout_magnifier = "/usr/share/awesome/themes/zenburn/layouts/magnifier.png"
+theme.layout_floating = "/usr/share/awesome/themes/zenburn/layouts/floating.png"
+-- }}}
+
+-- {{{ Titlebar
+theme.titlebar_close_button_focus = "/usr/share/awesome/themes/zenburn/titlebar/close_focus.png"
+theme.titlebar_close_button_normal = "/usr/share/awesome/themes/zenburn/titlebar/close_normal.png"
+
+theme.titlebar_ontop_button_focus_active = "/usr/share/awesome/themes/zenburn/titlebar/ontop_focus_active.png"
+theme.titlebar_ontop_button_normal_active = "/usr/share/awesome/themes/zenburn/titlebar/ontop_normal_active.png"
+theme.titlebar_ontop_button_focus_inactive = "/usr/share/awesome/themes/zenburn/titlebar/ontop_focus_inactive.png"
+theme.titlebar_ontop_button_normal_inactive = "/usr/share/awesome/themes/zenburn/titlebar/ontop_normal_inactive.png"
+
+theme.titlebar_sticky_button_focus_active = "/usr/share/awesome/themes/zenburn/titlebar/sticky_focus_active.png"
+theme.titlebar_sticky_button_normal_active = "/usr/share/awesome/themes/zenburn/titlebar/sticky_normal_active.png"
+theme.titlebar_sticky_button_focus_inactive = "/usr/share/awesome/themes/zenburn/titlebar/sticky_focus_inactive.png"
+theme.titlebar_sticky_button_normal_inactive = "/usr/share/awesome/themes/zenburn/titlebar/sticky_normal_inactive.png"
+
+theme.titlebar_floating_button_focus_active = "/usr/share/awesome/themes/zenburn/titlebar/floating_focus_active.png"
+theme.titlebar_floating_button_normal_active = "/usr/share/awesome/themes/zenburn/titlebar/floating_normal_active.png"
+theme.titlebar_floating_button_focus_inactive = "/usr/share/awesome/themes/zenburn/titlebar/floating_focus_inactive.png"
+theme.titlebar_floating_button_normal_inactive = "/usr/share/awesome/themes/zenburn/titlebar/floating_normal_inactive.png"
+
+theme.titlebar_maximized_button_focus_active = "/usr/share/awesome/themes/zenburn/titlebar/maximized_focus_active.png"
+theme.titlebar_maximized_button_normal_active = "/usr/share/awesome/themes/zenburn/titlebar/maximized_normal_active.png"
+theme.titlebar_maximized_button_focus_inactive = "/usr/share/awesome/themes/zenburn/titlebar/maximized_focus_inactive.png"
+theme.titlebar_maximized_button_normal_inactive = "/usr/share/awesome/themes/zenburn/titlebar/maximized_normal_inactive.png"
+-- }}}
+-- }}}
+
+return theme
diff --git a/themes/zenburn/titlebar/close_focus.png b/themes/zenburn/titlebar/close_focus.png
new file mode 100644
index 0000000..e9b4179
Binary files /dev/null and b/themes/zenburn/titlebar/close_focus.png differ
diff --git a/themes/zenburn/titlebar/close_normal.png b/themes/zenburn/titlebar/close_normal.png
new file mode 100644
index 0000000..a7f1010
Binary files /dev/null and b/themes/zenburn/titlebar/close_normal.png differ
diff --git a/themes/zenburn/titlebar/floating_focus_active.png b/themes/zenburn/titlebar/floating_focus_active.png
new file mode 100644
index 0000000..0f9ee0d
Binary files /dev/null and b/themes/zenburn/titlebar/floating_focus_active.png differ
diff --git a/themes/zenburn/titlebar/floating_focus_inactive.png b/themes/zenburn/titlebar/floating_focus_inactive.png
new file mode 100644
index 0000000..41b54eb
Binary files /dev/null and b/themes/zenburn/titlebar/floating_focus_inactive.png differ
diff --git a/themes/zenburn/titlebar/floating_normal_active.png b/themes/zenburn/titlebar/floating_normal_active.png
new file mode 100644
index 0000000..ec9c15b
Binary files /dev/null and b/themes/zenburn/titlebar/floating_normal_active.png differ
diff --git a/themes/zenburn/titlebar/floating_normal_inactive.png b/themes/zenburn/titlebar/floating_normal_inactive.png
new file mode 100644
index 0000000..aa46bfa
Binary files /dev/null and b/themes/zenburn/titlebar/floating_normal_inactive.png differ
diff --git a/themes/zenburn/titlebar/maximized_focus_active.png b/themes/zenburn/titlebar/maximized_focus_active.png
new file mode 100644
index 0000000..7e8498a
Binary files /dev/null and b/themes/zenburn/titlebar/maximized_focus_active.png differ
diff --git a/themes/zenburn/titlebar/maximized_focus_inactive.png b/themes/zenburn/titlebar/maximized_focus_inactive.png
new file mode 100644
index 0000000..1bc2ff6
Binary files /dev/null and b/themes/zenburn/titlebar/maximized_focus_inactive.png differ
diff --git a/themes/zenburn/titlebar/maximized_normal_active.png b/themes/zenburn/titlebar/maximized_normal_active.png
new file mode 100644
index 0000000..5387b1c
Binary files /dev/null and b/themes/zenburn/titlebar/maximized_normal_active.png differ
diff --git a/themes/zenburn/titlebar/maximized_normal_inactive.png b/themes/zenburn/titlebar/maximized_normal_inactive.png
new file mode 100644
index 0000000..1b359b2
Binary files /dev/null and b/themes/zenburn/titlebar/maximized_normal_inactive.png differ
diff --git a/themes/zenburn/titlebar/ontop_focus_active.png b/themes/zenburn/titlebar/ontop_focus_active.png
new file mode 100644
index 0000000..86e61b7
Binary files /dev/null and b/themes/zenburn/titlebar/ontop_focus_active.png differ
diff --git a/themes/zenburn/titlebar/ontop_focus_inactive.png b/themes/zenburn/titlebar/ontop_focus_inactive.png
new file mode 100644
index 0000000..2366421
Binary files /dev/null and b/themes/zenburn/titlebar/ontop_focus_inactive.png differ
diff --git a/themes/zenburn/titlebar/ontop_normal_active.png b/themes/zenburn/titlebar/ontop_normal_active.png
new file mode 100644
index 0000000..1e46915
Binary files /dev/null and b/themes/zenburn/titlebar/ontop_normal_active.png differ
diff --git a/themes/zenburn/titlebar/ontop_normal_inactive.png b/themes/zenburn/titlebar/ontop_normal_inactive.png
new file mode 100644
index 0000000..1c5d9c1
Binary files /dev/null and b/themes/zenburn/titlebar/ontop_normal_inactive.png differ
diff --git a/themes/zenburn/titlebar/sticky_focus_active.png b/themes/zenburn/titlebar/sticky_focus_active.png
new file mode 100644
index 0000000..b10e604
Binary files /dev/null and b/themes/zenburn/titlebar/sticky_focus_active.png differ
diff --git a/themes/zenburn/titlebar/sticky_focus_inactive.png b/themes/zenburn/titlebar/sticky_focus_inactive.png
new file mode 100644
index 0000000..fec5319
Binary files /dev/null and b/themes/zenburn/titlebar/sticky_focus_inactive.png differ
diff --git a/themes/zenburn/titlebar/sticky_normal_active.png b/themes/zenburn/titlebar/sticky_normal_active.png
new file mode 100644
index 0000000..700eb7c
Binary files /dev/null and b/themes/zenburn/titlebar/sticky_normal_active.png differ
diff --git a/themes/zenburn/titlebar/sticky_normal_inactive.png b/themes/zenburn/titlebar/sticky_normal_inactive.png
new file mode 100644
index 0000000..624132c
Binary files /dev/null and b/themes/zenburn/titlebar/sticky_normal_inactive.png differ
diff --git a/themes/zenburn/zenburn-background.png b/themes/zenburn/zenburn-background.png
new file mode 100644
index 0000000..1eb9437
Binary files /dev/null and b/themes/zenburn/zenburn-background.png differ
diff --git a/volume.lua b/volume.lua
new file mode 100644
index 0000000..66b151a
--- /dev/null
+++ b/volume.lua
@@ -0,0 +1,38 @@
+local wibox = require("wibox")
+local awful = require("awful")
+
+volume_widget = wibox.widget.textbox()
+volume_widget:set_align("right")
+
+function update_volume(widget)
+ local fd = io.popen("amixer sget Master")
+ local status = fd:read("*all")
+ fd:close()
+
+ local volume = tonumber(string.match(status, "(%d?%d?%d)%%")) / 100
+ -- volume = string.format("% 3d", volume)
+
+ status = string.match(status, "%[(o[^%]]*)%]")
+
+ -- starting colour
+ local sr, sg, sb = 0x3F, 0x3F, 0x3F
+ -- ending colour
+ local er, eg, eb = 0xDC, 0xDC, 0xCC
+
+ local ir = volume * (er - sr) + sr
+ local ig = volume * (eg - sg) + sg
+ local ib = volume * (eb - sb) + sb
+ interpol_colour = string.format("%.2x%.2x%.2x", ir, ig, ib)
+ if string.find(status, "on", 1, true) then
+ volume = " "
+ else
+ volume = " M "
+ end
+ widget:set_markup(volume)
+end
+
+update_volume(volume_widget)
+
+mytimer = timer({ timeout = 1 })
+mytimer:connect_signal("timeout", function () update_volume(volume_widget) end)
+mytimer:start()
diff --git a/wi.lua b/wi.lua
new file mode 100644
index 0000000..4ac50fb
--- /dev/null
+++ b/wi.lua
@@ -0,0 +1,387 @@
+-----------------------
+-- AwesomeWM widgets --
+-- version 3.5 --
+-----------------------
+
+local awful = require("awful")
+local wibox = require("wibox")
+local beautiful = require("beautiful")
+local vicious = require("vicious")
+local naughty = require("naughty")
+
+graphwidth = 120
+graphheight = 20
+pctwidth = 40
+netwidth = 50
+mpdwidth = 365
+
+-- {{{ Spacers
+space = wibox.widget.textbox()
+space:set_text(" ")
+
+comma = wibox.widget.textbox()
+comma:set_markup(",")
+
+pipe = wibox.widget.textbox()
+pipe:set_markup("|")
+
+tab = wibox.widget.textbox()
+tab:set_text(" ")
+
+volspace = wibox.widget.textbox()
+volspace:set_text(" ")
+-- }}}
+
+-- {{{ Processor
+-- Cache
+vicious.cache(vicious.widgets.cpu)
+vicious.cache(vicious.widgets.cpuinf)
+
+-- Core 0 freq
+cpufreq = wibox.widget.textbox()
+vicious.register(cpufreq, vicious.widgets.cpuinf,
+ function(widget, args)
+ return string.format("cpu%1.1fGHz", args["{cpu0 ghz}"])
+ end, 3000)
+
+-- Core 0 graph
+cpugraph0 = awful.widget.graph()
+cpugraph0:set_width(graphwidth):set_height(graphheight)
+cpugraph0:set_border_color(nil)
+cpugraph0:set_border_color(beautiful.bg_widget)
+cpugraph0:set_background_color(beautiful.bg_widget)
+cpugraph0:set_color({
+ type = "linear",
+ from = { 0, graphheight },
+ to = { 0, 0 },
+ stops = {
+ { 0, beautiful.fg_widget },
+ { 0.25, beautiful.fg_center_widget },
+ { 1, beautiful.fg_end_widget } } })
+vicious.register(cpugraph0, vicious.widgets.cpu, "$2")
+
+-- Core 0 %
+cpupct0 = wibox.widget.textbox()
+cpupct0.fit =
+ function(box, w, h)
+ local w, h = wibox.widget.textbox.fit(box, w, h)
+ return math.max(pctwidth, w), h
+ end
+vicious.register(cpupct0, vicious.widgets.cpu, "$2%", 2)
+
+-- Core 1 graph
+cpugraph1 = awful.widget.graph()
+cpugraph1:set_width(graphwidth):set_height(graphheight)
+cpugraph1:set_border_color(nil)
+cpugraph1:set_border_color(beautiful.bg_widget)
+cpugraph1:set_background_color(beautiful.bg_widget)
+cpugraph1:set_color({
+ type = "linear",
+ from = { 0, graphheight },
+ to = { 0, 0 },
+ stops = {
+ { 0, beautiful.fg_widget },
+ { 0.25, beautiful.fg_center_widget },
+ { 1, beautiful.fg_end_widget }
+ }})
+vicious.register(cpugraph1, vicious.widgets.cpu, "$3")
+
+-- Core 1 %
+cpupct1 = wibox.widget.textbox()
+cpupct1.fit =
+ function(box, w, h)
+ local w, h = wibox.widget.textbox.fit(box, w, h)
+ return math.max(pctwidth, w), h
+ end
+vicious.register(cpupct1, vicious.widgets.cpu, "$3%", 2)
+
+-- Core 2 graph
+cpugraph2 = awful.widget.graph()
+cpugraph2:set_width(graphwidth):set_height(graphheight)
+cpugraph2:set_border_color(nil)
+cpugraph2:set_border_color(beautiful.bg_widget)
+cpugraph2:set_background_color(beautiful.bg_widget)
+cpugraph2:set_color({
+ type = "linear",
+ from = { 0, graphheight },
+ to = { 0, 0 },
+ stops = {
+ { 0, beautiful.fg_widget },
+ { 0.25, beautiful.fg_center_widget },
+ { 1, beautiful.fg_end_widget } } })
+vicious.register(cpugraph2, vicious.widgets.cpu, "$4")
+
+-- Core 2 %
+cpupct2 = wibox.widget.textbox()
+cpupct2.fit =
+ function(box, w, h)
+ local w, h = wibox.widget.textbox.fit(box, w, h)
+ return math.max(pctwidth, w), h
+ end
+vicious.register(cpupct2, vicious.widgets.cpu, "$4%", 2)
+-- }}}
+
+-- Initialize widget
+cpuwidget = wibox.widget.textbox()
+-- Register widget
+vicious.register(cpuwidget, vicious.widgets.cpu, "$1%")
+cpuicon = wibox.widget.imagebox()
+cpuicon:set_image("/home/guerre/.config/awesome/icons/cpu.png")
+
+
+
+-- {{{ Memory
+-- Cache
+vicious.cache(vicious.widgets.mem)
+
+-- RAM used
+memused = wibox.widget.textbox()
+vicious.register(memused, vicious.widgets.mem,"$2MB", 5)
+memicon = wibox.widget.imagebox()
+memicon:set_image("/home/guerre/.config/awesome/icons/mem.png")
+
+-- }}}
+
+-- {{{ Network
+-- Cache
+vicious.cache(vicious.widgets.net)
+
+-- TX graph
+-- txgraph = awful.widget.graph()
+-- txgraph:set_width(graphwidth):set_height(graphheight)
+-- txgraph:set_border_color(nil)
+-- txgraph:set_background_color(beautiful.bg_widget)
+-- txgraph:set_color({
+-- type = "linear",
+-- from = { 0, graphheight },
+-- to = { 0, 0 },
+-- stops = {
+-- { 0, beautiful.fg_widget },
+-- { 0.25, beautiful.fg_center_widget },
+-- { 1, beautiful.fg_end_widget } } })
+-- vicious.register(txgraph, vicious.widgets.net, "${eth0 up_kb}")
+
+-- -- TX total
+-- txwidget = wibox.widget.textbox()
+-- vicious.register(txwidget, vicious.widgets.net,
+-- "tx${eth0 tx_mb}MB", 19)
+
+-- -- TX speed
+-- txwidget = wibox.widget.textbox()
+-- txwidget.fit =
+-- function(box, w, h)
+-- local w, h = wibox.widget.textbox.fit(box, w, h)
+-- return math.max(netwidth, w), h
+-- end
+-- vicious.register(txwidget, vicious.widgets.net, "${eth0 up_kb}", 2)
+
+-- -- RX graph
+-- rxgraph = awful.widget.graph()
+-- rxgraph:set_width(graphwidth):set_height(graphheight)
+-- rxgraph:set_border_color(nil)
+-- rxgraph:set_background_color(beautiful.bg_widget)
+-- rxgraph:set_color({
+-- type = "linear",
+-- from = { 0, graphheight },
+-- to = { 0, 0 },
+-- stops = {
+-- { 0, beautiful.fg_widget },
+-- { 0.25, beautiful.fg_center_widget },
+-- { 1, beautiful.fg_end_widget } } })
+-- vicious.register(rxgraph, vicious.widgets.net, "${eth0 down_kb}")
+
+-- -- RX total
+-- rxwidget = wibox.widget.textbox()
+-- -- vicious.register(rxwidget, vicious.widgets.net,
+-- "rx${eth0 rx_mb}MB", 17)
+
+-- -- RX speed
+-- rxwidget = wibox.widget.textbox()
+-- rxwidget.fit =
+-- function(box, w, h)
+-- local w, h = wibox.widget.textbox.fit(box, w, h)
+-- return math.max(netwidth, w), h
+-- end
+-- vicious.register(rxwidget, vicious.widgets.net, "${eth0 down_kb}", 2)
+-- -- }}}
+
+-- {{{ Weather
+weather = wibox.widget.textbox()
+vicious.register(weather, vicious.widgets.weather,
+ "${sky} @ ${tempf}°F on",
+ 1501, "XXXX")
+weather:buttons(awful.util.table.join(awful.button({ }, 1,
+ function() vicious.force({ weather }) end)))
+-- }}}
+
+
+-- -- {{{ Pianobar
+-- -- Icon
+-- mpdicon = wibox.widget.imagebox()
+-- mpdicon:set_image(beautiful.widget_mpd)
+
+-- -- Song info
+-- mpdwidget = wibox.widget.textbox()
+-- vicious.register(mpdwidget, vicious.widgets.mpd,
+-- function(widget, args)
+-- mpdicon:set_image(beautiful.widget_play)
+-- local bg = beautiful.bg_focus
+
+-- local italic = ""
+-- local like = ""
+-- local color = beautiful.fg_focus
+-- local f = io.popen("pgrep pianobar")
+
+-- if f:read("*line") then
+-- f = io.open(os.getenv("HOME") .. "/.config/pianobar/isplaying")
+-- play_or_pause = f:read("*line")
+-- f:close()
+
+ -- -- Current song
+ -- f = io.open(os.getenv("HOME") .. "/.config/pianobar/nowplaying")
+ -- text = f:read("*line"):match("(.*)")
+ -- f:close()
+
+ -- -- Awaiting song
+ -- if text:match(" - $") then text = "..." end
+
+ -- -- Loved song
+ -- if text:find("%(like%)") then like = "💕" end
+
+ -- -- Ampersands
+ -- if text:find("&") then text = text:gsub("&","and") end
+
+ -- -- Paused
+ -- if play_or_pause == "0" then
+ -- if text:len() > 35 then mpdwidget.width = mpdwidth end
+ -- italic = "font_style='italic'"
+ -- mpdicon:set_image(beautiful.widget_pause)
+ -- info = like .. awful.util.escape(text:gsub("%(like%)",""))
+ -- else
+ -- mpdwidget.width = 0
+ -- local helpers = require("vicious.helpers")
+ -- info = like ..
+ -- awful.util.escape(helpers.scroll(text:gsub("%(like%)",""), 30, mpdwidget))
+ -- end
+ -- else
+ -- -- Stopped
+ -- mpdwidget.width = 0
+ -- mpdicon:set_image(beautiful.widget_mpd)
+ -- bg = beautiful.bg_normal
+ -- color = beautiful.fg_normal
+ -- info = "..."
+ -- end
+
+ -- return "" .. info .. ""
+ -- end, 3)
+
+-- -- Buttons
+-- mpdwidget:buttons(awful.util.table.join(
+ -- awful.button({ }, 1,
+ -- function()
+ -- local f = io.popen("pgrep pianobar")
+ -- p = f:read("*a"):match("([0-9]*)")
+ -- if p == "" then
+ -- awful.util.spawn(pianobar_screen, false)
+ -- else
+ -- awful.util.spawn(pianobar_toggle, false)
+ -- end
+ -- end),
+ -- awful.button({ modkey }, 1, function() awful.util.spawn(pianobar_upcoming, false) end),
+ -- awful.button({ }, 2, function() awful.util.spawn(pianobar_quit, false) end),
+ -- awful.button({ }, 3, function() awful.util.spawn(pianobar_station, false) end),
+ -- awful.button({ }, 4, function() awful.util.spawn(pianobar_next, false) end),
+ -- awful.button({ }, 5, function() awful.util.spawn(pianobar_history, false) end)))
+-- mpdicon:buttons(mpdwidget:buttons())
+-- -- }}}
+
+-- {{{ Volume
+-- Cache
+vicious.cache(vicious.widgets.volume)
+
+-- Icon
+volicon = wibox.widget.imagebox()
+volicon:set_image("/home/guerre/.config/awesome/icons/vol.png")
+
+-- Volume %
+volpct = wibox.widget.textbox()
+vicious.register(volpct, vicious.widgets.volume, "$1%", nil, "Master")
+
+-- Buttons
+volicon:buttons(awful.util.table.join(
+ awful.button({ }, 1,
+ function() awful.util.spawn("amixer -q set Master toggle", false) end),
+ awful.button({ }, 4,
+ function() awful.util.spawn("amixer -q set Master 2+% unmute", false) end),
+ awful.button({ }, 5,
+ function() awful.util.spawn("amixer -q set Master 2-% unmute", false) end)))
+volpct:buttons(volicon:buttons())
+volspace:buttons(volicon:buttons())
+-- }}}
+
+-- {{{ Battery
+-- Battery attributes
+local bat_state = ""
+local bat_charge = 0
+local bat_time = 0
+local blink = true
+
+-- Icon
+baticon = wibox.widget.imagebox()
+baticon:set_image("/home/guerre/.config/awesome/icons/bat.png")
+
+-- Charge %
+batpct = wibox.widget.textbox()
+vicious.register(batpct, vicious.widgets.bat,
+ function(widget, args)
+ bat_state = args[1]
+ bat_charge = args[2]
+ bat_time = args[3]
+
+ if args[1] == "-" then
+ if bat_charge > 70 then
+ baticon:set_image("/home/guerre/.config/awesome/icons/bat.png")
+ elseif bat_charge > 30 then
+ baticon:set_image("/home/guerre/.config/awesome/icons/bat-low.png")
+ elseif bat_charge > 10 then
+ baticon:set_image("/home/guerre/.config/awesome/icons/bat-empty.png")
+ else
+ baticon:set_image("/home/guerre/.config/awesome/icons/bat-empty.png")
+ end
+ else
+ baticon:set_image("/home/guerre/.config/awesome/icons/ac.png")
+ if args[1] == "+" then
+ blink = not blink
+ if blink then
+ baticon:set_image("/home/guerre/.config/awesome/icons/ac.png")
+ end
+ end
+ end
+
+ return args[2] .. "%" .. " " .. bat_time
+ end, nil, "BAT0")
+
+-- Buttons
+function popup_bat()
+ local state = ""
+ if bat_state == "↯" then
+ state = "Full"
+ elseif bat_state == "↯" then
+ state = "Charged"
+ elseif bat_state == "+" then
+ state = "Charging"
+ elseif bat_state == "-" then
+ state = "Discharging"
+ elseif bat_state == "⌁" then
+ state = "Not charging"
+ else
+ state = "Unknown"
+ end
+
+ naughty.notify { text = "Charge : " .. bat_charge .. "%\nState : " .. state ..
+ " (" .. bat_time .. ")", timeout = 5, hover_timeout = 0.5 }
+end
+batpct:buttons(awful.util.table.join(awful.button({ }, 1, popup_bat)))
+baticon:buttons(batpct:buttons())
+-- }}}
diff --git a/wicd.lua b/wicd.lua
new file mode 100644
index 0000000..8e98a93
--- /dev/null
+++ b/wicd.lua
@@ -0,0 +1,68 @@
+local awful = require "awful"
+local io = require "io"
+local os = require "os"
+local table = require "table"
+local string = require "string"
+local naughty = require "naughty"
+local ipairs = ipairs
+local beautiful = require("beautiful")
+
+module("wicd")
+
+
+local menu = nil
+local terminal = terminal or os.getenv("TERMINAL") or "/usr/bin/urxvt"
+
+connect = function(id)
+ awful.util.spawn("wicd-cli -yc --network " .. id)
+end
+
+connect_wired = function()
+ awful.util.spawn("wicd-cli -zc")
+end
+
+scan = function()
+ awful.util.spawn("wicd-cli -yS")
+end
+
+launch = function()
+ awful.util.spawn(terminal .. " -title WICD -e wicd-curses")
+end
+
+show = function()
+ local networks = {
+ { "WIRED", nil },
+ { " default", connect_wired},
+ { "WIRELESS", scan }
+ }
+
+ local out = io.popen("wicd-cli -yl|tail -n+2 | cut -f4-")
+
+ local i = 0
+ for line in out:lines() do
+ table.insert(networks, {" " .. line, "wicd-cli -yc --network " .. i })
+ i = i + 1
+ end
+ out:close()
+
+ if #networks == 3 then
+ table.insert(networks, {" (none)", nil})
+ end
+
+ menu = awful.menu({items = networks, theme = {bg_normal = beautiful.widgets_menu_bg_normal, bg_focus = beautiful.widgets_menu_bg_focus}})
+ menu:show()
+end
+
+hide = function()
+ menu:hide()
+ menu = nil
+end
+
+toggle = function()
+ if menu == nil then
+ show()
+ else
+ hide()
+ end
+end
+