GithubHelp home page GithubHelp logo

janezlapajne / dotfiles Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 423 KB

๐Ÿ”ฅ Terminal configuration with personalized dotfiles for an optimized and streamlined development environment.

License: MIT License

Shell 99.70% Vim Script 0.30%
dotfiles oh-my-zsh zsh shell terminal wsl tmux vim cli config console customization theme

dotfiles's Introduction

๐Ÿ”ฅ Elevate Your Development Experience ๐Ÿ”ฅ

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.

terminal-start

๐Ÿ” Overview

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.

๐Ÿ• Quickstart

  1. Begin by cloning the repository and navigating into the directory
git clone https://github.com/janezlapajne/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
  1. 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.

  1. Execute the setup procedure by running
./setup.sh

This will symlink the appropriate files in subdirectories of .dotfiles/dotfiles to home directory.

๐Ÿ›  Configuration

To ensure correct configuration, it's essential to define the environment variables outlined below.

Git

  • 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

  • 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

  • SSH_EMAIL: The email address used when generating SSH key.
  • SSH_PASSPHRASE: (Optional) The passphrase for SSH key.

Example:

[email protected]
SSH_PASSPHRASE=

Terminal

  • 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 the FiraCode Nerd Font:

  1. Visit Nerd Fonts and download "FiraCode Nerd Font".
  2. Install the font by double-clicking on the downloaded file.

To use the font in Windows Terminal:

  1. Go to Settings and navigate to Defaults > Appearance > Font Face.
  2. Select FiraCode Nerd Font from the dropdown menu.

To use the font in Visual Studio Code:

  1. Open the settings (File > Preferences > Settings or Ctrl + ,).
  2. Search for terminal.integrated.fontFamily.
  3. Set the value to FiraCode Nerd Font โ†’ This will update the setting as follows: "terminal.integrated.fontFamily": "FiraCode Nerd Font".

๐Ÿ“– Folder Structure

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 the dotfiles/ 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 the scripts/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 the bin/dot script is run.
  • dotfiles/**/setup.sh: Any file named setup.sh is executed when the scripts/setup-all.sh script is run. Like install.sh files, these have a .sh extension to prevent automatic loading. The setup.sh scripts are run after install.sh scripts and only when the scripts/setup.sh script is run.
  • dotfiles/**/.*: Any file starting with a . is symlinked into the $HOME directory when the main setup.sh script is executed. This allows for easy management of dotfiles.

๐ŸŽ‰ Additional notes

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.

๐Ÿค License

This project is licensed under the MIT License. See LICENSE for more details.

๐Ÿ† Acknowledgements

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.

dotfiles's People

Contributors

imgbotapp avatar janezlapajne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.