File: lab-sensible-terminal

package info (click to toggle)
labwc 0.9.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,856 kB
  • sloc: ansic: 32,546; perl: 5,834; xml: 886; sh: 162; python: 131; makefile: 12
file content (57 lines) | stat: -rwxr-xr-x 837 bytes parent folder | download
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/sh
# SPDX-License-Identifier: GPL-2.0-only

# X11 terminals are at the back of the list in case the script is run
# without XWayland support
terminals="\
	x-terminal-emulator \
	alacritty \
	foot \
	kitty \
	xfce4-terminal \
	lxterminal \
	qterminal \
	mate-terminal \
	gnome-terminal \
	konsole \
	sakura \
	terminator \
	terminology \
	tilix \
	color-xterm \
	termit \
	aterm \
	roxterm \
	termite \
	lilyterm \
	terminix \
	guake \
	tilda \
	hyper \
	wezterm \
	rio \
	kgx \
	xterm \
	uxterm \
	dtterm \
	st \
	nxterm \
	Eterm \
	rxvt \
	urxvt"

if [ -n "${TERMINAL}" ]; then
	# ${TERMINAL} is not quoted here, so things like
	# TERMINAL="foot -T my-terminal" work as expected.
	exec ${TERMINAL} "$@"
fi

for terminal in $terminals
do
	if command -v "${terminal}" >/dev/null 2>&1
	then
		exec "$terminal" "$@"
	fi
done

exit 1