mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-22 11:12:31 +00:00
dremora and rainbow calendar fixed for day < 10
This commit is contained in:
parent
845c547b59
commit
d0f0158810
|
@ -24,6 +24,7 @@ Notable features:
|
|||
- PNG taskbar
|
||||
- No borders when there's only one visible client
|
||||
- Powerful volume bar
|
||||
- Custom layouts
|
||||
|
||||
They're scattered all over the set, so try each theme and choose the one you enjoy the most.
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ local ipairs = ipairs
|
|||
local math = math
|
||||
local tag = require("awful.tag")
|
||||
|
||||
--- Tiled layouts module for awful
|
||||
module("layouts.tilegaps")
|
||||
|
||||
local function tile_group(cls, wa, orientation, fact, group)
|
||||
|
|
|
@ -179,11 +179,17 @@ end
|
|||
|
||||
function show_calendar(inc_offset, t_out)
|
||||
remove_calendar()
|
||||
local c_text
|
||||
|
||||
local f, c_text
|
||||
local today = tonumber(os.date('%d'))
|
||||
|
||||
if inc_offset == 0 then
|
||||
local f = io.popen('/usr/bin/cal | sed -r -e "s/(^| )(`date +\\"%d\\"`)($| )/\\1<b><span foreground=\\"#121212\\" background=\\"#D7D7D7\\">\\2<\\/span><\\/b>\\3/"',"r")
|
||||
c_text = "<tt><span weight='bold' font='Tamsyn 12'>" .. f:read() .. "</span>\n\n<span font='Tamsyn 12'>" .. f:read() .. "\n" .. f:read("*all") .. "</span></tt>"
|
||||
if today < 10 then
|
||||
f = io.popen('/usr/bin/cal | sed -r -e "s/(^| )( ' .. today .. ')($| )/\\1<b><span foreground=\\"#242424\\" background=\\"#D4D4D4\\">\\2<\\/span><\\/b>\\3/"',"r")
|
||||
else
|
||||
f = io.popen('/usr/bin/cal | sed -r -e "s/(^| )(' .. today .. ')($| )/\\1<b><span foreground=\\"#242424\\" background=\\"#D4D4D4\\">\\2<\\/span><\\/b>\\3/"',"r")
|
||||
end
|
||||
c_text = "<tt><span font='Tamsyn 12'><b>" .. f:read() .. "</b>\n\n" .. f:read() .. "\n" .. f:read("*all") .. "</span></tt>"
|
||||
f:close()
|
||||
offset = 0
|
||||
else
|
||||
|
|
|
@ -177,7 +177,7 @@ gray = "<span color='#9e9e9e'>"
|
|||
-- Textclock widget
|
||||
mytextclock = awful.widget.textclock(white .. "%H:%M" .. coldef)
|
||||
|
||||
-- attached calendar
|
||||
-- Calendar notification
|
||||
local tonumber = tonumber
|
||||
local calendar = nil
|
||||
local offset = 0
|
||||
|
@ -191,11 +191,16 @@ end
|
|||
|
||||
function show_calendar(inc_offset, t_out)
|
||||
remove_calendar()
|
||||
local c_text
|
||||
local f, c_text
|
||||
local today = tonumber(os.date('%d'))
|
||||
|
||||
if inc_offset == 0 then
|
||||
local f = io.popen('/usr/bin/cal | sed -r -e "s/(^| )(`date +\\"%d\\"`)($| )/\\1<b><span foreground=\\"#242424\\" background=\\"#D7D7D7\\">\\2<\\/span><\\/b>\\3/"',"r")
|
||||
c_text = "<tt><span weight='bold' font='Tamsyn 12'>" .. f:read() .. "</span>\n\n<span font='Tamsyn 12'>" .. f:read() .. "\n" .. f:read("*all") .. "</span></tt>"
|
||||
if today < 10 then
|
||||
f = io.popen('/usr/bin/cal | sed -r -e "s/(^| )( ' .. today .. ')($| )/\\1<b><span foreground=\\"#242424\\" background=\\"#D4D4D4\\">\\2<\\/span><\\/b>\\3/"',"r")
|
||||
else
|
||||
f = io.popen('/usr/bin/cal | sed -r -e "s/(^| )(' .. today .. ')($| )/\\1<b><span foreground=\\"#242424\\" background=\\"#D4D4D4\\">\\2<\\/span><\\/b>\\3/"',"r")
|
||||
end
|
||||
c_text = "<tt><span font='Tamsyn 12'><b>" .. f:read() .. "</b>\n\n" .. f:read() .. "\n" .. f:read("*all") .. "</span></tt>"
|
||||
f:close()
|
||||
offset = 0
|
||||
else
|
||||
|
@ -214,7 +219,7 @@ function show_calendar(inc_offset, t_out)
|
|||
end
|
||||
|
||||
f = io.popen('/usr/bin/cal ' .. month .. ' ' .. year ,"r")
|
||||
c_text = "<tt><span weight='bold' font='Tamsyn 12'>" .. f:read() .. "</span>\n\n<span font='Tamsyn 12'>" .. f:read() .. "\n" .. f:read("*all") .. "</span></tt>"
|
||||
c_text = "<tt><span font='Tamsyn 12'><b>" .. f:read() .. "</b>\n\n" .. f:read() .. "\n" .. f:read("*all") .. "</span></tt>"
|
||||
f:close()
|
||||
end
|
||||
|
||||
|
@ -922,9 +927,7 @@ awful.rules.rules = {
|
|||
properties = { floating = true } },
|
||||
|
||||
{ rule = { class = "Dwb" },
|
||||
properties = { tag = tags[1][1],
|
||||
maximized_horizontal = true,
|
||||
maximized_vertical = true } },
|
||||
properties = { tag = tags[1][1] } },
|
||||
|
||||
{ rule = { instance = "plugin-container" },
|
||||
properties = { tag = tags[1][1] } },
|
||||
|
|
|
@ -12,7 +12,6 @@ themes_dir = os.getenv("HOME") .. "/.config/awe
|
|||
theme.wallpaper = themes_dir .. "/wall.png"
|
||||
|
||||
theme.font = "Tamsyn 10"
|
||||
--theme.font = "Ohsnapu 12"
|
||||
theme.fg_normal = "#9E9E9E"
|
||||
theme.fg_focus = "#EBEBFF"
|
||||
theme.bg_normal = "#242424"
|
||||
|
@ -33,7 +32,6 @@ theme.taglist_squares_sel = themes_dir .. "/icons/square_sel.p
|
|||
theme.taglist_squares_unsel = themes_dir .. "/icons/square_unsel.png"
|
||||
theme.widget_mail_notify = themes_dir .. "/icons/mail_notify.png"
|
||||
theme.widget_no_net_notify = themes_dir .. "/icons/no_net_notify.png"
|
||||
theme.vol_mute = themes_dir .. "/icons/vol_mute.png"
|
||||
|
||||
theme.layout_txt_tile = "[t]"
|
||||
theme.layout_txt_tilegaps = "[t2]"
|
||||
|
|
Loading…
Reference in a new issue