mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-23 03:32:30 +00:00
#74: moved to lain as new submodule
This commit is contained in:
parent
632accdb1f
commit
b183ea3a89
2
lain
2
lain
|
@ -1 +1 @@
|
||||||
Subproject commit 6796803a40fd31c05566dad437a54f4e995a4c8f
|
Subproject commit c37514124a09ecd9532ca15a86e31aa4c15e46e2
|
|
@ -15,8 +15,6 @@ local beautiful = require("beautiful")
|
||||||
local naughty = require("naughty")
|
local naughty = require("naughty")
|
||||||
local drop = require("scratchdrop")
|
local drop = require("scratchdrop")
|
||||||
local lain = require("lain")
|
local lain = require("lain")
|
||||||
|
|
||||||
local separators = require("separators")
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Error handling
|
-- {{{ Error handling
|
||||||
|
@ -112,6 +110,7 @@ mymainmenu = awful.menu.new({ items = require("menugen").build_menu(),
|
||||||
|
|
||||||
-- {{{ Wibox
|
-- {{{ Wibox
|
||||||
markup = lain.util.markup
|
markup = lain.util.markup
|
||||||
|
separators = lain.util.separators
|
||||||
|
|
||||||
-- Textclock
|
-- Textclock
|
||||||
clockicon = wibox.widget.imagebox(beautiful.widget_clock)
|
clockicon = wibox.widget.imagebox(beautiful.widget_clock)
|
||||||
|
@ -247,8 +246,8 @@ netwidget = lain.widgets.net({
|
||||||
spr = wibox.widget.textbox(' ')
|
spr = wibox.widget.textbox(' ')
|
||||||
arrl = wibox.widget.imagebox()
|
arrl = wibox.widget.imagebox()
|
||||||
arrl:set_image(beautiful.arrl)
|
arrl:set_image(beautiful.arrl)
|
||||||
arrl_dl = separators:left(beautiful.bg_focus, "alpha")
|
arrl_dl = separators.arrow_left(beautiful.bg_focus, "alpha")
|
||||||
arrl_ld = separators:left("alpha", beautiful.bg_focus)
|
arrl_ld = separators.arrow_left("alpha", beautiful.bg_focus)
|
||||||
|
|
||||||
-- Create a wibox for each screen and add it
|
-- Create a wibox for each screen and add it
|
||||||
mywibox = {}
|
mywibox = {}
|
||||||
|
|
|
@ -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
|
|
Loading…
Reference in a new issue