aboutsummaryrefslogtreecommitdiff
path: root/contrib/random-incorrect-layout.sh
diff options
context:
space:
mode:
authorLeon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de>2020-12-07 01:34:12 +0100
committerIsaac Freund <ifreund@ifreund.xyz>2021-04-20 18:27:03 +0200
commit924a4707b73d275c71e44aac0e0a0cf37e4d7ea5 (patch)
tree7ad7604e93f5e10cac3e6b62b8b56b93c9a9eaf3 /contrib/random-incorrect-layout.sh
parentd08032d6850d28063c0715aa54b1c18e0d0b966d (diff)
downloadriver-924a4707b73d275c71e44aac0e0a0cf37e4d7ea5.tar.gz
river-924a4707b73d275c71e44aac0e0a0cf37e4d7ea5.tar.xz
contrib: update layouts for river-layout and river-options
- Remove old layouts which no longer work. - Add new C layout.
Diffstat (limited to 'contrib/random-incorrect-layout.sh')
-rwxr-xr-xcontrib/random-incorrect-layout.sh44
1 files changed, 0 insertions, 44 deletions
diff --git a/contrib/random-incorrect-layout.sh b/contrib/random-incorrect-layout.sh
deleted file mode 100755
index d6b250f..0000000
--- a/contrib/random-incorrect-layout.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-# Randomized Layout for debug purposes. This version randomly makes some errors
-# see how river handles incorrect output of layout executables.
-
-CLIENTS="$1"
-OUTPUT_WIDTH="$4"
-OUTPUT_HEIGHT="$5"
-
-for _ in $(seq 1 "$CLIENTS")
-do
- WIDTH="$(( ( OUTPUT_WIDTH / 5 ) ))"
- HEIGHT="$(( ( OUTPUT_HEIGHT / 5 ) ))"
- X="$(( ( RANDOM % ( OUTPUT_WIDTH - WIDTH ) ) + 1 ))"
- Y="$(( ( RANDOM % ( OUTPUT_HEIGHT - HEIGHT ) ) + 1 ))"
-
- # Mix in some errors
- case "$(( ( RANDOM % 10 ) ))" in
- 0) # Too few layout rows
- ;;
-
- 1) # Too many layout rows
- echo "$X $Y $WIDTH $HEIGHT"
- echo "$X $Y $WIDTH $HEIGHT"
- ;;
-
- 2) # Too few layout columns
- echo "$X $Y $WIDTH"
- ;;
-
- 3) # Too many layout columns
- echo "$X $Y $WIDTH $HEIGHT $X"
- ;;
-
-
- 4) # Negative view size
- echo "$X $Y -$WIDTH $HEIGHT $X"
- ;;
-
- *) # Expected behaviour
- echo "$X $Y $WIDTH $HEIGHT"
- ;;
- esac
-done
-