Last active
June 6, 2024 02:40
-
-
Save tarao/4470b44e615e2a6ce37fab2767830f39 to your computer and use it in GitHub Desktop.
WSL launcher with custom weston.ini
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
var args = []; | |
for (var i=0; i < WScript.Arguments.length; i++) { | |
args.push(WScript.Arguments(i)); | |
} | |
var sh = new ActiveXObject('WScript.Shell'); | |
sh.Run(args.join(' '), 0 /* hidden */); | |
sh = null |
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
[xwayland] | |
disable_access_control=true | |
[input-method] | |
path= | |
[keyboard] | |
repeat-delay=200 | |
repeat-rate=20 |
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
set title=%~1 | |
if [%title%] == [] ( | |
set title=WSL | |
) | |
start wt.exe --title "%title%" wsl.exe --cd ~ | |
rem Move to the directory where this .bat file is located | |
cd %~dp0 | |
rem Wait for WSL to run | |
:Check | |
wsl.exe --list --running | |
if %ERRORLEVEL% neq 0 ( goto :Check ) | |
rem Overwrite weston.ini | |
if exist weston.ini ( | |
wsl.exe -u root --system -e cp weston.ini /home/wslg/.config/weston.ini | |
wsl.exe -u root --system -e pkill -HUP weston | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
%USERPROFILE%\bin
)wscript.exe %USERPROFILE%\bin\nowindow.js %USERPROFILE%\bin\wsl.bat
wscript.exe %USERPROFILE%\bin\nowindow.js %USERPROFILE%\bin\wsl.bat Ubuntu