]> git.lizzy.rs Git - bspwm.git/blob - tests/run
Generalize window commands to nodes
[bspwm.git] / tests / run
1 #! /bin/sh
2
3 focus_follows_pointer=$(bspc config focus_follows_pointer)
4 initial_polarity=$(bspc config initial_polarity)
5 bspc config initial_polarity first_child
6 bspc config focus_follows_pointer false
7
8 cleanup () {
9         bspc config initial_polarity "$initial_polarity"
10         bspc config focus_follows_pointer "$focus_follows_pointer"
11 }
12
13 abort() {
14         cleanup
15         echo "One test failed." 1>&2
16         exit 1
17 }
18
19 echo "Node"
20 echo "-> Insertion"
21 ./node/insertion || abort
22 echo "-> Removal"
23 ./node/removal || abort
24 echo "-> Transfer"
25 ./node/transfer || abort
26 echo "-> Swap"
27 ./node/swap || abort
28 echo "-> Flags"
29 ./node/flags || abort
30
31 echo "Desktop"
32 echo "-> Transfer"
33 ./desktop/transfer || abort
34 echo "-> Swap"
35 ./desktop/swap || abort
36
37 cleanup
38
39 echo "All tests passed."