mintty / wsltty

Mintty as a terminal for Bash on Ubuntu on Windows / WSL
Other
3.11k stars 104 forks source link

How to enforce startup behaviour (e.g. window position)? #331

Open silentmantra opened 1 year ago

silentmantra commented 1 year ago

First thank you for the best wsl terminal (the miserable windows terminal goes to hell). I have 2 questions:

  1. how to get wsltty to remember window position? after launch i always get small window at the top left which is annoying. and probably this should be done per a config file maybe or an argument list? so i would like to have several shorcuts in the taskbar each would remember its own window position.
  2. is it possible to define command which will be executed in wsl on the start? in the argument list or config. Thanks!
silentmantra commented 1 year ago

seems that's in the mintty's config settings. will try

Biswa96 commented 1 year ago

I think you have to add --position command line option in the mintty/wsltty shortcut. The details can be found here https://mintty.github.io/mintty.1.html

silentmantra commented 1 year ago

I think you have to add --position command line option in the mintty/wsltty shortcut. The details can be found here https://mintty.github.io/mintty.1.html

yes, works fine, cannot figure out how to execute bash command on start though... --exec doesnt work for some reason, says "wrong directory"

Biswa96 commented 1 year ago

cannot figure out how to execute bash command on start though...

In the wsltty shortcuts properties, try to replace the - with the command. @mintty may provide proper solution.

mintty commented 1 year ago

Replace the --WSL=... parameter with just --wsl. Replace the final - with the wslbridge2 command, including the distro, and add the desired command, e.g. wslbridge2 -d Debian mc