Include mod_xrandr instead of using submodules
[notion/jeffpc.git] / contrib / scripts / nowarp_scratchpad.lua
blob7c91957665c62a528448b4df245bba4f18839f96
1 -- Authors: Etan Reisner <deryni@gmail.com>
2 -- License: MIT, see http://opensource.org/licenses/mit-license.php
3 -- Last Changed: 2007-01-23
4 --
5 --[[
6 Author: Etan Reisner
7 Email: deryni@gmail.com
8 Summary: Keeps ion from warping the pointer when activating a scratchpad region.
9 Version: 0.1
10 Last Updated: 2007-01-23
12 Copyright (c) Etan Reisner 2007
14 This software is released under the terms of the MIT license. For more
15 information, see http://opensource.org/licenses/mit-license.php .
16 --]]
18 local function do_warp_alt(reg)
19 -- Make sure this is enough to always identify a scratchpad.
20 if reg.mode and reg:mode() == "unknown" then
21 return true
22 end
23 return false
24 end
26 local function setup_hooks()
27 local hook
29 hook = ioncore.get_hook("region_do_warp_alt")
30 if hook then
31 hook:add(do_warp_alt)
32 end
33 end
35 setup_hooks()
37 -- vim: set expandtab sw=4: