Add screenkey app function

This commit is contained in:
elenapan 2020-03-26 02:01:12 +02:00
parent 6526374bc4
commit c46018d22b

View file

@ -74,6 +74,15 @@ apps.night_mode = function ()
end)
end
local screenkey_notif
apps.screenkey = function ()
local cmd = "pgrep screenkey > /dev/null && (pkill screenkey && echo 'OFF') || (echo 'ON' && screenkey --ignore Caps_Lock &>/dev/null &)"
awful.spawn.easy_async_with_shell(cmd, function(out)
local message = out:match('ON') and "Activated!" or "Deactivated!"
screenkey_notif = notifications.notify_dwim({ title = "Screenkey", message = message, app_name = "screenkey", icon = icons.keyboard }, screenkey_notif)
end)
end
apps.record = function ()
awful.spawn.with_shell("screenrec.sh")
end