One point of all this is to stop the jarring effect of switching to a white screen after working in a dark terminal for a while. You can now call :Dark and :Light from within Vim to switch theme, and actually have MacOS and Tmux follow right along. In my nf file I include the dark theme by default:Ĭommand! Dark call Dark () command! Light call Light () You can find the files in my dotfiles repository. Just make sure your colors match the Vim theme. ![]() However, there are not a lot of interface elements in Tmux, so you can quickly get a nice result without too much configuration. Normally I would not recommend customly theming anything unless you really like minutiae. In Tmux I’m using two custom themes, a dark one and a light one. It actually doesn’t matter that much since I’m running Tmux, which will have its own color handling and is overlaid on your terminal. I use iTerm2 and I installed the official Solarized dark iTerm2 theme. I’m using the well-known Solarized theme, which is especially great in this case because it has a light and dark variant. This article will describe how to synchronize your theme across MacOS, Tmux and Vim. I threw some code at this problem and now I can quickly switch between light and dark mode from the command line. □ Spring is coming around however, and that means, somewhere between 3 and 4 o’clock in the afternoon, the sun is starting to produce a nasty glare on my monitor making dark mode an unacceptable choice. Emacs 24 (included with Ubuntu 14.04) doesn't seem to work with XMing I had to install a newer version as suggested in this post.Like most developers, I prefer dark mode in my terminal and code editor.Note that XMing has to be running for the script to work in order to start it automatically with Windows you can follow the instructions in this article.So it's convenient to put it in C:\Users\foo, for example. The ~ starts bash in your home directory, you can remove it to start in whatever directory the.Run the following in a shortcut or in the Run prompt (as suggested in the comments): powershell -windowstyle hidden -Command "iex \"bash ~ -c 'DISPLAY=:0 xfce4-terminal'\" " This will allow you to start xfce4-terminal properly from bash, but is orthogonal to the command below. In Bash for Windows, install the terminal: sudo apt-get install xfce4-terminal.It took a little while to figure out all the implied steps in the other answers, so here's a step by step summary: WScript.CreateObject("WScript.Shell").run('bash.exe -l -c "DISPLAY=:0.0 xfce4-terminal"', 0, false) Here's that same script, but a JScript version. I then pinned that to my taskbar and it's almost seemless.ĮDIT: The answer with VBScript is brilliant. I did this in C# - basically use arguments "UseShellExecute" false and "CreateNoWindow" true. PS: to make launching xfce4-terminal painless and without the extra bash cmd window, I wrote a program that does nothing but start the bash process with arguments to start xfce4-terminal without a console window. ![]() ![]() It is also possible to start an SSH server in Bash-on-Linux-on-Windows and then connect to it, say from MinTTY like from Cygwin. ![]() I am very happy with this setup and use NeoVim + lots of native linux plugins even though my "for-work" machine must be Windows. I also installed compiz and I use the cbwin project to run windows programs from my xfce4-terminal shell. export DISPLAY="localhost:0"ĭo the fix from this reddit for dbus: sudo sed -i 's$.*$tcp:host=localhost,port=0$' /etc/dbus-1/nf I found I needed to add these to my bashrc. I personally do the latter: use VcXsrv as my X server in multiple windows mode, then launch the xfce4-terminal (because gnome-terminal had visual issues that I didn't care to try to learn how to fix), and suddenly I have a competent terminal with font and color support.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |