This repository has been archived by the owner on Jun 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
demo.sh
executable file
·137 lines (112 loc) · 2.53 KB
/
demo.sh
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
#!/bin/bash
OD=$(pwd)
WD=/home/frans/Documents/rust/BspwmStackableWindows
cd $WD
cargo clean
cd $OD
clear
#sleep 1
echo "Sometimes you have a program that you don't want to close"
sleep 2
echo "But you also don't want it to use too much space on your screen"
sleep 2
echo "Stacked windows are a nice way to get around that"
sleep 2
#Switch to another workspace to actually run the demo
bspc desktop -f "focused:^5"
xfce4-terminal --working-directory $WD &
ID1=$!
sleep 0.5
xfce4-terminal --working-directory $WD -x nvim src/main.rs&
ID2=$!
notify-send "To stack two windows, select both of them"
sleep 3
bspc node -f "@parent"
notify-send 'And execute `rspc stack create` using your hotkey daemon'
sleep 2
rspc stack create
sleep 3
notify-send 'You can navigate the stack using your normal focus commands'
sleep 1
bspc node -f "@brother"
rspc stack focus_current
sleep 1
bspc node -f "@brother"
rspc stack focus_current
sleep 1
bspc node -f "@brother"
rspc stack focus_current
notify-send 'When stacks are removed, the nodes get balanced'
sleep 2
rspc stack remove
sleep 4
#Demo vertical stacks
bspc node -f "east"
bspc node -p south
notify-send 'Stacks dont have to be horizontal'
sleep 0.3
xfce4-terminal --working-directory $WD -x htop &
sleep 1
bspc node -f "@brother"
bspc node -f "@1"
bspc node -p north
bspc node
xfce4-terminal --working-directory $WD -x cargo build &
sleep 0.3
bspc node -f "@brother"
bspc node -f "@1"
bspc node -f "@parent"
bspc node -f "@parent"
notify-send 'They also dont have to affect all windows on the workspace'
sleep 2
rspc stack create
#Navigate around the stacks a bit
sleep 2
bspc node -f "south"
rspc stack focus_current
sleep 1
bspc node -f "south"
rspc stack focus_current
sleep 1
bspc node -f "west"
rspc stack focus_current
sleep 1
bspc node -f "east"
rspc stack focus_current
sleep 1
bspc node -f "north"
rspc stack focus_current
sleep 2
notify-send 'You can also add new windows to the stack'
sleep 1
bspc node -p north
ksysguard &
last_pid=$!
sleep 1
bspc node -f "north"
rspc stack focus_current
sleep 1
bspc node -f "south"
rspc stack focus_current
sleep 1
bspc node -f "north"
rspc stack focus_current
sleep 2
notify-send 'Of course, individual windows can also be removed'
sleep 1
kill $last_pid
rspc stack focus_current
sleep 2
bspc node -f "south"
rspc stack focus_current
sleep 1
bspc node -f "north"
rspc stack focus_current
sleep 1
clear
# Go back to the default workspace
bspc desktop -f "focused:^4"
echo "https://github.com/TheZoq2/BspwmStackableWindows"
sleep 5
clear
#xfce4-terminal --working-directory $WD