GithubHelp home page GithubHelp logo

dotfiles's Introduction

dotfiles

My dotfiles. I use a mix of MacOS and Linux. There is a separate branch for each, with changes occasionally cherry-picked from one to the other.

If you're just browsing around, the most interesting part is my Zsh configuration. Some other items of note are also linked below.

Zsh

I do not use any configuration frameworks, and I only use a couple of third-party plugins. The rest is bespoke.

Most functionality is hand-crafted in pure Zsh, and the overall codebase is structured like an application. My goal is to create a shell configuration that is powerful and user-friendly, but still hackable and reasonably fast.

Some things to look at,

  • You can find several small in-house Zsh plugins as self-contained files under plugins.d/
    • project-history implements separate shell histories within Git project repos
    • dynenv implements a novel mechanism for exporting variables across shell instances instantaneously. Useful for, eg, exporting an access token in one shell, and immediately using it in another one.
  • Zsh's ZLE line editor has been extensively configured, including many custom widgets that implement functionality such as,
  • The custom prompt is fully-featured, including,
    • Git branch & status
    • Auto-collapsing directory display based on terminal width
    • Auto-collapsing username and hostname which are only displayed when needed (su'd to another user, or connected to a remote machine)
    • Useful information about the shell environment, such as the size of the Zsh ZLE input stack; the current SHLVL depth; or whether or not our shell was spawned from within a file manager
    • Minimalistic design that displays only the information that's needed in a clean way, with clear visual padding
  • Performance optimizations, such as,
  • Most shell configuration happens in rc.d/
  • Primary bootstrapping happens in rc, including functionality for debugging and profiling startup time.

Other stuff

  • I currently use X11, not Wayland. This may change in the future, but as of 2024, I don't feel Wayland is there yet.
  • I use the i3 window manager
  • bin (symlinked to ~/bin) contains several useful utilities
    • menu-launch is an all-in-one app launcher that can launch XDG .desktop apps, open web links, perform web search queries, open files, or run a given command inside a terminal.
    • raiseorrun implements MacOS-like behavior of selecting an application's window if it's already launched, or launching the application if it's not.
  • A runit instance is used in place of the typical foo & pattern in .xinitrc.
    • Stuff like wallpaper setter/rotater, compositor, etc are typically launched as child processes via .xinitrc. This provides no supervision if they crash, and no ability to bring down or restart easily.
    • Instead, I launch these via runit service scripts (these get symlinked into ~/sv to enable them).
    • The service tree is bootstrapped by X11 after it's finished self-configuring. Session variables such as DBUS info is correctly available to all supervised services.

How do I use them?

These are my personal dotfiles. If you find something useful here, you are free to use any or all of it under the terms of 0BSD, except for any files/folders which have their own license included or are attributed to another author.

Feel free to fork, but make it your own. I make no effort to generalize my setup for consumption and/or remove any assumptions or personal choices.

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.