Open new terminals in the current directory
This commit is contained in:
1 parent
93e1f1b05f
commit
7cdfbebc9e
2 files changed
+10
-1
No files matched your search
@@ -3,4 +3,6 @@
|
|||||||
# blob:summary=Launch the default terminal
|
# blob:summary=Launch the default terminal
|
||||||
# blob:args=[command [args...]]
|
# blob:args=[command [args...]]
|
||||||
|
|
||||||
|
(( $# == 0 )) && set -- --dir="$(blob-cmd-cwd)"
|
||||||
|
|
||||||
exec setsid uwsm-app -- blob-terminal-exec "$@"
|
exec setsid uwsm-app -- blob-terminal-exec "$@"
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# blob:summary=Run a command in the default terminal
|
# blob:summary=Run a command in the default terminal
|
||||||
# blob:args=[--print-id] [--app-id=<app-id>] [--title=<title>] [-e] <command> [args...]
|
# blob:args=[--print-id] [--app-id=<app-id>] [--title=<title>] [--dir=<dir>] [-e] <command> [args...]
|
||||||
# blob:hidden=true
|
# blob:hidden=true
|
||||||
|
|
||||||
terminal=""
|
terminal=""
|
||||||
@@ -23,6 +23,7 @@ fi
|
|||||||
|
|
||||||
app_id=""
|
app_id=""
|
||||||
title=""
|
title=""
|
||||||
|
dir=""
|
||||||
command_args=()
|
command_args=()
|
||||||
|
|
||||||
while (( $# > 0 )); do
|
while (( $# > 0 )); do
|
||||||
@@ -39,6 +40,10 @@ while (( $# > 0 )); do
|
|||||||
title=${1#--title=}
|
title=${1#--title=}
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--dir=*)
|
||||||
|
dir=${1#--dir=}
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-e)
|
-e)
|
||||||
shift
|
shift
|
||||||
command_args+=("$@")
|
command_args+=("$@")
|
||||||
@@ -56,9 +61,11 @@ launch=("$terminal")
|
|||||||
case "$terminal" in
|
case "$terminal" in
|
||||||
foot)
|
foot)
|
||||||
[[ -n $app_id ]] && launch+=("--app-id=$app_id")
|
[[ -n $app_id ]] && launch+=("--app-id=$app_id")
|
||||||
|
[[ -n $dir ]] && launch+=("--working-directory=$dir")
|
||||||
;;
|
;;
|
||||||
kitty)
|
kitty)
|
||||||
[[ -n $app_id ]] && launch+=("--class=$app_id")
|
[[ -n $app_id ]] && launch+=("--class=$app_id")
|
||||||
|
[[ -n $dir ]] && launch+=("--directory=$dir")
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user