Code
-- Выключение компа по установленному времени
function shutdown_time()
awful.prompt.run {
prompt = '<b>(часы:минуты) Name URL: </b>',
bg_cursor = '#FFFF00',
textbox = mouse.screen.mypromptbox.widget,
exe_callback = function(input)
if not input or #input == 0 then return end
naughty.notify{ text = 'Comp is Shutdown at ' .. input .. '\n' .. 'Use shutdown -c to Сancel', timeout = 0, hover_timeout = 0.1 }
awful.spawn.with_shell('shutdown -P ' .. input)
end
}
end
![](https://cdn-images.postach.io/0bf2596f-b9f6-cdf2-56b4-23ceabfac4fd/464da1eb-b868-ae28-de37-cfea7a100040/49f24957-4f92-1182-838b-bcc34d4bc6d6.png)
![](https://cdn-images.postach.io/0bf2596f-b9f6-cdf2-56b4-23ceabfac4fd/464da1eb-b868-ae28-de37-cfea7a100040/972067de-5a62-55d6-e1f6-8508fedf974f.png)