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
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()
24 widget.fit = function(m, w, h)
25 return separators.width, separators.height
28 widget.update = function(col1, col2)
31 widget:emit_signal("widget::redraw_needed")
34 widget.draw = function(mycross, wibox, cr, width, height)
35 if widget.col2 ~= "alpha" then
36 cr:set_source_rgb(gears.color.parse_color(widget.col2))
39 cr:line_to(width, height/2)
46 cr:line_to(width, height/2)
47 cr:line_to(width, height)
52 if widget.col1 ~= "alpha" then
53 cr:set_source_rgb(gears.color.parse_color(widget.col1))
56 cr:line_to(width, height/2)
67 function separators.arrow_left(col1, col2)
68 local widget = wibox.widget.base.make_widget()
72 widget.fit = function(m, w, h)
73 return separators.width, separators.height
76 widget.update = function(col1, col2)
79 widget:emit_signal("widget::redraw_needed")
82 widget.draw = function(mycross, wibox, cr, width, height)
83 if widget.col1 ~= "alpha" then
84 cr:set_source_rgb(gears.color.parse_color(widget.col1))
87 cr:line_to(0, height/2)
93 cr:move_to(width, height)
94 cr:line_to(0, height/2)
100 if widget.col2 ~= "alpha" then
103 cr:line_to(0, height/2)
104 cr:line_to(width, height)
107 cr:set_source_rgb(gears.color.parse_color(widget.col2))