Not sure if this is the right place to share this but I made an enhancement
to the date displayed on my bar. I like to have the full day name followed
by the number with the st ,th or nd next to the respective number. You can
see what I mean in the picture.
[image: qtile-date.png]
*I haven't modified the widget just added the following code into my config
file. I know it's not tidy but it works.*
*# Add th, nd or st to the date - use custom_date in text boxdef
suffix(d): return 'th' if 11<=d<=13 else
{1:'st',2:'nd',3:'rd'}.get(d%10, 'th')def custom_strftime(format, t):
return t.strftime(format).replace('{S}', str(t.day) + suffix(t.day))def
custom_date(): return custom_strftime('%A, {S} %B', dt.now())*
And then add the following line in your screens section.
*widget.GenPollText(func=custom_date, update_interval=1, ),*
Hope this helps someone maybe ?
--
You received this message because you are subscribed to the Google Groups
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/qtile-dev/CADrRWNbmXLCXVHh0F5wUDrsB1hbNQ6CTGhFoqbnC8ZMY0us7YA%40mail.gmail.com.