]>
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 (parent:
3192a93 )
local tpbat_notification = nil
function tpbat:hide()
local tpbat_notification = nil
function tpbat:hide()
- if tpbat_notification ~= nil then
+ if tpbat_notification ~= nil
+ then
naughty.destroy(tpbat_notification)
tpbat_notification = nil
end
naughty.destroy(tpbat_notification)
tpbat_notification = nil
end
local time = bat:remaining_time()
local msg = "\t"
local time = bat:remaining_time()
local msg = "\t"
- if status ~= "idle" and status ~= "nil" then
- if time == "N/A" then
+ if status ~= "idle" and status ~= "nil"
+ then
+ if time == "N/A"
+ then
msg = "...Calculating time remaining..."
else
msg = time .. (status == "charging" and " until charged" or " remaining")
msg = "...Calculating time remaining..."
else
msg = time .. (status == "charging" and " until charged" or " remaining")
tpbat.widget = wibox.widget.textbox('')
tpbat.widget = wibox.widget.textbox('')
- if bat:get('state') == nil then
+ if bat:get('state') == nil
+ then
local n = naughty.notify({
title = "SMAPI Battery Warning: Unable to read battery state!",
text = "This widget is intended for ThinkPads. Is tp_smapi installed? Check your configs & paths.",
local n = naughty.notify({
title = "SMAPI Battery Warning: Unable to read battery state!",
text = "This widget is intended for ThinkPads. Is tp_smapi installed? Check your configs & paths.",
local time_val = bat_now.status == 'discharging' and 'remaining_running_time' or 'remaining_charging_time'
local mins_left = self:get(time_val)
local time_val = bat_now.status == 'discharging' and 'remaining_running_time' or 'remaining_charging_time'
local mins_left = self:get(time_val)
- if mins_left:find("^%d+") == nil then
- return "N/A"
+ if mins_left:find("^%d+") == nil
+ then
+ return "N/A"
end
local hrs = mins_left / 60
end
local hrs = mins_left / 60