Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spawned terminals inherit desktop class if launched from gnome-terminal wrapper #45

Closed
fmoralesc opened this issue May 2, 2018 · 1 comment · Fixed by #49
Closed
Labels

Comments

@fmoralesc
Copy link
Contributor

Hi! Recently, I've been getting the following behaviour with this and my gnome-terminal wrapper in the GNOME desktop:

  1. Open nvim in the wrapper
  2. Launch a terminal with gtfo
  3. The new terminal inherits the desktop class of the wrapper, and the window is grouped with the nvim window.

Before, the new terminal would use the gnome-terminal desktop class, so the window would not get grouped with nvim (it would be tracked as a terminal window). I think this is the better behaviour, because it allows me to separate the roles of the applications.

Now, if I launch the terminal first, and from it I launch the wrapper, the terminal and nvim get different desktop classes, so they are tracked as different applications. But if then I launch a new terminal using gtfo, the problem appears nonetheless.

I am not sure this is due to a change in gnome-terminal (and the wrapper), or in how gtfo launches the terminal, to be honest. Any ideas?

@fmoralesc
Copy link
Contributor Author

Found a workaround. The terminal can be forced to use the default terminal if the call is made like this

silent call system('gnome-terminal --app-id=org.gnome.Terminal --window -e "$SHELL -c \"cd '''.l:dir.''' ; exec $SHELL\""')

This is basically the same trick I use to spawn nvim as a separate application in the wrapper.

Another observation: current gnome-terminal has a --working-directory flag, it might be better to use that instead of cd-ing into the current directory.

@fmoralesc fmoralesc changed the title spanwed terminals inherit desktop class if launched from gnome-terminal wrapper spawned terminals inherit desktop class if launched from gnome-terminal wrapper May 8, 2018
fmoralesc added a commit to fmoralesc/vim-gtfo that referenced this issue Apr 24, 2019
Also, use the `--working-directory` flag instead of executing `cd`.

Fixes justinmk#45.
@justinmk justinmk added the bug label Apr 24, 2019
justinmk pushed a commit that referenced this issue Apr 24, 2019
Also, use `--working-directory` instead of exec'ing `cd`.

Fixes #45.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants