mirror of
https://github.com/elenapan/dotfiles.git
synced 2026-05-11 17:35:57 +08:00
Add screenkey app function
This commit is contained in:
parent
6526374bc4
commit
c46018d22b
1 changed files with 9 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue