diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-07-12 15:45:45 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-07-12 15:45:45 -0300 |
commit | e5b5be048c087e04bd504d4c13a48317d7a45915 (patch) | |
tree | b18e8b9e75c148fc4a353b5b1da15ca849a8ddc6 /config.dot/awesome.link/functions.lua | |
parent | 1d37c3c4cfd5c554ea018c9ff38ab4f4e9f3dae8 (diff) | |
download | awesome-e5b5be048c087e04bd504d4c13a48317d7a45915.tar.gz awesome-e5b5be048c087e04bd504d4c13a48317d7a45915.tar.bz2 |
Refactor for 4.x compatibility
Diffstat (limited to 'config.dot/awesome.link/functions.lua')
-rw-r--r-- | config.dot/awesome.link/functions.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/config.dot/awesome.link/functions.lua b/config.dot/awesome.link/functions.lua index aa98502..f596053 100644 --- a/config.dot/awesome.link/functions.lua +++ b/config.dot/awesome.link/functions.lua @@ -2,3 +2,18 @@ function file_exists(name) local f=io.open(name,"r") if f~=nil then io.close(f) return true else return false end end + +-- {{{ Helper functions +function client_menu_toggle_fn() + local instance = nil + + return function () + if instance and instance.wibox.visible then + instance:hide() + instance = nil + else + instance = awful.menu.clients({ theme = { width = 250 } }) + end + end +end +-- }}} |