Giter Site home page Giter Site logo

benelan / dotfiles Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 3.39 MB

"Decorate your home. It gives the illusion that your life is more interesting than it really is."     —  Charles M. Schulz

Shell 41.33% Lua 38.63% Vim Script 15.06% Perl 2.85% Dockerfile 0.33% Scheme 0.10% Ruby 1.22% CSS 0.47%
dotfiles config home i3wm swaywm neovim shell vim w3m wezterm

dotfiles's Introduction

dotfiles

This is my personal setup, I strongly discourage using the setup script unless you're me. I recommend looking through the files and picking bits and pieces that fit your workflows.

Setup

To install the dotfiles in your $HOME directory, run:

curl -sSL benelan.dev/s/dotfiles | sh

If the link above dies, use the dot script's init subcommand instead.

curl -sSL https://raw.githubusercontent.com/benelan/dotfiles/master/.dotfiles/bin/dot | bash -s init

The script will backup any conflicting files to ~/.dotfiles-backup. It will set up the dotfiles as a bare git repo, which makes syncing changes easy. You can also create separate branches for different machines. Read this tutorial for more info. A common alternative is managing dotfiles with symlinks (e.g., GNU stow), but in my experience that can get messy.

dot command

The dot script has the following custom subcommands:

  • init: Setup the dotfiles bare repo, as mentioned above.
  • deps: Install various dependencies, including development tools, GUI apps, shell scripts, fonts, themes, and more. See dot deps -h for usage info.
  • edit: Open nvim/vim with environment variables set so git plugins work with the bare dotfiles repo.
  • get: Clone a repo to the $LIB directory instead of $PWD.

All other subcommands and their arguments are passed to git, with environment variables set to ensure dot always runs on the bare repo. Untracked files are hidden, since technically the whole home directory is under version control. Therefore, you need to add files before they show up in status and diff. A typical workflow for adding a new config file to the repo is:

dot add .config/xyz/config.yml
dot commit -m "chore(xyz): add config"
dot push

Git bash completion and the git aliases defined at the bottom of ~/.config/git/config will also work for dot.

Operating systems

Linux

My setup was primarily created for Ubuntu/Debian and their derivatives. However, I try to separate the Ubuntu-only code and make sure executables exist before using them. The main issue you'll face with other linux distros is missing dependencies, which I install with dot deps -U on Ubuntu. See the apt dependency lists, although names may vary depending on your distro's package manager.

macOS

Mac users should follow these steps to switch to the GNU version of command line utilities. I strongly suggest switching even if you don't copy anything from this repo, because it will align your local development environment with production. Linux uses the GNU version of utils, and most servers, containers, and continuous integration runners use Linux.

Windows

It's safe to assume nothing in this repo will work on Windows. However, I occasionally need Windows for my job and can confirm this setup works in WSL running Ubuntu.

Configuration

Put machine-specific stuff in ~/.dotfiles/shell/local.sh, which gets sourced in ~/.bashrc if it exists. The following environment variables are flags that accept a value of 1 or 0 (default) to enabled/disable tools and other functionality.

  • DESKTOP_MACHINE - Install and use GUI tools that only work on desktop machines.
  • WORK_MACHINE - Setup the environment for work (aliases functions, etc.)
  • COPILOT - Use the GitHub Copilot plugin in Neovim.
  • CODEIUM - Use the Codeium (free Copilot alternative) plugin in Neovim.
  • NERD_ICONS - Use developer icons in various tools. The icons are displayed in Neovim/Vim/Vifm/etc. by default when using Wezterm (since it ships with Nerd Font glyphs), but they can be disabled by setting the option to 0. If you don't use Wezterm, make sure to install a Nerd Font (e.g. dot deps -t font) before setting the option to 1.

Credits

I learned and stole a lot from the following sources. There are credits/links in specific files as well, when relevant.

  • Copyright (c) 2020-2021 Bash-it MIT [code]

  • Copyright (c) LazyVim Apache License 2.0 [code]

  • Tom Ryder [code]

  • Seth House [code]

dotfiles's People

Contributors

benelan avatar

dotfiles's Issues

Invalid commands in vifmrc

Hi,

This portion of your config was referenced on Vifm Q&A:

mark d expand($DOTFILES)
mark n expand($NOTES)
mark p expand($PERSONAL)
mark l expand($LIB)
mark w expand($WORK)
mark c expand($CALCITE)

It doesn't work and should look like:

execute 'mark d' fnameescape($DOTFILES)
" etc.

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.