File: nowarp_scratchpad.lua

package info (click to toggle)
notion 4.0.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 4,656 kB
  • sloc: ansic: 47,365; sh: 2,093; makefile: 594; perl: 270
file content (37 lines) | stat: -rw-r--r-- 847 bytes parent folder | download | duplicates (6)
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
31
32
33
34
35
36
37
-- Authors: Etan Reisner <deryni@gmail.com>
-- License: MIT, see http://opensource.org/licenses/mit-license.php
-- Last Changed: 2007-01-23
--
--[[
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

This software is released under the terms of the MIT license. For more
information, see http://opensource.org/licenses/mit-license.php .
--]]

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: