]>
git.madduck.net Git - etc/awesome.git/commitdiff
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4bde4b5 )
12 files changed:
-
- Licensed under GNU General Public License v2
- * (c) 2013, Luke Bonham
- * (c) 2010-2012, Peter Hofmann
-
+
+ Licensed under GNU General Public License v2
+ * (c) 2013, Luke Bonham
+ * (c) 2010-2012, Peter Hofmann
+
--]]
local debug = require("debug")
--]]
local debug = require("debug")
local tag = require("awful.tag")
local beautiful = require("beautiful")
local ipairs = ipairs
local tag = require("awful.tag")
local beautiful = require("beautiful")
local ipairs = ipairs
-local math = { floor = math.floor,
+local math = { floor = math.floor,
max = math.max,
min = math.min }
local tonumber = tonumber
max = math.max,
min = math.min }
local tonumber = tonumber
-
- Lain
- Layouts, widgets and utilities for Awesome WM
-
- Utilities section
-
- Licensed under GNU General Public License v2
- * (c) 2013, Luke Bonham
- * (c) 2010-2012, Peter Hofmann
-
+
+ Lain
+ Layouts, widgets and utilities for Awesome WM
+
+ Utilities section
+
+ Licensed under GNU General Public License v2
+ * (c) 2013, Luke Bonham
+ * (c) 2010-2012, Peter Hofmann
+
--]]
local awful = require("awful")
--]]
local awful = require("awful")
local math = { sqrt = math.sqrt }
local mouse = mouse
local pairs = pairs
local math = { sqrt = math.sqrt }
local mouse = mouse
local pairs = pairs
+local string = { gsub = string.gsub }
local client = client
local screen = screen
local tonumber = tonumber
local client = client
local screen = screen
local tonumber = tonumber
-
- Licensed under MIT License
- * (c) 2013, Luke Bonham
- * (c) 2009, Uli Schlachter
- * (c) 2009, Majic
-
+
+ Licensed under MIT License
+ * (c) 2013, Luke Bonham
+ * (c) 2009, Uli Schlachter
+ * (c) 2009, Majic
+
--]]
local beautiful = require("beautiful")
--]]
local beautiful = require("beautiful")
-
- Licensed under GNU General Public License v2
- * (c) 2013, Luke Bonham
- * (c) 2010, Adrian C. <anrxc@sysphere.org>
-
+
+ Licensed under GNU General Public License v2
+ * (c) 2013, Luke Bonham
+ * (c) 2010, Adrian C. <anrxc@sysphere.org>
+
--]]
local newtimer = require("lain.helpers").newtimer
--]]
local newtimer = require("lain.helpers").newtimer
local io = { popen = io.popen }
local math = { modf = math.modf }
local io = { popen = io.popen }
local math = { modf = math.modf }
-local string = { format = string.format,
+local string = { format = string.format,
match = string.match,
rep = string.rep }
local tonumber = tonumber
match = string.match,
rep = string.rep }
local tonumber = tonumber
font = beautiful.font:sub(beautiful.font:find(""), beautiful.font:find(" ")),
font_size = "11",
color = beautiful.fg_focus,
font = beautiful.font:sub(beautiful.font:find(""), beautiful.font:find(" ")),
font_size = "11",
color = beautiful.fg_focus,
f:close()
-- Capture mixer control state: [5%] ... ... [on]
f:close()
-- Capture mixer control state: [5%] ... ... [on]
- local volu, mute = string.match(mixer, "([%d]+)%%.*%[([%l]*)")
+ local volu, mute = string.match(mixer, "([%d]+)%%.*%[([%l]*)")
if volu == nil then
volu = 0
if volu == nil then
volu = 0
local dactive = active - cpu.last_active
local dtotal = total - cpu.last_total
local dactive = active - cpu.last_active
local dtotal = total - cpu.last_total
- usage = tostring(math.ceil((dactive / dtotal) * 100))
+ cpu_now = {}
+ cpu_now.usage = tostring(math.ceil((dactive / dtotal) * 100))
widget = cpu.widget
settings()
widget = cpu.widget
settings()
helpers.set_map("fs", false)
function update()
helpers.set_map("fs", false)
function update()
local f = io.popen("LC_ALL=C df -kP")
local f = io.popen("LC_ALL=C df -kP")
if used >= 99 and not helpers.get_map("fs")
then
if used >= 99 and not helpers.get_map("fs")
then
title = "warning",
text = partition .. " ran out!\nmake some room",
timeout = 8,
title = "warning",
text = partition .. " ran out!\nmake some room",
timeout = 8,
local io = { popen = io.popen }
local string = { format = string.format,
gsub = string.gsub }
local io = { popen = io.popen }
local string = { format = string.format,
gsub = string.gsub }
+local tonumber = tonumber
local setmetatable = setmetatable
local setmetatable = setmetatable
icon = helpers.icons_dir .. "mail.png",
position = "top_left"
}
icon = helpers.icons_dir .. "mail.png",
position = "top_left"
}
curl = string.format("%s --url imaps://%s:%s/INBOX -u %s:%s %s -k",
head_command, server, port, mail, password, request)
curl = string.format("%s --url imaps://%s:%s/INBOX -u %s:%s %s -k",
head_command, server, port, mail, password, request)
t, mailcount = string.gsub(ws, "%d", "")
t = nil -- because it's useless
t, mailcount = string.gsub(ws, "%d", "")
t = nil -- because it's useless
+ mailcount = tonumber(mailcount)
widget = imap.widget
settings()
widget = imap.widget
settings()
-
- Licensed under GNU General Public License v2
- * (c) 2013, Luke Bonham
- * (c) 2010-2012, Peter Hofmann
-
+
+ Licensed under GNU General Public License v2
+ * (c) 2013, Luke Bonham
+ * (c) 2010-2012, Peter Hofmann
+
--]]
local newtimer = require("lain.helpers").newtimer
--]]
local newtimer = require("lain.helpers").newtimer
helpers.set_map(iface, true)
helpers.set_map(iface, true)
net_now = {}
if iface == "" then iface = net.get_device() end
net_now = {}
if iface == "" then iface = net.get_device() end
local f = io.open("/proc/loadavg")
local ret = f:read("*all")
f:close()
local f = io.open("/proc/loadavg")
local ret = f:read("*all")
f:close()
load_1, load_5, load_15 = string.match(ret, "([^%s]+) ([^%s]+) ([^%s]+)")
widget = sysload.widget
load_1, load_5, load_15 = string.match(ret, "([^%s]+) ([^%s]+) ([^%s]+)")
widget = sysload.widget