2021-08-01 07:24:26 -07:00
|
|
|
return {
|
|
|
|
|
|
|
|
system = {
|
|
|
|
shutdown = function(confirm_prompt)
|
|
|
|
if (string.lower(confirm_prompt) == "y") or (string.lower(confirm_prompt) == "yes") then
|
|
|
|
awful.spawn("shutdown now", false)
|
|
|
|
elseif (string.lower(confirm_prompt) == "r") or (string.lower(confirm_prompt) == "reset") then
|
|
|
|
awful.spawn("shutdown -r now", false)
|
|
|
|
end
|
2021-11-28 19:49:38 -08:00
|
|
|
end,
|
|
|
|
|
|
|
|
lock = function()
|
|
|
|
awful.spawn(script_dir .. "lock " .. beautiful.icons.lockicon, false)
|
2021-08-01 07:24:26 -07:00
|
|
|
end
|
|
|
|
},
|
|
|
|
|
|
|
|
backlight = {
|
|
|
|
redshift = function(temp)
|
|
|
|
awful.spawn("redshift -O " .. tostring(temp), false)
|
|
|
|
end,
|
|
|
|
|
|
|
|
redshift_reset = function()
|
|
|
|
awful.spawn("redshift -x", false)
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
rofi = {
|
|
|
|
launcher = function()
|
2022-04-24 09:10:12 -07:00
|
|
|
awful.spawn("rofi -show drun -theme \"" .. bin_dir .. "/rofi/launcher.rasi\"")
|
2021-08-01 07:24:26 -07:00
|
|
|
end
|
|
|
|
},
|
|
|
|
|
|
|
|
capture = function(source, target)
|
|
|
|
awful.spawn(script_dir .. "capture " .. source .. " " .. target, false)
|
|
|
|
end,
|
|
|
|
|
|
|
|
flameshot = {
|
|
|
|
gui = function()
|
2022-03-19 11:01:38 -07:00
|
|
|
--awful.spawn("flameshot gui -p \"" .. conf.screenshot_dir .. "\"", false)
|
|
|
|
awful.spawn("flameshot gui", false)
|
2021-08-01 07:24:26 -07:00
|
|
|
end
|
|
|
|
},
|
|
|
|
|
|
|
|
mpc = {
|
|
|
|
watch = function(command, timeout, callback, widget)
|
|
|
|
awful.widget.watch("mpc --host " .. conf.mpd_host .. " " .. command, timeout, callback, widget)
|
|
|
|
end,
|
|
|
|
|
|
|
|
command = function(command, callback)
|
|
|
|
awful.spawn.easy_async("mpc --host " .. conf.mpd_host .. " " .. command, callback)
|
|
|
|
end
|
|
|
|
}
|
|
|
|
}
|