wsltty icon indicating copy to clipboard operation
wsltty copied to clipboard

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

Open silentmantra opened this issue 2 years ago • 5 comments

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 avatar May 24 '23 10:05 silentmantra

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

silentmantra avatar May 24 '23 10:05 silentmantra

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

Biswa96 avatar May 24 '23 12:05 Biswa96

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"

silentmantra avatar May 24 '23 22:05 silentmantra

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.

Biswa96 avatar May 25 '23 02:05 Biswa96

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

mintty avatar May 25 '23 18:05 mintty