blob: 7df189b0d45a5062f3578a903c62c643b46ede9b (
plain)
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
|
#!/usr/bin/env -S sh
# This file exists because I've gotten to the point where I need to open the terminal in specific dimensions
# or the thing looks bad
BINNAME="VX-GAMBLEGROUND"
SCRIPT_DIR="$(cd "$(dirname "$0")" && echo "$PWD")"
main() {
# Stop interrupts
trap '' INT
# Make sure script location is there
if [ -z "$SCRIPT_DIR" ]; then
printf "\033[38;2;255;0;0m\033[1m[runscreen.sh] Couldn't get location of script. Exiting...\n\033[m" 1>&2
return 1
fi
# Check to make sure the screen binary exists
if [ ! -x "$SCRIPT_DIR/$BINNAME" ]; then
printf "\033[38;2;255;0;0m\033[1m[runscreen.sh] Screen binary doesn't exist. Exiting...\n\033[m" 1>&2
return 1
fi
# Run the thing in gnome terminal
gnome-terminal --hide-menubar --geometry=156x27 --wait -- "$SCRIPT_DIR/$BINNAME" \
&& return $?
}
main && exit $?
|