From a715d49bd152fa76dc6cee42f3f855298cb8ac3f Mon Sep 17 00:00:00 2001 From: luke bonham Date: Fri, 22 May 2015 09:27:30 +0200 Subject: [PATCH] #87 fix; multicolor, powerarrow-darker: textclock localization readded --- README.rst | 2 +- rc.lua.blackburn | 2 +- rc.lua.holo | 2 +- rc.lua.multicolor | 14 +++++++++++++- rc.lua.powerarrow-darker | 8 ++++++++ 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 08aab38..9cdca11 100644 --- a/README.rst +++ b/README.rst @@ -7,7 +7,7 @@ Power themes for Awesome WM 3.5+ -------------------------------- :Author: Luke Bonham -:Version: 2.0-git +:Version: git :License: BY-NC-SA_ :Source: https://github.com/copycat-killer/awesome-copycats diff --git a/rc.lua.blackburn b/rc.lua.blackburn index ec7446f..1e0648e 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -313,7 +313,7 @@ for s = 1, screen.count() do mywibox[s]:set_widget(layout) -- Set proper background, instead of beautiful.bg_normal - mywibox[s]:set_bg(beautiful.topbar_path .. tostring(screen[mouse.screen].workarea.width):gsub(".0", "") .. ".png") + mywibox[s]:set_bg(beautiful.topbar_path .. math.floor(screen[mouse.screen].workarea.width) .. ".png") end -- }}} diff --git a/rc.lua.holo b/rc.lua.holo index 3de6a0c..63e6c8d 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -442,7 +442,7 @@ for s = 1, screen.count() do mybottomwibox[s]:set_widget(bottom_layout) -- Set proper backgrounds, instead of beautiful.bg_normal - mywibox[s]:set_bg(beautiful.topbar_path .. tostring(screen[mouse.screen].workarea.width):gsub(".0", "") .. ".png") + mywibox[s]:set_bg(beautiful.topbar_path .. math.floor((screen[mouse.screen].workarea.width)) .. ".png") mybottomwibox[s]:set_bg("#242424") -- Create a borderbox above the bottomwibox diff --git a/rc.lua.multicolor b/rc.lua.multicolor index de7be2a..691f5eb 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -114,7 +114,19 @@ markup = lain.util.markup -- Textclock clockicon = wibox.widget.imagebox(beautiful.widget_clock) -mytextclock = awful.widget.textclock(markup("#7788af", "%A %d %B ") .. markup("#343639", ">") .. markup("#de5e1e", " %H:%M ")) +--mytextclock = awful.widget.textclock(markup("#7788af", "%A %d %B ") .. markup("#343639", ">") .. markup("#de5e1e", " %H:%M ")) +mytextclock = lain.widgets.abase({ + timeout = 60, + cmd = "date +'%A %d %B %R'", + settings = function() + local t_output = "" + local o_it = string.gmatch(output, "%S+") + + for i=1,3 do t_output = t_output .. " " .. o_it(i) end + + widget:set_markup(markup("#7788af", t_output) .. markup("#343639", " > ") .. markup("#de5e1e", o_it(1)) .. " ") + end +}) -- Calendar lain.widgets.calendar:attach(mytextclock, { font_size = 10 }) diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 4137a63..ee246f1 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -114,6 +114,14 @@ separators = lain.util.separators clockicon = wibox.widget.imagebox(beautiful.widget_clock) mytextclock = awful.widget.textclock(" %a %d %b %H:%M") +mytextclock = lain.widgets.abase({ + timeout = 60, + cmd = "date +'%a %d %b %R'", + settings = function() + widget:set_text(" " .. output) + end +}) + -- calendar lain.widgets.calendar:attach(mytextclock, { font_size = 10 })