With the lambda? Le ven. 31 juil. 2020 à 14:39, Vlad <[email protected]> a écrit :
> Already did, but it works too good. After restart config it immediately > shutdown the computer. > > пятница, 31 июля 2020 г., 15:05:10 UTC+3 пользователь Guillaume Gelin > написал: >> >> Can't you just use subprocess.run(..., shell=True) rather than >> qtile.cmd_spawn? >> >> Le ven. 31 juil. 2020 à 13:51, Vlad <[email protected]> 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]. >>> 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/qtile-dev/aa1671c5-b84d-42b6-a231-609bded3ff4fo%40googlegroups.com > <https://groups.google.com/d/msgid/qtile-dev/aa1671c5-b84d-42b6-a231-609bded3ff4fo%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]. To view this discussion on the web visit https://groups.google.com/d/msgid/qtile-dev/CAPn4x%2BrYw6nD5kB_kVP17jJm3FZFOheAfVRM8Kqes5gDf%3DeKSQ%40mail.gmail.com.
