fvwm-window-search 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -5
- data/dmenu.patch +18 -17
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 580941b472f2b948d9f6d854a337a1d066646c7b3705986f76f3b429845026a3
|
4
|
+
data.tar.gz: 2e7b0a76b19a24514641ce603f35eee86f380bc8293c155014e80bfba9b24652
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e85229be05ab43082df6362ca7b4b72c5f57cfdca85835027c979f305d01c332d74d5fa6830338548e08beb0718b4b25f2cd382c03da4ff66b5bce7a05429d79
|
7
|
+
data.tar.gz: e9926afb792d151259ca4dadd48d6346da71437cbdc7642009392d08ff1e03a610b10b78e12475a58a6b901efb0551192d2977394e08e06aabdf51772e7c46e2
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Incremental window search & immediate switch to the selected window
|
|
12
12
|
|
13
13
|
## Reqs
|
14
14
|
|
15
|
-
* Ruby
|
15
|
+
* Ruby
|
16
16
|
* `xwininfo` & `xdotool` (`xorg-x11-utils` & `xdotool` Fedora pkgs)
|
17
17
|
|
18
18
|
## Compilation
|
@@ -32,18 +32,26 @@ To customise dmenu or filtering, create a yaml file
|
|
32
32
|
dmenu:
|
33
33
|
fn: Monospace-12
|
34
34
|
b: false
|
35
|
+
selhook-return-key-focus-only: true
|
35
36
|
filter:
|
36
37
|
name: ['System Monitor']
|
38
|
+
resource: []
|
39
|
+
class: []
|
37
40
|
~~~
|
38
41
|
|
39
|
-
|
40
|
-
|
42
|
+
Subkeys in `dmenu` are the usual CLOs for
|
43
|
+
[dmenu(1)][]. `selhook-return-key-focus-only` is a custom one, that
|
44
|
+
enables window focusing on pressing Return only.
|
41
45
|
|
42
|
-
|
46
|
+
[dmenu(1)]: https://manpages.debian.org/unstable/suckless-tools/dmenu.1.en.html
|
47
|
+
|
48
|
+
`filter` key tells what windows should be filtered out. Each value in
|
49
|
+
a subkey is an array of regexes. See the defaults in
|
50
|
+
`fvwm-window-search` file.
|
43
51
|
|
44
52
|
## Bugs
|
45
53
|
|
46
|
-
* Tested only w/ Fvwm3.
|
54
|
+
* Tested only w/ Ruby-2.7.0 & Fvwm3.
|
47
55
|
* No distinction between normal & iconified windows.
|
48
56
|
|
49
57
|
## License
|
data/dmenu.patch
CHANGED
@@ -14,18 +14,19 @@ index a03a95c..ee5cffb 100644
|
|
14
14
|
$(OBJ): arg.h config.h config.mk drw.h
|
15
15
|
|
16
16
|
diff --git a/config.def.h b/config.def.h
|
17
|
-
index 1edb647..
|
17
|
+
index 1edb647..1920110 100644
|
18
18
|
--- a/config.def.h
|
19
19
|
+++ b/config.def.h
|
20
|
-
@@ -21,3 +21,
|
20
|
+
@@ -21,3 +21,7 @@ static unsigned int lines = 0;
|
21
21
|
* for example: " /?\"&[]"
|
22
22
|
*/
|
23
23
|
static const char worddelimiters[] = " ";
|
24
24
|
+
|
25
25
|
+/* -selhook option; run a command on every selection */
|
26
26
|
+static const char *selection_hook = NULL;
|
27
|
+
+static int selection_hook_return_key_focus_only = 0;
|
27
28
|
diff --git a/dmenu.c b/dmenu.c
|
28
|
-
index 65f25ce..
|
29
|
+
index 65f25ce..274668a 100644
|
29
30
|
--- a/dmenu.c
|
30
31
|
+++ b/dmenu.c
|
31
32
|
@@ -304,6 +304,62 @@ movewordedge(int dir)
|
@@ -99,29 +100,29 @@ index 65f25ce..69254ee 100644
|
|
99
100
|
puts((sel && !(ev->state & ShiftMask)) ? sel->text : text);
|
100
101
|
if (!(ev->state & ControlMask)) {
|
101
102
|
cleanup();
|
102
|
-
@@ -572,6 +629,
|
103
|
+
@@ -572,6 +629,8 @@ run(void)
|
103
104
|
break;
|
104
105
|
case KeyPress:
|
105
106
|
keypress(&ev.xkey);
|
106
|
-
+
|
107
|
+
+ if (!selection_hook_return_key_focus_only)
|
108
|
+
+ selhook(selection_hook, sel);
|
107
109
|
break;
|
108
110
|
case SelectionNotify:
|
109
111
|
if (ev.xselection.property == utf8)
|
110
|
-
@@ -
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
+
|
116
|
-
+
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
@@ -733,6 +792,8 @@ main(int argc, char *argv[])
|
112
|
+
@@ -712,6 +771,8 @@ main(int argc, char *argv[])
|
113
|
+
else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
|
114
|
+
fstrncmp = strncasecmp;
|
115
|
+
fstrstr = cistrstr;
|
116
|
+
+ } else if (!strcmp(argv[i], "-selhook-return-key-focus-only")) {
|
117
|
+
+ selection_hook_return_key_focus_only = 1;
|
118
|
+
} else if (i + 1 == argc)
|
119
|
+
usage();
|
120
|
+
/* these options take one argument */
|
121
|
+
@@ -733,6 +794,8 @@ main(int argc, char *argv[])
|
121
122
|
colors[SchemeSel][ColFg] = argv[++i];
|
122
123
|
else if (!strcmp(argv[i], "-w")) /* embedding window id */
|
123
124
|
embed = argv[++i];
|
124
|
-
+ else if(!strcmp(argv[i], "-selhook"))
|
125
|
+
+ else if (!strcmp(argv[i], "-selhook")) /* a command to run */
|
125
126
|
+ selection_hook = argv[++i];
|
126
127
|
else
|
127
128
|
usage();
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fvwm-window-search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Gromnitsky
|
8
8
|
autorequire:
|
9
9
|
bindir: "."
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
Search for windows interactively using a patched dmenu utility.
|