/Workflow

πŸ¦‹ An opinionated list of programs I use everyday

Primary LanguageHTML

Workflow πŸ¦‹

An opinionated list of programs I use everyday. Most of them are better alternatives to the default ones. (e.g. ripgrep instead of grep).

Majority of them (if not all) are written in Rust πŸ¦€. Of course it doesn't matter which language the program is written on as long as it's not javascript πŸ’€, but it's just nice to know that what you are using isn't some ancient crap from 1970s...

First three items in my list are the most important ones. Terminal emulator, shell and editor.

Terminal Emulator - Alacritty πŸ”₯

Site | Github

A fast, cross-platform, OpenGL terminal emulator

The fastest, actually.

You probably know about Alacritty already, but here's the thing I discovered which made me went back to using it once again after trying Wezterm (it's awesome, but slow for me...) - it does support tabs. But it can be tricky.

How to use tabs in Alacritty

Since I use macOS (eghh) I'll describe a method for it.

  1. System Settings > Desktop & Dock > Prefer tabs when opening documents > Always
  2. Add this bind to your alacritty.yml
key_bindings:
- action: CreateNewWindow
  key: T
  mods: Command
  1. Tada! πŸŽ‰ You can use ⌘ + T to spawn a new tab.

On Linux with X11 you can use something like tabbed alacritty --embed. Idk about Wayland...

Shell - Nushell 🐚

Site | Github

Nu pipelines use structured data so you can safely select, filter, and sort the same way every time. Stop parsing strings and start solving problems.

miette-example

This example is pretty self-descriptive

# All these commands are built-in with nushell. Yes, even http.
ls | where size > 10mb | sort-by modified
http get https://api.github.com/repos/nushell/nushell | get license

From the article Shells are Two things

The fundamental problem of shells is they are required to be two things.

  • A high-frequency REPL, which requires terseness, short command names, little to no syntax, implicit rather than explicit, so as to minimize the duration of REPL cycles.
  • A programming language, which requires readable and maintainable syntax, static types, modules, visibility, declarations, explicit configuration rather than implicit conventions.

And you can’t do both. You can’t be explicit and implicit, you can’t be terse and readable, you can’t be flexible and robust.

Yet, Nushell managed to do both pretty well. It's explicit and implicit, terse and readable, flexible and robust.

Editor - Helix 🧬

Site | Github

A post-modern modal text editor

screenshot

(N)vim alternative. Tree-sitter integration, multiple selections, lsp support, many features built-in.

It doesn't support plugins (yet), but 8/10 plugin use-cases are already natively implemented. It feels way more responsive than (n)vim. Once you try it you can't go back 🀯

And it requires almost no config at all, everything works (and works well) out of the box!

Tools

ripgrep πŸͺ¦

Github

A better grep alternative. It's faster, smarter and easier. Unlike GNU grep, ripgrep stays fast while supporting Unicode (which is always on). Ripgrep also supports different regex engines, such as PCRE2

rg pattern file

bat πŸ¦‡

Github

A cat(1) clone with wings.

Syntax highlighting, better pager and faster.

bat example

fd πŸ”

Github

A simple, fast and user-friendly alternative to 'find'

Again, faster, easier, cooler...

# Search for a particular file extension
fd -e md

# Regular expression search
fd '^x.*rc$'

skim πŸ”­

Github

fzf-like fuzzy finder

rg --files | sk --preview="bat {} --color=always"
sk -i -c "rg {} --color=always" --ansi  

zoxide πŸ‡

Github

A smarter cd command. Supports all major shells.

It remembers which directories you use most frequently, so you can "jump" to them in just a few keystrokes.

z foo      # cd into highest ranked directory matching foo
z foo bar  # cd into highest ranked directory matching foo and bar
z foo /    # cd into a subdirectory starting with foo

z ~/foo    # z also works like a regular cd command
z foo/     # cd into relative path
z ..       # cd one level up
z -        # cd into previous directory

zi foo     # cd with interactive selection (using fzf)

Also, what I like to use is PWD update hook in my shell. E.g. I prefer to use cd to navigate between directories and I use z only when I need to jump. But without using z regurally it won't remember my directories. So, I use something like this (example from my nushell config):

env_change: {
  PWD: [{|before, after|
    # Increment directory ranking each time $PWD is changed
    zoxide add $after
  }]
}

exa πŸ“

Github

A modern replacement for ls.

It's richer than ls (e.g. git integration), supports icons and colors.

Thought, I don't use it that much since I use nushell and it has a better cd built-in. But that's what was my go-to choice before.

Exa

sd πŸ“

Github

Intuitive find & replace CLI (sed alternative).

It's just easier and more intuitive.

# Simpler syntax for replacing all occurrences 
sd before after
sed s/before/after/g

# Replace newlines with commas
sd '\n' ','
sed ':a;N;$!ba;s/\n/,/g' # what is this syntax, seriously...

rargs 🀹

Github

xargs + awk with pattern matching support.

cat download-list.csv | rargs -p '(?P<url>.*),(?P<filename>.*)' wget {url} -O {filename}

Misc

Starship πŸš€

Site | Github

The minimal, blazing-fast, and infinitely customizable prompt for any shell!

It's looks very nice by default and provides pretty useful information in a compact format.

starship

Delta πŸ’¬

Github

A syntax-highlighting pager for git, diff, and grep output

delta

Tealdeer 🦌

Github

A very fast implementation of tldr in Rust.

What tldr is? Visit the site

Collaborative cheatsheets for console commands

tldr example with tar

Marky 🏭

Github

Convert Markdown documents into themed HTML pages with support for code syntax highlighting, LaTeX and Mermaid diagrams.

This is my own app that I use very often when working with markdown documents.

marky README.md

Gign βš™οΈ

Github

A cute .gitignore generator

Another app that I developed. It allows to generate .gitignore files efficiently by using community defined templates.

# would generate a predefined gitignore template
# for macOS, JetBrains IDE and python
gign --append macos jetbrains python