diff options
author | Tom Willemsen | 2010-12-05 12:25:01 +0100 |
---|---|---|
committer | Tom Willemsen | 2010-12-05 12:26:55 +0100 |
commit | 608117225178a49638e3ec663b1940b0dc2d564e (patch) | |
tree | fbd959656bcc7a55b235a42d317161a666e5d74b /config/awesome/functions.lua | |
parent | 96d8de83b8b0c614b6be701382d105ed081ad5f7 (diff) | |
download | dotfiles-608117225178a49638e3ec663b1940b0dc2d564e.tar.gz dotfiles-608117225178a49638e3ec663b1940b0dc2d564e.zip |
Added awesome's new-colors branch
Diffstat (limited to 'config/awesome/functions.lua')
-rw-r--r-- | config/awesome/functions.lua | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/config/awesome/functions.lua b/config/awesome/functions.lua new file mode 100644 index 0000000..ee9594d --- /dev/null +++ b/config/awesome/functions.lua @@ -0,0 +1,39 @@ +-- Functions +function switch_tag (i) + local screen = mouse.screen + if tags[screen][i] then + awful.tag.viewonly(tags[screen][i]) + end +end + +function toggle_tag (i) + local screen = mouse.screen + if tags[screen][i] then + awful.tag.viewtoggle(tags[screen][i]) + end +end + +function move_to_tag (i) + if client.focus and tags[client.focus.screen][i] then + awful.client.movetotag(tags[client.focus.screen][i]) + end +end + +function toggle_client_tag (i) + if client.focus and tags[client.focus.screen][i] then + awful.client.toggletag(tags[client.focus.screen][i]) + end +end + +function fexists (n) + local f = io.open(n) + + if f == nil then + return false + end + + io.close(f) + return true +end + +module("functions") |