File: nowarp_scratchpad.lua

package info (click to toggle)
notion 3%2B2012042300-1
  • links: PTS, VCS
  • area: non-free
  • in suites: wheezy
  • size: 4,724 kB
  • sloc: ansic: 45,614; makefile: 544; sh: 409; perl: 113
file content (30 lines) | stat: -rw-r--r-- 566 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--[[
Author: Etan Reisner
Email: deryni@gmail.com
Summary: Keeps ion from warping the pointer when activating a scratchpad region.
Version: 0.1
Last Updated: 2007-01-23

Copyright (c) Etan Reisner 2007
--]]

local function do_warp_alt(reg)
	-- Make sure this is enough to always identify a scratchpad.
	if reg.mode and reg:mode() == "unknown" then
		return true
	end
	return false
end

local function setup_hooks()
	local hook

	hook = ioncore.get_hook("region_do_warp_alt")
	if hook then
		hook:add(do_warp_alt)
	end
end

setup_hooks()

-- vim: set expandtab sw=4: