scripts/lib/term-wrapper-alacritty
Alexander Gehrke 7ba3dba2bc Add wrappers for terminals to make scripts terminal-agnostic
Scripts launching a terminal will now require x-terminal-emulator in the
path. A symlink for it can be created using `select-term.zsh`.
2021-07-05 13:11:42 +02:00

13 lines
275 B
Bash

#!/bin/zsh
zparseopts -D -E \
t:=title -title=title \
e:=execute -exec=execute -execute=execute \
c:=class -class=class
if [[ -n $1 || -n $execute ]]; then
execparam="-e"
fi
alacritty ${class+--class} ${class[2]} ${title+-t} ${title[2]} $execparam ${=execute[2]} "$@"