Giter Club home page Giter Club logo

dotfiles's Introduction

dotfiles

  • CI
  • License:MIT
  • GitHub last commit
  • Open issues

An attempt to follow XDG specifications and store config files in ${XDG_CONFIG_HOME}.

I would like to keep my enviroment with minimal dependences and keep my configs well commented if possible.

A list of config files will grow with time. Also I will include changes in system wide files (from /etc/ dir)

Installation via copy paste of the following command:

for BASH:

curl -s https://raw.githubusercontent.com/orleanski/dotfiles/master/setup.sh | sh && source .config/bash/bashrc

for ZSH:

curl -s https://raw.githubusercontent.com/orleanski/dotfiles/master/setup.sh | sh && source .config/zsh/.zshrc

Directory structure after running setup.sh

initial directory structure

TMUX status line

tmux status line

  • Red heart will be visible in UTF-8 console, and if your font does not support it, you will see just a red square. If console is not UTF-8 enabled, then the heart will dissapear.
  • who @ hostname
  • window with ongoing process name (make)
  • window with finished process ended with alert sleep 5s && echo -e '\a' as an example
  • window with two panes, one is marked and zoomed, but no activity
  • active window
  • date and time are always in the right corner
tmux window flags
  #:  window activity flag
  !:  window bell flag
  ~:  window silence flag
  *:  current window flag
  -:  last window flag
  M:  marked pane flag
  Z:  window zoomed flag

VIM

Vim on the first start will automatically download vim-plug and then install few plugins, and will give you a warning, just let it finish installation close vim and open it again, vim will start quick and clean.

Vim plugins

vim plugins

Truecolors

Combination of Alacritty + Tmux + Neovim now uses truecolors with alacrity-direct, tmux-direct and termguicolors in respective config files. For TTY, kmscon could be a solution, I've tried it and it works, but I am holding it off for now, since it is a rare event when I have to login to the console under a user. For ssh access putty works well with truecolors (in the Connection->Data->Terminal-type string replace xterm with tmux-direct).

Makefile

This is my memory aid.

The Makefile will be staying @ $HOME

TODO

The progress is reflected in my TODO list

dotfiles's People

Contributors

orleanski avatar

Stargazers

 avatar  avatar

Watchers

 avatar

dotfiles's Issues

systemwide xdg file

/etc/profile.d/xdg.sh

# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
test "$XDG_CACHE_HOME"  || export XDG_CACHE_HOME="$HOME/.cache"
test "$XDG_CONFIG_HOME" || export XDG_CONFIG_HOME="$HOME/.config"
test "$XDG_DATA_HOME"   || export XDG_DATA_HOME="$HOME/.local/share"

Makefile snippet for bootstrapping

homedir: #{{{ prep my home environment with all the config files
	echo "I am about to empty your homedir"
        read -sn 1 -p "ctrl-C to abort or Press any key to proceed."
        echo "nah, just checking you are not a cat, let's try again"
        read -sn 1 -p "ctrl-C to abort or Press any key to proceed."
	rm -rf  $HOME/*
	echo "cloning dotfile repo"
	yadm clone yadm clone https://github.com/vyvox/dotfiles.git
	echo "TODO make the snippet prettier"
	echo "removing .github dir with README and LICENSE files"
	rm -rf $HOME/.github
# }}}

wget

alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'

vs

export WGETRC="$XDG_CONFIG_HOME/wgetrc"
and add the following as an alias for wget:
wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"
or set the hsts-file variable with an absolute path as wgetrc does not support environment variables:
echo hsts-file \= "$XDG_CACHE_HOME"/wget-hsts >> "$XDG_CONFIG_HOME/wgetrc"

populate TEMPLATES directory

Place empty or partially filled files in the TEMPLATE folder:

bash script.sh
bash script root.sh
Markdown document.md
ODF Spreadsheet.ods
ODF Text Document.odt
LaTeX document.tex

systemwide bashrc

In the /etc/bash/bashrc add


# XDG_CONFIG_HOME is set in /etc/profile.d/xdg.sh
# Move .bashrc to ${XDG_CONFIG_HOME}/bash/bashrc

source ${XDG_CONFIG_HOME}/bash/bashrc

Bash history file

Add .local/share/bash for the bash history file, so it wouldn't complain.

systemwide X11

files that needs correction from $HOME/ to ${XDG_CONFIG_HOME}/X11/

  • /etc/X11/xinit/xinitrc
  • /etc/X11/Sessions/Xsession
  • /etc/X11/Sessions/Fluxbox

Files that will be affected:

  • .Xresources
  • .xsession
  • .xsession-errors
  • .Xmodmap
  • .Xkbmap
  • .Xclients

user-dirs

I am thinking user-dirs structure alteration

Desktop
Documents
    Documents/Templates
Downloads
Media
    Media/Pictures
    Media/Music
    Media/Videos
Projects
Public

systemwide sandbox

files that needs correction from $HOME/ to ${XDG_CONFIG_HOME}/X11/

  • /etc/sandbox.conf

Files that will be affected:

  • .bash_history

local export of XDG dirs

dirs4xdg.sh

#!/bin/sh
test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && \
source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && \
#export XDG_DESKTOP_DIR XDG_DOWNLOAD_DIR XDG_TEMPLATES_DIR XDG_PUBLICSHARE_DIR XDG_DOCUMENTS_DIR XDG_MUSIC_DIR XDG_PICTURES_DIR XDG_VIDEOS_DIR XDG_SCREENSHOTS_DIR XDG_BACKGROUNDS_DIR XDG_PROJECTS_DIR
[ -d "${XDG_DESKTOP_DIR}:-$HOME/Desktop" ] || mkdir -p ${XDG_DESKTOP_DIR}
[ -d "${XDG_DOCUMENTS_DIR}:-$HOME/Documents" ] || mkdir -p ${XDG_DOCUMENTS_DIR}
[ -d "${XDG_TEMPLATES_DIR}:-$HOME/Documents/Templates" ] || mkdir -p ${XDG_TEMPLATES_DIR}
[ -d "${XDG_DOWNLOAD_DIR}:-$HOME/Downloads" ] || mkdir -p ${XDG_DOWNLOAD_DIR}
[ -d "${XDG_PUBLICSHARE_DIR}:-$HOME/Public" ] || mkdir -p ${XDG_PUBLICSHARE_DIR}
[ -d "${XDG_MUSIC_DIR}:-$HOME/Media/Music" ] || mkdir -p ${XDG_MUSIC_DIR}
[ -d "${XDG_VIDEOS_DIR}:-$HOME/Media/Videos" ] || mkdir -p ${XDG_VIDEOS_DIR}
[ -d "${XDG_PICTURES_DIR}:-$HOME/Media/Pictures" ] || mkdir -p ${XDG_PICTURES_DIR}
[ -d "${XDG_BACKGROUNDS_DIR}:-$HOME/Media/Picture/Backgrounds" ] || mkdir -p ${XDG_BACKGROUNDS_DIR}
[ -d "${XDG_SCREENSHOTS_DIR}:-$HOME/Media/Picture/Screenshots" ] || mkdir -p ${XDG_SCREENSHOTS_DIR}
[ -d "${XDG_PROJECTS_DIR}:-$HOME/Projects" ] || mkdir -p ${XDG_PROJECTS_DIR}

chmod 700 ${XDG_CACHE_HOME} ${XDG_CONFIG_HOME} ${XDG_DATA_HOME}

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.