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.
4 Licensed under GNU General Public License v2
5 * (c) 2015, Luke Bonham
6 * (c) 2015, plotnikovanton
10 local wibox = require("wibox")
11 local beautiful = require("beautiful")
12 local gears = require("gears")
14 -- Lain Cairo separators util submodule
15 -- lain.util.separators
18 local height = beautiful.separators_height or 0
19 local width = beautiful.separators_width or 9
24 function separators.arrow_right(col1, col2)
25 local widget = wibox.widget.base.make_widget()
27 widget.fit = function(m, w, h) return width, height end
29 widget.draw = function(mycross, wibox, cr, width, height)
30 if col2 ~= "alpha" then
31 cr:set_source_rgb(gears.color.parse_color(col2))
34 cr:line_to(width, height/2)
41 cr:line_to(width, height/2)
42 cr:line_to(width, height)
47 if col1 ~= "alpha" then
48 cr:set_source_rgb(gears.color.parse_color(col1))
51 cr:line_to(width, height/2)
62 function separators.arrow_left(col1, col2)
63 local widget = wibox.widget.base.make_widget()
65 widget.fit = function(m, w, h) return width, height end
67 widget.draw = function(mycross, wibox, cr, width, height)
68 if col1 ~= "alpha" then
69 cr:set_source_rgb(gears.color.parse_color(col1))
72 cr:line_to(0, height/2)
78 cr:move_to(width, height)
79 cr:line_to(0, height/2)
85 if col2 ~= "alpha" then
88 cr:line_to(0, height/2)
89 cr:line_to(width, height)
92 cr:set_source_rgb(gears.color.parse_color(col2))