i use pycalendar  and this is how i call it..

widget.Clock(
                       foreground = colors[9],
                       background = colors[0],
                       mouse_callbacks = {"Button1": calendar},
                       format = "%a, %b %d | %l:%M:%S  ",
                       padding = 5
                       ),

then i have this in my callbacks..

def calendar():
    qtile.cmd_spawn("./.config/qtile/scripts/calendar/calendar.sh")

hope this helps

On Tue, Mar 2, 2021 at 4:55 PM Kai Stian Olstad <[email protected]>
wrote:

> On 02.03.2021 21:34, Tycho Andersen wrote:
> > On Tue, Mar 02, 2021 at 12:29:48PM -0800, David Budzynski wrote:
> >> widget.Clock(
> >> format = '%b %d %A %H:%M:%S',
> >> mouse_callbacks = {"Button1": lambda: qtile.cmd_spawn("alacritty -e
> >> cal -3"
> >> )}
> >> )
> >>
> >> when I click on the clock it looks like alacritty opens for a split of
> >> a
> >> second and quickly disappears. Any reasons why I cannot get cal
> >> command to
> >> open?
> >
> > It is probably working just fine: alacritty opens, cal runs, exits,
> > and then alacritty closes since the process `cal' exited.
> >
> > Try the equivalent of "sh -c 'cal && sleep 200'".
>
> or just add --hold option to alacritty and it wont close when cal exits.
>
> --
> Kai Stian Olstad
>
> --
> 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/f6ae4b10e4afcbafe8cbb1d00458efbd%40olstad.com
> .
>

-- 
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/CANFxQgT_jzLVa_SkP8wker9Jayz51ooXr96busR9EP-O2wCZgQ%40mail.gmail.com.

Reply via email to