A collection of heavily opinionated terminal configurations for personalized development environment. These settings reflect my preferred tools and workflows. Feel free to explore, use, and adapt them to your own needs.
The setup is designed to enhance the development experience on the Windows Subsystem for Linux (WSL), leveraging the capabilities of the Ubuntu Linux system. The current configuration of dotfiles employs a variety of tools, each contributing to a sophisticated development environment. Some of the tools included:
- Oh-My-Zsh: A community-driven framework for managing Zsh configuration, which includes helpful features such as plugin and theme support.
- Tmux: A terminal multiplexer that enables multiple terminal sessions within a single window.
- Vim: A highly configurable text editor built to facilitate efficient text editing.
- Git: A distributed version control system used to track changes in source code during software development.
- Atuin: A replacement for shell's history that syncs across multiple machines and provides advanced features like search and analytics.
The setup is flexible and can easily accommodate the integration of additional plugins as per the user's requirements.
- Begin by cloning the repository and navigating into the directory
git clone https://github.com/janezlapajne/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
- Setup environment variables
The configuration of the dotfiles is driven by environment variables. To establish a basic configuration, execute the following command:
tail -n +7 .env.example > .env
This command generates an .env
file, which serves as the blueprint for defining variables. For detailed guidance on configuring the environment, refer to the Configuration section.
- Execute the setup procedure by running
./setup.sh
This will symlink the appropriate files in subdirectories of .dotfiles/dotfiles
to home directory.
To ensure correct configuration, it's essential to define the environment variables outlined below.
GIT_NAME
: Name to appear in Git commits.GIT_EMAIL
: Email to appear in Git commits.GIT_CREDENTIAL_HELPER
: The path to the Git credential helper executable. This is used by Git to remember the credentials.
Example:
GIT_NAME=name
[email protected]
GIT_CREDENTIAL_HELPER=/mnt/c/Program/Files/Git/mingw64/libexec/git-core/git-credential-wincred.exe
β Note: For the Git credential helper to work, git-credential-manager needs to be installed. The exact location of git-credential-wincred.exe may vary depending on the specific Git installation.
ATUIN_USERNAME
: Atuin username.ATUIN_EMAIL
: The email address associated with Atuin account.ATUIN_PASSWORD:
The password for Atuin account.ATUIN_KEY:
(Optional) Atuin key, used for syncing shell history across devices.
Example:
ATUIN_USERNAME=name
[email protected]
ATUIN_PASSWORD=password
ATUIN_KEY=
SSH_EMAIL
: The email address used when generating SSH key.SSH_PASSPHRASE
: (Optional) The passphrase for SSH key.
Example:
[email protected]
SSH_PASSPHRASE=
TERMINAL_THEME_STARSHIP
: (Optional) Bool value whether to use starship theme.
Example:
TERMINAL_THEME_STARSHIP=true
β Note: For optimal usage of the
starship
theme in both the terminal and Visual Studio Code, it is recommended to install theFiraCode Nerd Font
:
- Visit Nerd Fonts and download "FiraCode Nerd Font".
- Install the font by double-clicking on the downloaded file.
To use the font in Windows Terminal:
- Go to Settings and navigate to Defaults > Appearance > Font Face.
- Select
FiraCode Nerd Font
from the dropdown menu.To use the font in Visual Studio Code:
- Open the settings (File > Preferences > Settings or
Ctrl + ,
).- Search for
terminal.integrated.fontFamily
.- Set the value to
FiraCode Nerd Font
β This will update the setting as follows:"terminal.integrated.fontFamily": "FiraCode Nerd Font"
.
The following diagram provides a schematic representation of the project's folder structure. Each directory and file is briefly described to give an overview of their purpose and function within the project:
π .dotfiles/
β
βββ π setup.sh -> Main script to setup the dotfiles
βββ π οΈ .env -> Configuration variables
β
βββ π bin/ -> Various utility scripts (added to $PATH)
β βββ π dot -> main update script
β βββ π ... -> other scripts
β
βββ π core/ -> Core setup scripts
β βββ π paths.sh
β βββ π setup-dotfiles.sh
β
βββ π docs/ -> Documentation, notes, etc.
β βββ π ...
β
βββ π dotfiles/ -> Configuration for various tools
β βββ π zsh/ -> main shell configuration
β βββ π .../
β
βββ π functions/ -> Utility functions (added to $PATH)
β βββ π ...
β
βββ π scripts/ -> Main scripts
β βββ π install-packages.sh -> installs system packages using apt-get
β βββ π install-tools.sh -> installs other tools, using pip3, npm etc.
β βββ π install.sh -> executes all install.sh scripts
β βββ π setup-all.sh -> executes all setup.sh scripts
β βββ π update-env.sh -> updates .env.example (used during development)
β
βββ π utils/ -> Utility scripts used inside repo
βββ π ...
This project follows a specific set of conventions for organization and functionality:
- bin/: This directory contains utility scripts. Any script placed here will be added to the
$PATH
and made accessible from anywhere in the system. - bin/dot: This is a simple script designed to manage dependencies and system packages. It not only installs and updates dependencies but also upgrades system packages. To maintain an up-to-date and efficient environment, it's recommended to execute this script periodically.
- docs: This directory serves as a repository for documentation, notes, and frequently used commands, among other things. It's a convenient location for storing any information that might be needed at hand.
- functions/: This directory is for utility functions. Like the
bin/
directory, anything placed here will be added to the$PATH
and can be used globally. - dotfiles/**/*.zsh: Any file with a
.zsh
extension located in thedotfiles/
directory or its subdirectories will be loaded into the environment. - dotfiles/**/path.zsh: Any file named
path.zsh
is loaded before other files. It's expected to set up$PATH
or similar environment variables. - dotfiles/**/completion.zsh: Any file named
completion.zsh
is loaded last and is expected to set up autocomplete functionality. - dotfiles/**/install.sh: Any file named
install.sh
is executed when thescripts/install.sh
script is run. These files have a.sh
extension instead of.zsh
to prevent them from being loaded automatically. These scripts are run each time thebin/dot
script is run. - dotfiles/**/setup.sh: Any file named
setup.sh
is executed when thescripts/setup-all.sh
script is run. Likeinstall.sh
files, these have a.sh
extension to prevent automatic loading. Thesetup.sh
scripts are run afterinstall.sh
scripts and only when thescripts/setup.sh
script is run. - dotfiles/**/.*: Any file starting with a
.
is symlinked into the$HOME
directory when the mainsetup.sh
script is executed. This allows for easy management of dotfiles.
We greatly appreciate any contribution, no matter how small. If you've identified a problem with the setup, we encourage you to first browse through both open and closed issues to see if it has been addressed before. If it's a new issue, please don't hesitate to create a new one on GitHub. If you're interested in correcting an existing issue or expanding the project's functionality, we welcome your involvement. Simply fork the repository, make your changes, and then submit a pull request on GitHub. Questions are also welcome. If you're unsure about something or need clarification, feel free to post an issue on GitHub.
This project is licensed under the MIT License. See LICENSE for more details.
This work was inspired by the dotfiles project by Zach Holman. Moreover, this project directly incorporates certain code snippets and design patterns for enhanced functionality.