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.
3 Licensed under GNU General Public License v2
4 * (c) 2015, Luke Bonham
5 * (c) 2015, plotnikovanton
9 local wibox = require("wibox")
10 local gears = require("gears")
12 -- Lain Cairo separators util submodule
13 -- lain.util.separators
14 local separators = { height = 0, width = 9 }
19 function separators.arrow_right(col1, col2)
20 local widget = wibox.widget.base.make_widget()
22 widget.fit = function(m, w, h)
23 return separators.width, separators.height
26 widget.draw = function(mycross, wibox, cr, width, height)
27 if col2 ~= "alpha" then
28 cr:set_source_rgb(gears.color.parse_color(col2))
31 cr:line_to(width, height/2)
38 cr:line_to(width, height/2)
39 cr:line_to(width, height)
44 if col1 ~= "alpha" then
45 cr:set_source_rgb(gears.color.parse_color(col1))
48 cr:line_to(width, height/2)
59 function separators.arrow_left(col1, col2)
60 local widget = wibox.widget.base.make_widget()
62 widget.fit = function(m, w, h)
63 return separators.width, separators.height
66 widget.draw = function(mycross, wibox, cr, width, height)
67 if col1 ~= "alpha" then
68 cr:set_source_rgb(gears.color.parse_color(col1))
71 cr:line_to(0, height/2)
77 cr:move_to(width, height)
78 cr:line_to(0, height/2)
84 if col2 ~= "alpha" then
87 cr:line_to(0, height/2)
88 cr:line_to(width, height)
91 cr:set_source_rgb(gears.color.parse_color(col2))