streetturtle / awesome-wm-widgets

Widgets for Awesome Window Manager
http://pavelmakhov.com/awesome-wm-widgets/
MIT License
2.16k stars 279 forks source link

[Calendar] `focus_date_bg` and `focus_date_fg` broken after updating to last commits #426

Closed xfzv closed 1 year ago

xfzv commented 1 year ago

After updating to Oct 8, 2023 commits:

focus_date_bg and focus_date_fg colors are no longer working on my end, regardless of which theme is used. Reverting to 7702f00efad8c1bcfa34b9e5cce4e99f3ac8bf1a solves the issue for me.

Screenshots (before/after):

My config:

local lain = require("lain")
local markup = lain.util.markup
local wibox = require("wibox")

local calendar_widget = require("awesome-wm-widgets.calendar-widget.calendar")

local textclock = wibox.widget.textclock(
  markup("#CBA6F7", "🗓️")
    .. markup("#CDD6F4", " %a %b %d ")
    .. markup("#94E2D5", " 🕗")
    .. markup("#CDD6F4", " %H:%M ")
)

local cw = calendar_widget({
  theme = "naughty",
  placement = "top_right",
  previous_month_button = 4,
  next_month_button = 5,
})

textclock:connect_signal("button::press", function(_, _, _, button)
  if button == 1 then
    cw.toggle()
  end
end)

return textclock

Anyone else? Pinging @Luka5W considering he's the author of said commits.

Luka5W commented 1 year ago

the themes implementation in widgets seems a little bit complicated/ inconsistant imo but im not good at lua and new to awesome.

i'm using the theme light and its working fine. (see your 3rd screenshot https://user-images.githubusercontent.com/78810647/284698170-b4fe7024-c5a4-4c3b-bdd6-0c38dff2267d.png) but i found this mysterious comment below: --theme = 'naughty', -- naughty theme is broken in my rc.lua.

what is lain/ markup? have you tried making a backup of your user config, copying the default config (/etc/xdg/awesome/rc.lua) to yor config dir and modify it? this is my config

-- Create a textclock widget
mytextclock = wibox.widget.textclock('%a, %Y-<b>%m</b>-<b>%d</b> // <b>%H</b>:<b>%M</b>:%S', 1)
local cw = calendar_widget({
    theme = 'light',
    --theme = 'naughty', -- naughty theme is broken
    placement = 'top_right',
    radius = 8,
    week_numbers = true,
})

i have not looked in the code yet but i believe the themes were designed for that broken naughty theme - or i have an old version or something. i guess i find some time in the next few days. streetturtle could revert the changes otherwise as a hotfix.

xfzv commented 1 year ago

Thank you for the reply.

what is lain/ markup?

This is a tool that I use to customize font/color for some of my widgets.

I did some further tests. It seems that this is the change causing the issue, reverting it solves it on my end.

https://github.com/streetturtle/awesome-wm-widgets/commit/782f27168d857e09385dbb8585e059832afa056a#diff-3b353f097c213fdeca54038e3547aceb95ded674754ea27f7c94bac5e5044ceeL177-L178

- bg = default_bg,
+ bg = props.bg_color or default_bg,

It doesn't seem to lead to any additional breakage. I tried all the themes (including naughty that I use personally). No issue either with

start_sunday = true,
week_numbers = true,

image

Plus, I cannot reproduce #316 either.

If that's OK, I can create a PR.

Luka5W commented 1 year ago

not quite sure what happened but i've got a (very) different version of calendar.lua. i believe i messed things up when i merged stuff in my fork -.-

Luka5W commented 1 year ago

naughty is kind of fixed with that solution. but i messed my codes completely now...

i believe it is because my theme (gtk) doesnt specify fg andbg but fg_normal and bg_normal.

the current behavior is:

cell(s) bold bg color fg color
month/ year yes default default
week days yes default default
week nums no default default
week days no default default
weekend no focus default
today yes fg color bg color

focus (for internal themes) = any color which is a little bit lighter for dark themes or darker for light themes. focus (for naughty theme) = focus color default fg (for naughty theme) = beautiful.notification_fg or beautiful.fg or beautiful.fg_normal default bg (for naughty theme) = beautiful.notification_bg or beautiful.bg or beautiful.bg_normal