diff --git a/lain b/lain index 6796803..c375141 160000 --- a/lain +++ b/lain @@ -1 +1 @@ -Subproject commit 6796803a40fd31c05566dad437a54f4e995a4c8f +Subproject commit c37514124a09ecd9532ca15a86e31aa4c15e46e2 diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index b49c66a..9f573d0 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -15,8 +15,6 @@ local beautiful = require("beautiful") local naughty = require("naughty") local drop = require("scratchdrop") local lain = require("lain") - -local separators = require("separators") -- }}} -- {{{ Error handling @@ -112,6 +110,7 @@ mymainmenu = awful.menu.new({ items = require("menugen").build_menu(), -- {{{ Wibox markup = lain.util.markup +separators = lain.util.separators -- Textclock clockicon = wibox.widget.imagebox(beautiful.widget_clock) @@ -247,8 +246,8 @@ netwidget = lain.widgets.net({ spr = wibox.widget.textbox(' ') arrl = wibox.widget.imagebox() arrl:set_image(beautiful.arrl) -arrl_dl = separators:left(beautiful.bg_focus, "alpha") -arrl_ld = separators:left("alpha", beautiful.bg_focus) +arrl_dl = separators.arrow_left(beautiful.bg_focus, "alpha") +arrl_ld = separators.arrow_left("alpha", beautiful.bg_focus) -- Create a wibox for each screen and add it mywibox = {} diff --git a/separators/init.lua b/separators/init.lua deleted file mode 100644 index ac8f276..0000000 --- a/separators/init.lua +++ /dev/null @@ -1,97 +0,0 @@ -local wibox = require("wibox") -local beautiful = require("beautiful") -local gears = require("gears") -local naughty = require("naughty") - -local separators = {} - -local height = beautiful.awful_widget_height or 0 -local width = beautiful.separators_width or 9 - - --- Back -function separators:right(col1, col2) - local widget = wibox.widget.base.make_widget() - - widget.fit = function(m, w, h) - return width, height - end - - widget.draw = function(mycross, wibox, cr, width, height) - if col2 ~= "alpha" then - cr:set_source_rgb(gears.color.parse_color(col2)) - cr:new_path() - cr:move_to(0, 0) - cr:line_to(width, height/2) - cr:line_to(width, 0) - cr:close_path() - cr:fill() - - cr:new_path() - cr:move_to(0, height) - cr:line_to(width, height/2) - cr:line_to(width, height) - cr:close_path() - cr:fill() - end - if col1 ~= "alpha" then - cr:set_source_rgb(gears.color.parse_color(col1)) - - cr:new_path() - cr:move_to(0, 0) - cr:line_to(width, height/2) - cr:line_to(0, height) - cr:close_path() - cr:fill() - - end - - end - return widget -end - - --- Normal -function separators:left(col1, col2) - local widget = wibox.widget.base.make_widget() - - widget.fit = function(m, w, h) - return width, height - end - - widget.draw = function(mycross, wibox, cr, width, height) - if col1 ~= "alpha" then - cr:set_source_rgb(gears.color.parse_color(col1)) - - cr:new_path() - cr:move_to(width, 0) - cr:line_to(0, height/2) - cr:line_to(0, 0) - cr:close_path() - - cr:fill() - - cr:new_path() - cr:move_to(width, height) - cr:line_to(0, height/2) - cr:line_to(0, height) - cr:close_path() - - cr:fill() - end - if col2 ~= "alpha" then - cr:new_path() - cr:move_to(width, 0) - cr:line_to(0, height/2) - cr:line_to(width, height) - cr:close_path() - - cr:set_source_rgb(gears.color.parse_color(col2)) - cr:fill() - end - - end - return widget -end - -return separators