GeigerJ2 / msd-gm-shell

Repository for the MSD group meeting about sexy shell configurations given on 2024-04-25 by Julian Geiger at PSI. Contributions/issues welcome!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Turn your $SHELL into a beautiful $HOME

Repository for the MSD group meeting about sexy shell configurations given on 2024-04-25 by Julian Geiger at PSI.

Installation instructions via docker

To take it for a spin, clone the repo, install Docker and Docker Desktop, and fire both up. Then, from inside the repo, run:

docker buildx build -t msd-gm-docker -f Dockerfile .

Now, feel free to grab a β˜•... this is gonna take a few minutes. Once your image is built, run the container via:

docker run -it msd-gm-docker

or attach it to VSCode via the Docker VS Code extension.

Tip: If you want to skip the build process, you can also directly run it by using the container registry of this repo via:

docker run -it ghcr.io/geigerj2/msd-gm-shell:latest

which will automatically pull the image in the background (thanks, @unkcpz!).

You are now ready to explore your beautiful new $HOME.

What the fuzz is about

Today, we will go on a journey from:
to:
Because why spend half an hour on a task, when you can spend half a day automating it?

So buckle up!

The $HOME decor

When the container starts up, you will find a running Ubuntu 22.04 instance with working bash, zsh, and fish installations. We will explore their configurations - in this order - with increasing time dedicated to each $SHELL. The main tools that are set up are the following:

Turn-key solutions

  • oh-my configs β†’ Custom configuration frameworks created by the community (themes, plugins, etc.):
  • Prompt customization frameworks:
    • Sorry, seems like no comparable tool exists for bash 😒
    • Powerlevel10k for zsh (to avoid having to run the interactive configuration, my .p10k.zsh file is part of this repo)
    • Tide for fish:
      • As a little teaser, let's actually go ahead and install that right now via:
      fisher install ilancosman/tide@v6
      

β†’ Which also gives me an excuse to use fish from now on 😁

Tools I cannot live without

  • tmux β†’ Terminal multiplexer (my personal config is part of this repo)
  • atuin β†’ Replaces your shell history with an SQLite database (synchronizes between computers πŸ˜‰)
  • zoxide β†’ Creates a database of your visited paths
    • Or, alternatively z (pure fish implementation)

More shell candy

  • exa β†’ "Modern replacement for ls" (more symbols!)
    • exa archived β†’ eza
  • bat β†’ "A cat clone with wings" (and syntax highlighting πŸ˜‰)
  • entr β†’ Run arbitrary commands on file changes
  • git plugins for zsh (part of oh-my-zsh) and fish β†’ plugin-git

Why you should use Fish

  • It underlines existing paths/files β†’ No more "no such file or directory"
  • Neat autosuggestions (to be fair, this plugin achieves the same in zsh)
  • Then, let's check out fish_config
  • Interactive CLI command/options search
  • Cherry on top β†’ fzf fish plugin
    • Based on fzf β†’ Command line fuzzy finder
  • And a shameless self-promotion of my aiida fish plugin πŸš€

(even more fish)

A caveat

  • fish not POSIX compliant (unlike bash and zsh) β†’ Different (but, I would argue, better) syntax
  • Different configuration (setting environment variables, defining functions, no ~/.fishrc file)

β†’ If you don't want to enter this rabbit hole, stay with zsh for now (or use my Dockerfile πŸ˜‡)
β†’ But, you can always enter other shells, or execute scripts with bash <your-script>.sh

Honorable mentions (mileage may vary)

  • gh β†’ GitHub CLI and gh act β†’ run GitHub actions locally (sorry for all the failed CI activity, @sphuber 😒)
  • fd β†’ "A simple, fast and user-friendly alternative to find"
  • ripgrep β†’ Fast, recursive terminal regex search
  • lazygit β†’ Terminal git UI for keyboard warriors
  • gdu β†’ Disk usage analyzer
  • bottom β†’ "Yet another cross-platform graphical process/system monitor"
  • AstroNvim β†’ (neo)vim on steroids (don't worry, beloved VSCode - you will never be replaced)
    • Good to learn some of the nitty-gritty details, but I discourage trying to customize that yourself, as you'll literally need to learn a (probably) new language (Lua)
AstroNvim screenshot

Acknowledgements

GPT4, GitHub copilot, Pol Sanz β†’ ,

the software-treats Slack channel of the Nuria Lopez Group (ICIQ), and all of you for listening to this rant.

About

Repository for the MSD group meeting about sexy shell configurations given on 2024-04-25 by Julian Geiger at PSI. Contributions/issues welcome!

License:GNU General Public License v3.0


Languages

Language:Shell 92.4%Language:Dockerfile 7.6%