{"id":21491619,"url":"https://github.com/kavindujayarathne/dotfiles","last_synced_at":"2026-04-11T09:38:59.146Z","repository":{"id":264253974,"uuid":"892736252","full_name":"kavindujayarathne/dotfiles","owner":"kavindujayarathne","description":"My dotfiles 👨🏻‍💻","archived":false,"fork":false,"pushed_at":"2025-03-06T19:09:49.000Z","size":3076,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T20:23:06.027Z","etag":null,"topics":["bash","dev-environment","dotfiles","macos","nvim","scripting","tmux","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kavindujayarathne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-22T17:16:51.000Z","updated_at":"2025-03-06T19:09:52.000Z","dependencies_parsed_at":"2024-12-19T22:42:19.607Z","dependency_job_id":"94831656-5ca8-451d-bc9a-4ffcf2e6fb98","html_url":"https://github.com/kavindujayarathne/dotfiles","commit_stats":null,"previous_names":["kavindujayarathne/dotfiles"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kavindujayarathne%2Fdotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kavindujayarathne%2Fdotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kavindujayarathne%2Fdotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kavindujayarathne%2Fdotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kavindujayarathne","download_url":"https://codeload.github.com/kavindujayarathne/dotfiles/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244022635,"owners_count":20385133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","dev-environment","dotfiles","macos","nvim","scripting","tmux","zsh"],"created_at":"2024-11-23T15:17:05.488Z","updated_at":"2025-10-08T18:14:01.786Z","avatar_url":"https://github.com/kavindujayarathne.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dev Environment\n\n![Screenshot of dev workflow](https://raw.githubusercontent.com/kavindujayarathne/dotfiles/main/assets/dev-workflow2.png)\n\nThis dotfiles are designed for a macOS environment to provide a streamlined workflow and consistent developer experience across different machines. \n\n\u003e [!WARNING]\n\u003e I do not blindly use any of the configurations or tools here, and I encourage you to review them before trying them out.\n\n## `Installation and Setup`\n\nEnsure the following tools are installed before clone the repository.\n\n- Xcode command line tools\n\nIf you use macOS like me, xcode command line tool is necessary for compiling and running various packages.\n\n```bash\nxcode-select --install\n```\n\n- Homebrew (This is the package manager that I use for macOS)\n\n```bash\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n```\n\n- Git\n\nSince you have already installed xcode command line tools, git has been installed to your system by default with xcode command line tools. \n\nIf you want to use the latest version of git, you can install git using Homebrew.\n\n```bash\nbrew install git\n```\n\n- GNU Stow\n\nI use GNU Stow to manage my dotfiles.\n\n```bash\nbrew install stow\n```\n\n- Nerd Font \n\nFor terminal visuals, especially if your prompt and themes use specific glyphs, you need to install a Nerd Font. \n\nI use `Meslo LG Nerd Font` in my dev environment. You can use your preferred Nerd Font.\n\n```bash\nbrew install --cask font-meslo-lg-nerd-font\n```\n\n### Cloning the Repository and Installing tools\n\nClone the repository using Git:\n```bash\ngit clone https://github.com/kavindujayarathne/dotfiles.git ~/dotfiles/\n\ncd ~/dotfiles\n```\n\nOr, if you'd like to install these dotfiles without using Git, you can use the following command:\n\n```bash\nmkdir -p ~/dotfiles\ncd ~/dotfiles\ncurl -#L https://github.com/kavindujayarathne/dotfiles/tarball/main | tar -xzv --strip-components 1\n```\n\n**Optional:** If you want to exclude certain files such as README.md, you can modify the command like this:\n\n```bash\nmkdir -p ~/dotfiles\ncd ~/dotfiles\n\n# Exclude a single file\ncurl -#L https://github.com/kavindujayarathne/dotfiles/tarball/main | tar -xzv --strip-components 1 --exclude=README.md\n\n# Exclude multiple files\ncurl -#L https://github.com/kavindujayarathne/dotfiles/tarball/main | tar -xzv --strip-components 1 --exclude={README.md, assets}\n```\n\nYou can install my complete Homebrew setup including all the formulas, casks (macOS applications), vscode extensions and taps (additional repositories) by running below command;\n\n```bash\nbrew bundle install --file $HOME/dotfiles/config/.config/brewfile/Brewfile\n```\n\nOr you can skip things on my Brewfile by using following environment variables.\n\n- HOMEBREW_BUNDLE_BREW_SKIP\n- HOMEBREW_BUNDLE_CASK_SKIP\n- HOMEBREW_BUNDLE_TAP_SKIP\n\nUse these environment variables with **space-separated** values by executing them on the existing terminal session and then run `brew bundle install` command.\n\n```bash\n# To skip the installation of formulas\nexport HOMEBREW_BUNDLE_BREW_SKIP=\"formula1 formula2 ...\"\n\n# To skip the installation of casks\nexport HOMEBREW_BUNDLE_CASK_SKIP=\"cask1 cask2 ...\"\n\n# To skip the installation of taps\nexport HOMEBREW_BUNDLE_TAP_SKIP=\"tap1 tap2 ...\"\n```\n\nIf you don't want to install vscode extensions, you can modify the **Brewfile** removing lines relevant to vscode and then run the `brew bundle install` command with specifying the **Brewfile** location.\n\n\n### Setting up dotfiles\n\nAfter installing all the dependencies, the next step would be to setting up all the dotfiles into your home directory.\n\nI use GNU Stow to manage my dotfiles. You can follow one of below methods to setup dotfiles.\n\n```bash\ncd ~/dotfiles\n\nstow zsh   # Only symlinks zsh configuration\nstow bash  # Only symlinks bash configuration\nstow git   # Only symlinks git configuration\n\n# Or you can include all the packages into a single command\nstow zsh bash git .. \n```\n\n\u003e [!TIP]\n\u003e I have written a script named [dotfiles.sh](./scripts/dotfiles.sh) to automate this process. You can use that script if needed.\n\n\u003e [!NOTE]\n\u003e This script uses `fzf`. You should have installed `fzf` before run this script.\n```bash\nbrew install fzf\n```\n\n```bash\ncd ~/dotfiles/scripts\n\n./dotfiles.sh\n```\n\n![Screenshot of script](https://raw.githubusercontent.com/kavindujayarathne/dotfiles/main/assets/script.png)\n\nThis script will symlinks all the dotfiles at their respective locations under home directory.\n\n\n### Setting Up Sensitive Information\n\nI use a separate file called `.gitconfig_local` outside of the dotfiles repository to store the sensitive information, like git user credentials which I don't want visible inside `.gitconfig`.\n\nYou can use this script to dynamically generate the `.gitconfig_local` file.\n\n\u003e [!NOTE]\n\u003e Make sure that path to the `.gitconfig_local` file is correctly added under the include section in your main `.gitconfig` file.\n\n#### Script Overview\n```bash\n#!/usr/bin/env bash\n\n# Prompt for Git credentials\nread -p \"Enter your Git author name: \" git_author_name\nread -p \"Enter your Git author email: \" git_author_email\nread -p \"Enter your Git username: \" gh_user\n\n# Create the .gitconfig_local file with the provided information\ncat \u003c\u003cEOF \u003e~/.gitconfig_local\n# Git credentials\n[user]\n    name = $git_author_name\n    email = $git_author_email\n[github]\n    user = $gh_user\nEOF\n\necho \".gitconfig_local file created.\"\n```\n\n#### Usage\n```bash\ncd ~/dotfiles/scripts\n\n./gitconfig_local.sh\n```\n\n\n## `Configuration Details`\n\n### Terminal Setup\n\n**Terminal Emulator:** Alacritty\n  - Theme: [Catppuccin Mocha.](https://github.com/catppuccin/alacritty) For setup instructions, follow the guidance provided in the repository.\n\n  ```bash\n  curl -LO --output-dir ~/.config/alacritty/themes https://github.com/catppuccin/alacritty/raw/main/catppuccin-mocha.toml\n  ```\n\n  - Configuration: [alacritty.toml](./config/.config/alacritty/alacritty.toml) \n  - Explore more themes: [Alacritty Themes.](https://github.com/alacritty/alacritty-theme)\n\n**Nerd Font:** For enhanced visual and icon support, I use `Meslo LG Nerd Font`. This is essential for rendering special glyphs and icons in prompts and tools.\n\n  ```bash\n    brew install --cask font-meslo-lg-nerd-font\n  ```\n\n**Shell:** Zsh (primary) and Bash (secondary)\n  - Zsh Configuration: [.zshrc](./zsh/.zshrc)\n  - Bash Configuration:\n    - [.bash_profile](./bash/.bash_profile)\n    - [.bashrc](./bash/.bashrc)\n  - Prompt: [starship](https://starship.rs/) - fast, customizable prompt for any shell.\n    - Configuration: [starship.toml](./config/.config/starship/starship.toml)\n\n**Tools:**\n  - [fzf](https://github.com/junegunn/fzf) - Command-line fuzzy finder\n  - [ripgrep](https://github.com/BurntSushi/ripgrep) - Faster alternative to grep for recursive regex serach\n  - [tree](https://oldmanprogrammer.net/source.php?dir=projects/tree) - Display directory structure in a tree format\n  - [gh](https://cli.github.com/) - GitHub CLI for interacting with repositories\n  - [bat](https://github.com/sharkdp/bat) - Enhanced `cat` clone with syntax highlighting and Git integration.\n    - Theme: [catppuccin-mocha](./config/.config/bat/themes/catppuccin-mocha.tmTheme)\n    - [More info on setting up catppuccin themes](https://github.com/catppuccin/bat)\n  - [eza](https://github.com/eza-community/eza) - Modern replacement for `ls` with extra features\n  - [zoxide](https://github.com/ajeetdsouza/zoxide) - Smarter `cd` command for faster directory navigation\n  - [yazi](https://github.com/sxyazi/yazi) - Blazing fast terminal file manager written in Rust\n    - [Configuration files](./config/.config/yazi)\n    - Theme: [catppuccin-mocha-blue](./config/.config/yazi/theme.toml)\n    - [More info on setting up catppuccin themes](https://github.com/catppuccin/yazi)\n  - [htop](https://htop.dev/) / [btop](https://github.com/aristocratos/btop) - System monitoring tools.\n  - [glow](https://github.com/charmbracelet/glow) - Render markdown on the CLI\n  - [Atuin](https://github.com/atuinsh/atuin) - Improved shell history for zsh, bash, fish and nushell\n    - [Configuration files](./config/.config/atuin)\n  - [fd](https://github.com/sharkdp/fd) - Better alternative to `find` command\n  - [rar](https://www.rarlab.com/) - Archive manager for data compression and backups\n  - [git](https://git-scm.com) - Distributed revision control system\n\n\n### Tmux Setup (Terminal Multiplexer)\n\n**Configuration files:**\n\n  - Main file - [tmux.conf](./config/.config/tmux/tmux.conf)\n  - Bindings - [tmux.bindings.conf](./config/.config/tmux/tmux.bindings.conf)\n  - Themes - [themes](./config/.config/tmux/themes)\n\n**Tmux plugin manager:** \n\nI have included a logic inside the [tmux.conf](./config/.config/tmux/tmux.conf), to automatically install TPM along with the necessary plugins specified in `tmux.conf`, if they are not already installed in the expected location. No need for manual cloning!\n\n```bash\n# Bootstrap tpm\nif-shell '[ ! -d ~/.config/tmux/plugins/tpm ]' \\\n    'run-shell \"git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm \u0026\u0026 ~/.config/tmux/plugins/tpm/bindings/install_plugins\"'\n```\n\nUsage of plugin manager:\n  - Install plugins - `prefix + I`\n  - Update plugins - `prefix + U`\n  - Remove/Uninstall plugins - `prefix + O`\n\n**Tmux custom keybindings:**\n\nPrefix key\n  - `C-a`: prefix\n\nMove between tmux windows:\n  - `prefix + C-h`: Previous window\n  - `prefix + C-l`: Next window\n\nSource the config file:\n  - `prefix + r`: Source the config`\n\nResize tmux panes:\n  - `prefix + H`: Resize pane left\n  - `prefix + J`: Resize pane down\n  - `prefix + K`: Resize pane up\n  - `prefix + L`: Resize pane right\n\nZoom out the current pane:\n  - `prefix + m`: Zoom out the pane\n\nFocus panes:\n  - `prefix + h`: Focus left\n  - `prefix + j`: Focus down\n  - `prefix + k`: Focus up\n  - `prefix + l`: Focus right\n\n\n### Aerospace Tiling Window Manager Setup\n\n**Configuration:** [aerospace.toml](./config/.config/aerospace/aerospace.toml)\n\n**Usage:**\n\nKeybindings for Focus and Movement:\n  - `Alt + h/j/k/l`: Navigate between windows (left/down/up/right)\n  - `Alt + Shift + h/j/k/l`: Move windows between panes (left/down/up/right)\n  - `Alt + f`: Toggle fullscreen mode\n\nCustom Keybindings I Use for Workspaces:\n  - `Alt + y/u/i/o/p`: Switch to workspace 1/2/3/4/5\n  - `Alt + Shift + y/u/i/o/p`: Move windows to workspace 1/2/3/4/5 and switch to that workspace\n\nOther Commands:\n  - `Alt + /`: Switch between horizontal and vertical tiling layouts\n  - `Alt + ,`: Switch between horizontal and vertical accordion layouts\n  - `Alt + Shift + Semicolon`: Enter service mode\n  - `Alt + Tab`: Switch between the current and previous workspaces\n\n\n### Neovim Setup\nI use the `LazyVim` starter template, for my Neovim configuration, which provides a partially built setup without having to build everything from scratch. \n\n- Clone the starter template:\n  ```bash\n  git clone https://github.com/LazyVim/starter ~/.config/nvim\n  ```\n\n- For further details, refer to the [LazyVim documentation](http://www.lazyvim.org/).\n\n\n**Configurations:**\n\n- [nvim](./config/.config/nvim)\n\n\n## `Contributing`\n\nFeel free to fork this repository and make it work for your setup. Pull requests for improvements and bug fixes are welcome, but please note that I may not accept changes that don't align with my personal preferences.\n\n## `Licensing`\nThis repository is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.\n\n## `Thanks to`\nThanks to the contributors and developers of the tools and open-source projects referenced in this repository, and generally to everyone who open-sources their dotfiles.\n\n### Inspiration and Resources\nSpecial thanks to the individuals below for inspiring and providing useful ideas for this project:\n\n- **[Mathias Bynens](https://github.com/mathiasbynens)** for his [sensible hacker defaults for macOS](https://github.com/mathiasbynens/dotfiles/blob/main/.macos)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkavindujayarathne%2Fdotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkavindujayarathne%2Fdotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkavindujayarathne%2Fdotfiles/lists"}