At the beginning I want to do so, but 5 minutes is too long and unfortunately shutdown only has minutes and hours to set.
пятница, 31 июля 2020 г., 15:31:27 UTC+3 пользователь Arns Udovīčė написал: > > or better use commands: > shutdown 5 (schedul shutdown after 5 min) and shutdown -c (to cancel > scheduled) > > On Fri, 31 Jul 2020 at 15:05, Guillaume Gelin <[email protected] > <javascript:>> wrote: > >> Can't you just use subprocess.run(..., shell=True) rather than >> qtile.cmd_spawn? >> >> Le ven. 31 juil. 2020 à 13:51, Vlad <[email protected] <javascript:>> >> a écrit : >> >>> I want to make shutdown button with 5 seconds delay and canceling. >>> >>> mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn("sleep 5 && >>>> shutdown now"), 'Button3': lambda qtile: qtile.cmd_spawn("pkill sleep")} >>> >>> >>> This code is not working, it seems that cmd_spawn can't run two commands >>> because qtile.cmd_spawn("sleep 5") works well. >>> Any suggestions how can I realize this? >>> >>> -- >>> 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] <javascript:>. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/qtile-dev/18af6362-414b-4771-8ab9-4f80bbc5896do%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/qtile-dev/18af6362-414b-4771-8ab9-4f80bbc5896do%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> >> -- >> Guillaume Gelin >> >> -- >> 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] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/qtile-dev/CAPn4x%2BrUQTJMAkECn7%2BwLyWfTiPDZgnGYsm95ucu9ZuvrPenog%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/qtile-dev/CAPn4x%2BrUQTJMAkECn7%2BwLyWfTiPDZgnGYsm95ucu9ZuvrPenog%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Udovīčė Arns > -- 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/2c4daa6e-d1f4-4284-9bb2-f0e77a75b13co%40googlegroups.com.
