diff options
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/bin/gnome-terminal-newtab | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.local/bin/gnome-terminal-newtab b/.local/bin/gnome-terminal-newtab new file mode 100755 index 0000000..79c3a83 --- /dev/null +++ b/.local/bin/gnome-terminal-newtab @@ -0,0 +1,15 @@ +#!/bin/sh + +# We need to set these for it to work +# TODO: get these from the environment somehow... +export GNOME_TERMINAL_SERVICE=:1.222 +# specific tab that is focused +#export GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/2fabbbb8_c971_4140_a182_64474ffb18c5 +export GNOME_TERMINAL_SCREEN="$(busctl --user tree org.gnome.Terminal | grep -o '/org/gnome/Terminal/screen/.*$' | head -n1)" + +#echo DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS" >> /tmp/terminal-newtab.log +echo GNOME_TERMINAL_SCREEN="$GNOME_TERMINAL_SCREEN" >> /tmp/terminal-newtab.log +echo GNOME_TERMINAL_SERVICE="$GNOME_TERMINAL_SERVICE" >> /tmp/terminal-newtab.log +echo "$@" "\n" >> /tmp/terminal-newtab.log + +/usr/bin/gnome-terminal --tab "$@" |
