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`.
This commit is contained in:
parent
a367418433
commit
7ba3dba2bc
6 changed files with 53 additions and 35 deletions
4
lib/g
4
lib/g
|
@ -24,6 +24,4 @@ else
|
|||
action="tmux new-session -s ${prog} ${prog}"
|
||||
fi
|
||||
|
||||
#exec alacritty --title G${prog} -e ${=action}
|
||||
#exec urxvt -name G${prog} -e ${=action}
|
||||
exec alacritty -t G${prog} -e ${=action}
|
||||
exec x-terminal-emulator -t G${prog} -e ${=action}
|
||||
|
|
12
lib/term-wrapper-alacritty
Normal file
12
lib/term-wrapper-alacritty
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/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]} "$@"
|
9
lib/term-wrapper-kitty
Executable file
9
lib/term-wrapper-kitty
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/zsh
|
||||
|
||||
zparseopts -D -E \
|
||||
t:=title -title=title \
|
||||
e:=execute -exec=execute -execute=execute \
|
||||
c:=class -class=class
|
||||
|
||||
|
||||
kitty -1 ${class+--class=}${class[2]} ${title+-T} ${title[2]} ${=execute[2]} "$@"
|
Loading…
Add table
Add a link
Reference in a new issue