-
Notifications
You must be signed in to change notification settings - Fork 10
/
skippy-xd-fix
57 lines (46 loc) · 1.01 KB
/
skippy-xd-fix
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
#!/bin/bash
#
# skippy-wrapper - B. Murphy
#
# a work around for the bug in skippy-xd that prevents minimized
# windows being included in the selection screen.
#
# dependency: xdotool
#
#
# prelim -- check not already running
# 0. get desktop
# 1. get list of all windows
# 2. get list of visible windows
# 3 generate list of hidden windows
# 4. raise hidden windows
# 5. run skippy-xd
# 6. get active window = SkippySelected
# 7. minimize hidden windows unless selected
#
#prelim
if [[ "`pidof -x $(basename $0) -o %PPID`" ]]; then exit; fi
#0.
dtop=`xdotool get_desktop`
#1.
any=`xdotool search --desktop $dtop "" 2> /dev/null`
#2.
visible=`xdotool search --desktop $dtop --onlyvisible "" 2> /dev/null`
#3.
hidden=$any
for item in $visible; do
hidden=`echo ${hidden/$item/''}`
done
#4.
for item in $hidden; do
xdotool windowmap $item
done
#5.
skippy-xd &> /dev/null
#6.
SkippySelected=`xdotool getactivewindow`
#7.
hidden=`echo ${hidden/$SkippySelected/''}`
for item in $hidden; do
xdotool windowminimize $item
done