justinmk / vim-gtfo

Go to Terminal or File manager :point_right:
324 stars 17 forks source link

find default terminal via dpkg #6

Open justinmk opened 11 years ago

justinmk commented 11 years ago

see if we can query dpkg / update-alternatives for the preferred terminal, and/or one of gnome's things:

Another: configure "x-terminal-emulator" via galternatives

http://askubuntu.com/questions/72517/where-can-i-set-the-default-terminal-emulator

http://askubuntu.com/questions/70540/how-can-i-set-default-terminal-used

justinmk commented 11 years ago

Another possibility: XFCE's exo-open:

exo-open --launch TerminalEmulator
justinmk commented 11 years ago

When update-alternatives is updated, it looks like this:

update-alternatives: using /usr/bin/terminator to provide /usr/bin/x-terminal-emulator in auto mode

Then just call x-terminal-emulator to launch a terminal.

gcollura commented 10 years ago

Hi, thanks for this nice plugin. Could you please allow setting the default terminal to open with a global variable such as g:gtfo_default_terminal? (you could do the same with the default file manager too)

Thank you again and happy holidays!

justinmk commented 10 years ago

@random-cpp That's been requested before, so I will plan to add it in the next few days. Are you on linux/bsd? Is there a reason that you wouldn't want to use update-alternatives or some similar mechanism set your desktop's default terminal? That seems like a more elegant solution to me than setting it specifically in a Vim plugin.

gcollura commented 10 years ago

I'm on linux, but I'm using urxvt + zsh + tmux "standalone" (oh my zsh tmux plugin) so I'd need to set up a special configuration to make everything work..

justinmk commented 10 years ago

Fair enough. Thanks for the report!

gcollura commented 10 years ago

Thank you for your time!

justinmk commented 10 years ago

@gcollura setting a custom terminal is supported now. Example:

let g:gtfo#terminals = { 'unix' : 'rxvt-unicode -cd' }

See README.md for details.