cascadium / wsl-windows-toolbar-launcher

Adds linux GUI application menu to a windows toolbar
MIT License
1.21k stars 50 forks source link

rc_file is not respected and zsh support. #32

Closed oleg-andreyev closed 3 years ago

oleg-andreyev commented 3 years ago

Command

 wsl-windows-toolbar -r ~/.zshrc

Result:

#!/bin/bash -i
source /home/olega/.bashrc
cd "/home/olega"
env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/phpstorm_phpstorm.desktop /snap/bin/phpstorm  > /dev/null 2>&1 &
disown

Expected

#!/bin/zsh -i
source /home/olega/.zshrc
fquinner commented 3 years ago

The rc_file option is more for a bashrc or bash compatible zshrc where you want to source additional stuff before launching using bash in the bash template that comes with the package.

To use an alternative shell, you'd need to specify a template.

To do this, create a file which is based on a modified version of this: https://raw.githubusercontent.com/cascadium/wsl-windows-toolbar-launcher/master/wsl-windows-toolbar-template.sh.j2

And pass it in with -J /path/to/your/template.j2.

oleg-andreyev commented 3 years ago

@fquinner thanks!