Last active
November 18, 2020 13:00
-
-
Save AirManH/de7237a70d0b5cb1c401da9c39d7a427 to your computer and use it in GitHub Desktop.
press Meta + Enter to open gnome-terminal in WSL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Description: | |
;; press Meta + Enter to open gnome-terminal in WSL | |
;; requirement: | |
;; - vcxsrv | |
;; - wsl | |
;; - gnome-termial (in wsl) | |
#Enter:: | |
;; if vcxsrv not exist, start it | |
Process, Exist, vcxsrv.exe | |
if (not ErrorLevel) { | |
Run "C:\Program Files\VcXsrv\vcxsrv.exe" :0 -multiwindow -clipboard -wgl | |
;; wait 2000ms for vcxsrv to start | |
Sleep, 2000 | |
} | |
Run %comspec% /c "wsl export LIBGL_ALWAYS_INDIRECT=1; export DISPLAY=localhost:0.0; export $(dbus-launch); exec gnome-terminal" | |
Return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment