Dear Clojurians: what's your terminal setup?

Hello!

What does your terminal look like day-to-day? Do you spend time configuring it, or do you just leave it as-is?

Please share!

  1. What terminal (Gnome Terminal, Iterm2, …)?
  2. What shell (bash, zsh, fish, powershell, …)?
  3. One reason why you like your setup?

Teodor

1 Like

I’ll kick off with the first reply!

This is what my terminal looks like:

As for the questions:

  1. Gnome Terminal on Ubuntu, with the Nord theme
  2. I use ZSH with the GRML ZSH config. I’ve found that to be fast, just what I need for features and updated by someone else.
  3. I use z to jump to recently used folders. If I’m working on a project called webapp from time to time, I can just z webapp to quickly jump to my project folder.
1 Like

I use the Terminal.app on Mac OS, after trying many emulators this one is the fastest and has all the features I need. I have a bunch of custom keyboard macros set up for navigating nested tmux sessions (using keystrokes like Cmd-n, Cmd-p, Cmd-Shift-n, etc).

I use tcsh, because it’s great for interactive stuff, and because I got used to it over the last 25 years.

Input Mono fonts all over the place, after many years of experimentation I found these to be the most readable and usable.

For Clojure and ClojureScript development, Emacs+CIDER, often through docker, and often using docker-machine (so, on remote servers).

1 Like
  1. What terminal (Gnome Terminal, Iterm2, …)?

iTerm2. Also got myself a background progress manager for several tasks, which is built with cljs.

  1. What shell (bash, zsh, fish, powershell, …)?

Bash. Many platforms got Bash by default and it has less stuffs to remember or to install. Tried Zsh and Fish but not got used to them.

  1. One reason why you like your setup?

The main pain point in using commands it navigating among folders. I used two customized versions of autojump and bashmarks to make it feel easier.

Besides, as a frontend developers I do rely on the UI to offer help in efficiency and iTerm2 is quite good at it.

+1 on Input Mono being the best programming fonts, I use the Narrow variant.

Also use Terminal.app, using fish shell.

Can you elaborate in the Emacs through docker/docker-machine?

As for Input Mono Fonts, one of the great things about them is that the family is so large, so you can switch between variants. Depending on context, I use Narrow, Condensed or Regular. They all look similar and the brain can recognize the shapes quickly.

Clojure development through docker isn’t difficult: I use the “official” clojure docker image from docker hub, from which I build my development image, containing some additional utilities (npm, gulp, grunt, make, brotli, etc). I then use docker run to start lein repl with a custom nrepl port, which gets exposed from the container. My containers expose several ports, so that I can use CIDER through nrepl, and also figwheel and my webapp. I mount my source code through a docker volume mount point.

The nice thing about Docker is that once you get your setup running locally, moving it to a cloud server is nearly transparent. You use docker-machine to provision a server (for minimum fuss I recommend DigitalOcean), and once you run docker-machine env, all docker commands magically start to work using the remove server. ssh with port forwarding does the rest of the work.

The biggest problem I had was with figwheel. I was always surprised that people consider the “file reloading” feature as a stroke of genius — we’ve been doing C-c C-k to reload all forms in a file for ages, even back in my Common Lisp days, and there was the option of reloading just one. The problem with figwheel is that it assumes that both your editor and your server can access the same files, which isn’t always the case. I had to fiddle with syncthing to get this to work, and it still isn’t perfect (there is a delay of about 1 second).

I don’t have much time right now, but I plan to write all this up in a blog post one day.

2 Likes

my terminal setup is really simple:

  1. Linux, Gnome Terminal
  2. bash
  3. emacs

I like my setup because It isn’t really a big setup. I just need emacs and a Linux OS. :smile:

In the past I have also tried tmux and other fancy things but I personally didn’t find my workflow with them.

The last year or so my setup has been:

  • Alacritty terminal
  • fish shell
  • spacemacs
  • (i3wm)

This has replaced my previous long-term setup of gnome-terminal, fish shell, vim, tmux (and gnome).

I will definitely have to look at the input fonts. Right now I use fira code for everything, but the idea of having various widths and spacings depending on context is appealing.

@MalloZup and @mdiin: I’ve got a question. Do you then run Emacs in your terminal? If so, what’s your motivation?

I’m using Spacemacs on i3 myself; and I mostly switched because I didn’t like using Emacs windows (when you split the Emacs screen? I think windows, and frames), and I wanted to manage web browser, terminal and editor with the same mechanism. But I’m sticking to GUI Emacs for variable font size support, images, and all the other nice stuff.

1 Like

I have also configured to run Emacs server and client, so I can run emacs in a terminal but I personally don’t use it much for moment. Most of the the time I use emacs without terminals, I just call it from gnome shell. For splitting window I use C-x 3 mostly. Otherwise I create a new frame with make-frame when i need to have 2 frame in 2 monitors. I think that is enough.
I heared people use emacsclient with I3 or tmux but I didn’t dive into yet. I’m pretty ok with my workflow.

I have perhaps a startup time which could be annoying but It doesn’t bother me much :smile:, since I let it open then after :giraffe:

I use a server-connected client for both the terminal and the GUI. Here’s what it looks like:

1 Like

looks pretty cool! You motivated me to use it now :slight_smile:

1 Like

Hello!

Would you mind elaborating on your background process manager? What sort of things do you use it for?

Oh. When I was running multiple background processes. I noticed several problems,

  • Bash does not offer a simple UI for viewing status of processes, I want a visual way of reading and managing them.
  • I have several frequently used commands, I want to access them via clicks.

Since I’m a Web programmer, I decided to help myself with some CSS:

1 Like

I run a single emacs gui, making heavy use of project layouts and buffer switching.

Just installed the new Windows Terminal Preview. I generally use PowerShell Core now when I can, especially since it’s cross platform and it works on the Mac as well.

On the Mac I just use the default terminal.

The new Windows Terminal looks nice and I haven’t found any reasons to uninstall it yet. For some reason it requires a very recent version of Windows 10 just to be able to use it, which seems crazy to me. It’s definitely an improvement over the old terminal. Still in preview, and unfortunately it comes through the Windows Store, but whatever.

The tabbed interface of the new Windows Terminal is nice. Apparently there is no way yet to do a “open cmd here” from explorer to the new terminal, so that is disappointing.

  1. What terminal (Gnome Terminal, Iterm2, …)?

I mainly use Gnome terminal in Linux and sometimes Git bash terminal on Windows. Sauce Code Pro font has served me well, but I may change that up after looking at this thread.

  1. What shell (bash, zsh, fish, powershell, …)?

Bash, mostly because it’s the default. I dabbled in zsh for a while a decade ago but it never stuck.

  1. One reason why you like your setup?

I have a decently involved tmux set up (blog posts here and here) and do all of my work on a remote server (either a droplet on Digital ocean or a server at work), so at a moment’s notice I can detach and move to a different location and computer and pick up right where I left off. Also, I can leave a lot more things running and pick up context where I left off from day to day. I also wrote a small utility that allows me to run each development environment in docker, so I have many environments. :slightly_smiling_face:

Huh, interesting to hear that you don’t work locally at all. To me, this sounds strikingly similar to the lisp machines of old.

I have a bunch of questions, if you don’t mind!

May I ask about how you do your development remotely? Are you using terminal Emacs, and keep that running so that you can just log back into you development environment, or something else? I assume this is for Clojure development?

Thanks for the tmux links. I’ve only used it for “light” tasks, like more flexible terminal management than just having different SSH connections when working with a server.

What’s the best advantage of working this way? I assume you’re saving some time by “being in the right context”, and keeping installations cleanly separated from each other?

Terminal.app
Fish
Shellder
Source Code Pro with Powerline
Vim keybinds enabled

I like that Shellder autocompletes in real time previous commands so I don’t have to bother with aliases, just type the first few letters

yabai as a tiling window manager, similar to i3, and nothing like bettertouchtool, magnet etc

Using bettertouchtool and Karabiner elements to set up a “hyper” modifier which is used to manipulate yabai

I normally just use Gnome Terminal or Konsole depending if I’m on Gnome or KDE with Byobu (a config on top of tmux). I run my terminal full screen, tabs are tmux managed, so don’t use the terminal for that, same for scroll back history. And I have it in a dedicated workspace (workspace 3, right most).

I use ZSH as my shell, with OhMyZsh.

I have Emacs server mode on, and I use the em alias to start it. So it’s my editor of choice even for quick edits of files, but if I need to open a big file I might switch to Vim, and for most read only behaviour I rely on less.

In workspace 1, left most, I normally have Firefox open, or other UX heavy programs. And in the middle workspace (workspace 2), I have Emacs open fullscreen.

I like it because I can do almost everything with the keyboard, switch workspace, move around in Emacs with keyboard, move around Byobu with keyboard (new tabs, switch tabs, scroll-back), and Zsh provides some great auto-complete to command lines. While at the same time having most of the screen real estate dedicated to the actual content, not to UX menus or toolbars, etc.

I should also mention I have Joker, Lumo and Clojure with an alias setup with rebel-readlines , and I use these for quick scripts, quick experimentation, and as a replacement for using the calculator app.

1 Like