Created
November 24, 2018 06:00
-
-
Save ACEMerlin/0db059e6e055e3ef56e8ffde26b01f88 to your computer and use it in GitHub Desktop.
Files that easy your life with X-server on windows
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
If WScript.Arguments.Count <= 0 Then | |
WScript.Quit | |
End If | |
bat = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\")) & WScript.Arguments(0) & ".bat" | |
arg = "" | |
If WScript.Arguments.Count > 1 Then | |
arg = WScript.Arguments(1) | |
End If | |
CreateObject("WScript.Shell").Run """" & bat & """ """ & arg & """", 0, False |
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
C:\Windows\System32\wscript.exe "E:\wsl\bat-launcher.vbs" "emacs" |
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
@echo off | |
x410.exe /wm | |
REM "C:\Program Files\VcXsrv\vcxsrv.exe" -clipboard -wgl -nohostintitle -silent-dup-error -multiwindow -xkblayout us -xkbvariant dvorak | |
ubuntu1804.exe run "cd ~; export DISPLAY=127.0.0.1:0.0; /home/merlin/.spacemacs.d/script/ec" |
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
@echo off | |
REM ### Start X410 in Windowed Apps Mode. If X410 is already running in Desktop Mode, | |
REM ### it'll be terminated first without any warning message box. | |
start /B x410.exe /wm | |
REM ### Setup a D-Bus instance that will be shared by all X-Window apps | |
ubuntu1804.exe run "sh -ic 'if [ -z \"$(pidof dbus-launch)\" ]; then export DISPLAY=127.0.0.1:0.0; dbus-launch --exit-with-x11; fi;'" | |
REM ### Go to the selected folder path and open your terminal app | |
ubuntu1804.exe run "cd \"$(wslpath '%1')\"; export DISPLAY=127.0.0.1:0.0; export GTK_THEME=Arc:dark; export GDK_SCALE=2; exec tilix" |
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
start /B x410.exe /desktop | |
ubuntu1804.exe run "if [ -z \"$(pidof xfce4-session)\" ]; then export DISPLAY=127.0.0.1:0.0; xfce4-session; pkill '(gpg|ssh)-agent'; fi;" |
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
C:\Windows\System32\wscript.exe "E:\wsl\bat-launcher.vbs" "open-linux-shell-here" "E:\Documents" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment