GithubHelp home page GithubHelp logo

sergeyklay / dotfiles Goto Github PK

View Code? Open in Web Editor NEW
13.0 5.0 1.0 2.42 MB

All my dotfiles that I port around from system to system with me

License: GNU General Public License v3.0

Shell 83.81% Haskell 0.60% Python 1.22% INI 14.36%
dotfiles shell git ghci dotfiles-resources bashrc zsh zsh-configuration zshrc

dotfiles's Introduction

~/.*

All my dotfiles that I port around from system to system with me. The purpose of this project is to organize my shell scripts and configs and sync them between machines. This started out fairly simple, but now can also handle my .zshrc and keep things synchronized between machines like .zshenv, etc.

Shell support

These dotfiles are meant to be used with Zsh, but some scripts may work as Bash accepts Z shell interpreter. Also, your shell should support colors so everything works well. Wherever possible, compatibility with Linux as well as macOS is maintained.

Project Structure

Z shell startup files

There are five startup files that Z shell will read commands from in order:

zshenv
zprofile
zshrc
zlogin
zlogout

Below is the explanation about each of these files, when it is loaded, and what it does.

Z shell locations

The default location for Z shell system-wide files is in /etc. The default location for Z shell user files is in $HOME; this can be customized by setting $ZDOTDIR.

Thus the default locations are:

/etc/zshenv
/etc/zprofile
/etc/zshrc
/etc/zlogin
/etc/zlogout

$HOME/.zshenv
$HOME/.zprofile
$HOME/.zshrc
$HOME/.zlogin
$HOME/.zlogout

Zsh startup files

zshenv

zshenv is sourced on all invocations of the shell, unless the -f option is set.

What goes in it:

  • Set up the command search path
  • Other important environment variables
  • Commands to set up aliases and functions that are needed for other scripts

What does NOT go in it:

  • Commands that produce output
  • Anything that assumes the shell is attached to a tty

zprofile

zprofile is sourced in login shells. It is meant as an alternative to zlogin for ksh fans; the two are not intended to be used together, although this could certainly be done if desired.

What goes in it:

  • Commands that should be executed only in login shells
  • As a general rule, it should not change the shell environment at all
  • As a general rule, set the terminal type then run a series of external commands e.g. fortune, msgs, etc

What does NOT go in it:

  • Alias definitions
  • Function definitions
  • Options
  • Environment variable settings

zshrc

zshrc is sourced in interactive shells.

What goes in it:

  • Commands to set up aliases and functions that are needed for other scripts

zlogin

zlogin is like zprofile, except sourced after zshrc.

zlogout

zlogout is sourced when login shells exit.

Repo files

This repo contains my Z shell conventions for subdirectories and also my files that I like to use with multiple environments.

Notable subdirectories:

  • .config/zsh/lib/functions is for functions
  • .config/zsh/lib/prompts is for prompts
  • .config/zsh/conf.d is for configuring environment programs via environment variables, such as $EDITOR, $PAGER, etc, aldo for Z shell settings, such as for aliases, completion, history, etc
  • .config/zsh/conf.d/OS is for OS-wide configuration files

License

This project is open source software licensed under the GNU General Public License version 3. © 2014-2022 Serghei Iakovlev

dotfiles's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

flaxxis

dotfiles's Issues

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.