Note
Collection of my configuration files. The reason why this README is so long is definitely not because I like wasting time writing documentation that no one will ever read instead of doing actual work.
![]() |
---|
macOS (my Yabai setup is no longer in use, see Deprecated |
![]() |
---|
Fedora w/ Sway WM ( |
Here are dotfiles for my systems, M1 MacBook Air and Lenovo ThinkPad X270. MBA runs the latest version of macOS, and X270 runs the latest version of Fedora Sway Spin with i3 WM installed (Wayland is almost there).
Tools in this repository are mostly open-source utilities for development.
Important
You are welcome to take inspiration from any files in this repository, but I do not claim any responsibility for any of the contents of the configurations (licensed under the MIT License). Read the code before you use it!
-
Configure cross-platform utilities using the following commands:
git clone https://github.com/theopn/dotfiles.git ~/dotfiles ~/dotfiles/dotfiles-util.sh --install ~/dotfiles/dotfiles-util.sh --delete-backup # Optional
-
Install Homebrew and configure macOS-specific utilities and settings using the following commands:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" brew analytics off ~/dotfiles/dotfiles-util.sh --macos-install
-
Choose configurations in the
misc
directory and manually copy them! Follow the commands in./misc/README.md
.
Note
Shameless plugs
- Theovim "is my Neovim configuration, geared toward my CS studies (C, Python, Java, LaTeX, LaTeX, and LaTeX). It features opinionated base Vim settings and keybindings, ~30 carefully selected plug-ins, and custom UI components written 100% in Lua."
- Haunted Tiles "is my personal i3 WM and Sway setup, along with essential tiling WM tools. It used to be a part of my dotfiles repository, and with the growing size of configurations and shared scripts between i3 and Sway, I made a separate repository for it."
-
Install Doom Emacs:
git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.config/emacs ~/.config/emacs/bin/doom install
- I had the best experience running natively-compiled emacs-plus in macOS
brew tap d12frosted/emacs-plus brew install emacs-plus --with-native-comp --with-modern-doom3-icon ~/.emacs.d/bin/doom sync # if you have already initialized Doom with other version of Emacs
-
Add SSH shortcut for frequently used servers:
~/dotfiles/dotfiles-util.sh --add-ssh-shortcut # Follow the prompt
-
To install fonts via
fontconfig
and the included function indotfiles-util.sh
:- Navigate to NERD Fonts download website
- Right-click on the font download and copy the link
- Execute the following
$FONT_URL=thing-you-just-copied ~/dotfiles/dotfiles-util.sh --install-font $FONT_URL
-
To install Iosevka Nerd Font (for terminal emulators and text editors) and FantasqueSansM Nerd Fonts (for window managers) using Homebrew:
brew tap homebrew/cask-fonts && brew install --cask font-iosevka-nerd-font font-fantasque-sans-mono-nerd-font
Rich built-in features, questionable syntax
It's the de facto default shell that launches when Wezterm opens.
It has a fantastic built-in auto-completion and stupidly fast asynchronous Git status, but I cannot say I prefer the syntax over POSIX in contrary to the popular opinion.
Because it's not POSIX compatible, Zsh is my $SHELL
.
Usage: Most of the aliases and functions of my Zsh config are supported in Fish.
The shell
- Usage:
- Prompt:
[vi-mode]` ➜ /current/path/ git-branch(* for unstaged, + for staged changes) | last-exit-code ❱
- Basic aliases:
cdf
to navigate directories quickly usingfzf
,cl
toclear
,l
tols
with list view and other options,histgrep
to look up previous commands trash
,trash_cd
,trash_empty
,trash_print
: trash related functions. The trash directory is located in~/.theoshell/trash
. This directory will be used again for LFtheoshell_plug <github-username>/<repo-name>
: installs Zsh plug-in from a GitHub repository (to~/.theoshell/zsh-plugins
) and/or source it- I only install zsh-autocomplete by default
theoshell_upgrade
: Upgrade all Zsh plug-ins in~/.theoshell/zsh-plugins
- Prompt:
Universal terminal multiplexer
I usually pair Tmux with a simple terminal emulator like Kitty or Alacritty. Because I am not the biggest fan of the default keybindings, many are unbound and rebound to Vim-style navigation and window/pane management.
- Usage:
- For the complete list of keybindings, disabled default keybindings, and frequently used default bindings, use
C-a ?
and read the comment in line 20 C-a
is the prefixPFX c
: Copy modePFX hjkl
: Pane navigationPFX r/x
: Swap panesPFX s/v
: Create a split horizontally/verticallyPFX -+<>
: Resize panePFX C-s
: Send the current pane to the window of the given index (will be prompted for the index)PFX C-j
: Join the pane from the window of the given index (will be prompted for the index)PFX t
: Create a new windowPFX q
: Kill a pane (there is no separatekill-window
binding; close all panes to kill a window)PFX [/]
: Navigate windowsPFX {/}
: Swap window indices with adjacent windowsPFX m
: Move the current window to the given indexPFX ?
: Open~/.tmux.conf
in a floating popup
- For the complete list of keybindings, disabled default keybindings, and frequently used default bindings, use
Over-engineered terminal emulator, nailed the fundamental features, and it is configured in Lua!
Wezterm is my primary terminal emulator/multiplexer! Watch my YouTube video Configure Wezterm terminal emulator in Lua with me [ASMR Coding] :)
- Usage:
LDR
=C-a
LDR c
: Copy modeLDR s/v
: Create a split paneLDR hjkl
: Navigate paneLDR q
: Close paneLDR z
: Zoom paneLDR o
: Rotate paneLDR r
:resize_pane
mode. Usehjkl
to resize pane andESC
orEnter
to confirmLDR t
: New tabLDR [/]
Navigate tabLDR 1-9
: Navigate tab by indexLDR n
: Launch tab navigatorLDR e
: Rename tab titleLDR m
:move_tab
mode. Usehj
/kl
to move tabs andESC
orEnter
to confirmLDR {/}
: Move tab without entering themove_tab
mode
LDR w
: Workspace launcher$ wezterm show-keys --lua
to get the Lua table of all keybindings available
Good OS, mediocre text editor even with Evil mode
Emacs is my to-do list, idea capture, knowledge databases, and tools for other Second Brain functionalities.
- Usage:
- All the stock Emacs + Evil mode keybindings
%
: Jump between parenthesis like in VimC-c t
: Toggle transparencyC-c a
: Org AgendaC-c c
: Org CaptureC-c o
: Display Org file outline usingoccur
C-c f
: Find Org-roam nodeC-c i
: Insert Org-roam nodeC-c r b
: List all Org-roam references in the current bufferC-c r r
: Sync Org-roam database
Focused note-taker
Because of my extensive Neovim IDE config, My Vimrc is kept minimal as my journal writer with the Vimwiki plug-in.
My Vimrc is built using Kickstart.vim.
- Config:
- Kickstart.vim contents, including sensible defaults and LSP setup
- Handmade TabLine
- Vimwiki setup for my personal journal writing
My favorite terminal file manager
When I see a CLI file manager with Vim keybindings and a minimalistic feature set, I like it. I use it.
- Usage:
~
: Go to the home directoryee
: Open a file in$EDITOR
ec
: You choose what editor you want to open a file inDD
: Move a file to~/.theoshell/trash
(it integrates with my Zsh trash functions)gs
: [g]it [s]tatusmd
: mkdirmf
: Open a file with the supplied name in Neovimml
,mr
,ms
: [m]ark [l]oad, [m]ark [r]emove, [m]ark [s]avemo
: chmodsh
: Launch$SHELL
at the current directory
Thanks Linus
No comments.
Note
These are single-file, minimal configurations that do not change very often.
These are meant to be manually deployed as needed.
Use the commands in ./misc/README.md
to deploy these configurations.
bashrc
: I prioritize simplicity and performance since Zsh and Fish take care of my interactive uses and most of my scripts are written in Bash. Thus, my.bashrc
is kept minimal with a simple prompt, some aliases, and variableskitty.conf
: Kitty is my secondary terminal emulator. The configuration is kept minimal since I always pair it up with Tmuxideavimrc
: Sorry to disappoint you, but I code in Java sometimesneofetch.conf
: It includes a prompt inspired by "insert name" from Neofetch Themes
My Vim-inspired Rectangle keybindings (restore them using ./macos/vimtangle.json):
control + command
(⌃⌘
) is the modifiermod + h/l
: Left/right halfmod + j/k
: First thirds/last two thirdsmod + n/m
: Almost maximize/maximizemod + -/=
: Smaller/larger
If you use a third-party menubar-replacement (e.g., Sketchybar), execute the following command to make Rectangle aware of the bar
defaults write com.knollsoft.Rectangle screenEdgeGapTop -int 30 # or thickness of the bar in pixel. 0 to reset
I also recommends you to
- Make shortcuts for switching desktops using a built-in macOS key modifier (if you are to use Skhd for this, it requires disabling SIP)
- Create 5 Mission Control desktops
- "Keyboard" -> "Keyboard Shortcuts" -> "Mission Control" -> "Mission Control" -> Turn on "Switch to Desktop n" (where "n" is the number 1 - 5)
- Set the shortcut to
^n
(Ctrl n
) or⌥n
(Opt n
) - While you are at it, go to "Modifier Keys" and switch "Caps Lock key" and "Control key". Your pinky will thank you
Bolded items are in Brewfile_core
, and other items are in Brewfile_optional
, either because I don't want them to be installed on every machine or are too large.
Formulae:
- ffmpeg:
ffmpeg -i in.xxx out.yyy
- figlet: ASCII art generator
- fish: De facto default shell
- fzf: Command line fuzzy finder
- htop: System monitor
- hugo: Static website generator
- imagemagick: Command line image manipulation
- lf: My favorite CLI file manager
- lua
- neofetch: Happy ricing!
- neovim: Where I live
- node
- rclone: Cloud storage management
- rust
- tmux: Universal terminal multiplexer
- tree: Tree-like directory view
- wget: Be careful with what you download
Type | Casks |
---|---|
Development | - Docker - IntelliJ CE - kitty - MacTex (No GUI) - MacVim - Wezterm |
Fun | - Discord - Minecraft - Spotify |
Productivity | - Emacs - Itsycal - Notion |
System (macOS) | - AppCleaner - Maccy - Rectangle - Stats - Spaceman |
Tools | - Bitwarden - Cryptomator - GIMP - OBS - Skim - VLC |
Web | - Firefox - Thunderbird |
Remove Dock unhide animation, add a Dock spacer, show hidden files in Finder, change screenshot format and location (I like having every temporary file in ~/Downloads/
), etc.
Warning
These dotfiles are unused because either I stopped using the utility or developed a new configuration.
Read the list of deprecated configurations for more information.
- The macOS wallpaper is by arsenicxs
- hb's dotfiles and FelixKratz's dotfiles (the creator of Sketchybar) inspired my Sketchybar looks
- Other than that, all of the config/code is mine.
- I dislike having code I don't understand, especially in my day-to-day development environment. I try to understand and rewrite configurations on my own
- I give credit to all the amazing developers and the open-source community who developed all these tools I rely on every day and wrote documentation for them
- I also would like to thank people in communities like Dotfyle and r/unixporn who share their dotfiles that helped and inspired me
- If you have any questions, concerns, or suggestions, do not hesitate to let me know through issues or PR!