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:
end
function redshift:toggle()
end
function redshift:toggle()
- async(string.format("%s -c 'ps -p %d -o pid='", awful.util.shell, redshift.pid), function(f)
+ async({ awful.util.shell, "-c", string.format("ps -p %d -o pid=", redshift.pid) }, function(f)
if f and #f > 0 then -- redshift is running
-- Sending -USR1 toggles redshift (See project website)
execute("pkill -USR1 redshift")
if f and #f > 0 then -- redshift is running
-- Sending -USR1 toggles redshift (See project website)
execute("pkill -USR1 redshift")
function redshift:attach(widget, fun)
redshift.update_fun = fun or function() end
if not redshift.pid then redshift:start() end
function redshift:attach(widget, fun)
redshift.update_fun = fun or function() end
if not redshift.pid then redshift:start() end
- widget:buttons(awful.util.table.join(awful.button({}, 1, function () redshift:toggle() end)))
+ if widget then
+ widget:buttons(awful.util.table.join(awful.button({}, 1, function () redshift:toggle() end)))
+ end