Tmux Experiment

Setting up your development environment involves a lot of tinkering. Hacking is a good way to describe it, because that’s kind of what you do. You hack at it until it finally works the way you like it. Try this and try that, until you find a good combination.

Pop-OS! is a pretty good operating system. I installed it last weekend. This weekend, I’ve done a lot of configuring. Linux is a moving target. It is always under construction. It is always new and improved.

You can set Pop-OS! up with several different desktop work spaces by using the <Ctrl-Meta> key combination along with the arrow keys. Press control and meta/win and the up or down arrow key to move up and down in your list of work-spaces. Create a new workspace by opening an application in a fresh workspace.

Local Development

Start building your development environment by getting Zsh, Vim and Tmux installed and configured. I’ve always installed Oh-My-Zsh, but there is an alternative called Antigen that I want to try. It’s like Vundle for Zsh. Oh-My-Zsh has been working great for me and I just install it by habit, whenever I install Zsh.

I tried to replace Oh-My-Zsh with Antigen yesterday, 5/11/2020. It didn’t work very well, most likely because I didn’t get it setup right, and after a mild panic attack, I reinstalled Oh-My-Zsh. I had saved a copy of my old zshrc file and I reinstalled Oh-My-Zsh with the curl command from Robby Russell’s Oh-My-Zsh github repository. Its working fine.

My experiment with getting in the habit of using the command line is proceeding along. I haven’t installed KDE, but I do sometimes revert back to using the Gnome GUIs. I’m using the command line and terminal based applications more and more. I’m using ranger and vim, instead of Dolphin and Kate.

Ranger is my new file manager. Get the suckless-tools installed. Use sudo apt install alacritty to install the very fast, GPU driven terminal, Alacritty. It automatically set itself as the default shell on this Pop-OS! operating system. Interestingly, when I execute echo $TERM my shell echos alacritty. When I run neofetch, it displays Terminal: x-terminal-emul.

I’ve got some work to do to get Alacritty to work and look right. It’s working okay. The speed improvement is noticable, but it is white text on a black background. Not my favorite color scheme.

Neofetch is a small program, similar to Conky, which you can install to describe your system by entering neofetch into your command line. Conky is usually a part of your graphical desktop, which runs when you start your computer and persists as long as your computer is on. You activate Neofetch with a terminal command.

You have to do a lot of searching the Internet to find good tools and learn how to install and configure them. I use Firefox and DuckDuckGo for my browser and search engine.

A good important example of configuring a tool right is, in Tmux, you can bind your v and h keys to the split window commands, <leader – v> for vertical split and <leader – h> for horizontal split. Bind <leader – c> to the create new window command. That’s a lot easier to type than <leader – %> and <leader – “>. <leader> is Ctrl+Meta+B.

In order to get in the habit of using vim and learning all the weird vim commands, I’m writing this story in vim. It’s kind of a distraction. That’s okay, I’m going through the learning process. Its worth the effort. Take the time, make the effort, to learn how to use Zsh, Vim and Tmux.

My old way of working is to have two terminals open on my desktop. Each one takes up half of the screen on my laptop. I have the Pop-OS! tiling turned on, so they are nicely set up with a small gap around each one of them.

Now, I’ve switched to using Tmux. I’ve got Ranger open in one pane and I’m writing this story in Vim in another pane, with a vertical split between them. After a long process of hacking around and trying various solutions, I finally figured out how to change the color of the Tmux status line.

Use Firefox and DuckDuckGo for searching the Internet and learning how to change settings, like the color of the status line or to find good key binding suggestions.

Use Zsh, Vim and Tmux to help you organize your work spaces. You can have one terminal open with Tmux and divide it into as many windows and panes as you want to. Instead of having two separate terminals open with different programs running in each one, you can have one terminal open with different programs running in separate panes and windows of your one Tmux session.

You can also have several different Tmux sessions running and switch back and forth between them. I haven’t quite figured out how to do it yet, but I understand that you can set Tmux to save your sessions when you turn your computer off.

The main advantage of using Tmux, instead of just opening different programs in separate terminals, at least from my perspective, is that you can bind keys to make it really easy to move around in your work spaces. You’ve got to get used to using the key bindings. Each one of these tools has a different set of key bindings.

Your key bindings are an important feature of your development environment. Get familiar with setting them and using them. Being able to move around quickly and execute commands with one or two keystrokes makes Zsh/Vim/Tmux one of the most powerful IDEs in the world.

So, in most of your applications, like your terminal and Vim, you have tabs and panes that you can move around in. Now, you also have Tmux, which allows you to setup any number of sessions. Each session can have several different windows that you can switch back and forth to and from. And each window can be divided into any number of panes, with separate programs running in each pane.

So practically, you have an infinite number of options for setting up your workflow. It’s up to you. Spend the time to get these tools set up the way you like them and then get in the habit of using them, instead of using your GUIs. This is were the power, and the fun, of Linux resides.

Then you can decide what you want to do with this very powerful weapon. All technology is a weapon. Technology is a tool that you can use to extend your reach and your leverage. What you do with this leverage is up to you.

Be creative. And harmless. Turn your computer into a cash machine, pumping money into your bank account. Make it a work of art. You can spend hours tinkering around with your setup, get a color scheme set up that you like. Work on getting all your applications to look similar, so they look like a set of tools, instead of a mismatched collection of different tools.

Each one of these tools is a complex technology. If you like puzzles, you’ll love Linux. It’s a puzzle of puzzles. It’s the most interesting game I’ve ever played.

Web Development

One good way to learn how to use these tools is to have a good set of content ready and start building a website. Build a simple website to tell a story. The repetition of creating many pages for your website will teach you how to use the tools.

Getting setup to build a website with Expressjs and Vue is another incredibly complex puzzle. Get node and npm installed on your computer. The advantage of using the Nodejs/Express and Vue stack is you are using Javascript for the full stack, the front and the back end of your website.

Another option is to use Python and Flask or Django for the back end and Vue for the front end. I’m investigating both options and leaning back towards the Python/Flask and Vue stack.

Create a lot of content. Have it saved and ready to go onto your website. Then, setup your local development environment and the structure of your website and start putting your content into the local version of your website.

Install Nginx or Apache2 in order to be able to see your local website in your browser. Xampp is an option you can investigate.

Get SSH installed and properly configured. Setup a GitHub account. Make sure you’re using Git in your local development environment and push your work up to your GitHub repository. Once you get everything setup, tested and running; start pushing your website up to your remote hosting service, your live website.

There is an infinite variety of setups you can develop. A very wide variety of tools you can use. Keep working on it. Persistence is vital. Seek the truth. Learn the rules of computer science. Just like nature has natural laws that govern the evolution of the universe and the laws of economics govern your business, computer science has rules that you follow to make things work the way you want them to.

Use the laws of computer science to make valuable applications, just like engineers use the laws of aerodynamics to build machines that fly. The laws of computer science are more artificial than natural law, but they are not totally artificial. Computer science is very similar to mathematics, which is the ultimate natural law.

Language and mathematics are the basis of human consciousness and the underlying structure of natural history. Investigate them both.

Similar Posts