File: focus-link.1

package info (click to toggle)
fvwm 1:2.6.7-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 16,752 kB
  • ctags: 14,275
  • sloc: ansic: 145,770; xml: 17,086; perl: 7,302; sh: 4,885; makefile: 1,055; yacc: 688; python: 629; lex: 188; sed: 11
file content (180 lines) | stat: -rw-r--r-- 4,676 bytes parent folder | download | duplicates (10)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
.TH focus-link.pl 1
.SH  NAME
focus-link.pl - perl FvwmCommand script
.SH  SYNOPSIS
focus-link.pl [-v]
.SH  OPTION
-v  show version number and exit.
.SH  DESCRIPTION
This is a user programmable window focus script.
It requires FvwmCommand version 1.5 or later.
FvwmCommandS must be invoked from fvwm prior to this command.

This script can be invoked from a shell or from .fvwm2rc. For example.

   AddToFunc "InitFunction"
   + "I" Exec exec xcb -n 4 -l vertical -g 240x180-0+530
   + "I" Exec sleep 2; $HOME/scripts/focus-link.pl

Sleep is used in order to avoid un-necessary reaction during initial
window creation. Note, fvwm itself continues to run during these 2 seconds.

Default behavior is listed below.
In order to change the behavior, modify user_function using user
functions.
.IP 1.
When a window is opened up, focus the window and move the pointer
to it. The parent window regains focus when a window is closed.
Parenthood is determined when a window is opened. It is the last
focused window with the same X class.
.IP 2.
#1 would not occur to AcroRead opening window.
.IP 3.
#1 would not occur when SkipMapping is set and the window is the
only window of its class.
.IP 4.
For Netscape find dialog window, addition to #1, resize the window
to 300x150 pixels and move it to East edge of the screen.
Download/upload windows will not be focused nor be in focus link
list.
.IP 5.
Move appletviewer to NorthWest corner.
.IP 6.
Xterm won't focus back to its parent after closed.
.IP 7.
When a window is de-iconified, focus it and move the pointer.

.SH  USER FUNCTIONS
These are collection of functions a user can call from programmable
section.
.SS  move_window [<id>] <direction>
  or
.SS  move_window [<id>] <x> <y>

If <id> is prensent in hex format, then move <id> window.
Otherwise, move the window in question.

If <y> is present, move window to <x> <y> in percentage of screen.

If 'p' is appended to <width> or <height>, it specifies in
pixel count. And, if <width'p'> or <height'p'> is lead with '-',
it signifies that pixel count from right or bottom edge.

If <y> does not exist, <dir> must be one of North Northeast East
Southeast South Southwest West Northwest to move window to edge.
.SS  resize_window [<id>] <width> <height>

Resize window to <width> and <height> in percentage of screen size.

If <id> is not null, resize <id>. Otherwise resize the
window in question.

Letter 'p' can be appended to <width> and <height> to specify in
pixel count.
.SS  focus_window [<id>]

If <id> is not null, focus on <id>.
Otherwise, focus on the window in question.
.SS  warp_to_window [<id>] [<x> <y>]

Move pointer to window.

If <id> is a window id, warp to <id>.
Otherwise, warp to the window in question.

If <x> and <y> are present, warp to <x> and <y> percentage of window
size down and in from the upper left hand corner.

Letter 'p' can be appended to <width> and <height> to specify in pixel
count.
.SS  class_matches <class> [<resource>]

Check if window class and optional resource match.

If arg1 is present, and if class matches with <class> and resource
matches with <resource>, then return 1.

If arg1 is not present, and if class matches with <class> then
return 1.
Otherwise, return null.
.SS  window_flag [<id>] <flag>

Return 1 if <flag> is true in the window in question.
If <id> is not null, check on <id>. Otherwise check on the
window in question.
<flag> must be a exact match to one of these:

  StartIconic
  OnTop
  Sticky
  WindowListSkip
  SuppressIcon
  NoiconTitle
  Lenience
  StickyIcon
  CirculateSkipIcon
  CirculateSkip
  ClickToFocus
  SloppyFocus
  SkipMapping
  Handles
  Title
  Mapped
  Iconified
  Transient
  Visible
  IconOurs
  PixmapOurs
  ShapedIcon
  Maximized
  WmTakeFocus
  WmDeleteWindow
  IconMoved
  IconUnmapped
  MapPending
  HintOverride
  MWMButtons
  MWMBorders
.SS  resource_matches <resource>
Check if window resource matches pattern <resource>.
If it matches, return 1.
Otherwise return null.
.SS  action_was <action>
Check if <action> was taken place.

<action> must be a exact match to one of these:

  new page
  new desk
  add
  raise
  lower
  focus change
  destroy
  iconify
  deiconify
  windowshade
  dewindowshade
  end windowlist
  icon location
  end configinfo
  string
.SS  get_parent_window [<id>]

Return parent window id.

If <id> is not null, check on <id>. Otherwise check on the
window in question.
.SS  no_parent_window [<id>]

Return 1 if no parent window exits.

If <id> is not null, check on <id>. Otherwise check on the
window in question.
.SS  delete_from_list

Delete the window from link list
.SH  SEE ALSO
FvwmCommand
.SH  AUTHOR
Toshi Isogai  isogai@ucsub.colorado.edu