aboutsummaryrefslogtreecommitdiff
path: root/config.dot/awesome.link/functions.lua
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-07-12 15:45:45 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-07-12 15:45:45 -0300
commite5b5be048c087e04bd504d4c13a48317d7a45915 (patch)
treeb18e8b9e75c148fc4a353b5b1da15ca849a8ddc6 /config.dot/awesome.link/functions.lua
parent1d37c3c4cfd5c554ea018c9ff38ab4f4e9f3dae8 (diff)
downloadawesome-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.lua15
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
+-- }}}