diff --git a/.Xresources b/.Xresources deleted file mode 100644 index 5dc4e6a..0000000 --- a/.Xresources +++ /dev/null @@ -1,96 +0,0 @@ -!!============================================================================= -!! RXVT-unicode setting -!!============================================================================= - - -urxvt.depth: 32 - -urxvt.internalBorder: 4 -urxvt.blurRadius: 25 -urxvt.scrollBar: false -urxvt.saveLines: 10000 -urxvt.preeditType: Root -urxvt.jumpScroll: false -urxvt.altSendsEscape: true - -xterm.metaSendsEscape: true - -!Set TERM -urxvt.termName: xterm-256color - -Xft.dpi: 136 -Xft.antialias: true -Xft.rgba: rgb -Xft.autohint: false -Xft.hinting: true -Xft.hintstyle: hintfull -urxvt*font: xft:Sauce Code Pro:style=Regular:size=9.8 -urxvt*imFont: xft:Sauce Code Pro:style=Regular:size=9.8 -urxvt*boldFont: xft:Sauce Code Pro:style=Bold:size=9.8 -urxvt*italicFont: xft:Sauce Code Pro:style=Italic:size=9.8 -urxvt*boldItalicFont: xft:Sauce Code Pro:style=Bold,Italic:size=9.8 - - -! clickable Url and copy paste keys - -urxvt.iso14755: false -urxvt.iso14755_52: false -urxvt.perl-ext-common: default,clipboard,vtwheel,font-size -urxvt.keysym.Shift-Control-C: perl:clipboard:copy -urxvt.keysym.Shift-Control-V: perl:clipboard:paste -urxvt.url-launcher: /usr/bin/chromium -urxvt.matcher.button: 1 - -urxvt.keysym.C-Up: font-size:increase -urxvt.keysym.C-Down: font-size:decrease -urxvt.keysym.C-S-Up: font-size:incglobal -urxvt.keysym.C-S-Down: font-size:decglobal - -Xft.lcdfilter: lcddefault - -! special -*.foreground: #ECEFF1 -*.background: #002B36 -!*.cursorColor: #ECEFF1 -*.cursorColor: #5294E2 -*.highlightColor: #5294E2 -urxvt.background: [95]#383C4A -urxvt.scrollColor: #767B87 -urxvt*dynamicColors: on -urxvt*highlightSelection: true -urxvt*colorMode: on - -! black -*.color0: #333638 - -!white -*.color15: #eceff1 - -! gray -*.color7: #8b9396 -*.color8: #475760 - -! red -*.color1: #ff3f00 -*.color9: #ef5345 - -! green -*.color2: #8bc34a -*.color10: #9ccc65 - -! yellow -*.color3: #ffc107 -*.color11: #ffa000 - -! blue -*.color4: #0266f4 -*.color12: #3f86da - -! magenta -*.color5: #cc17cc -*.color13: #a56ecC - -! cyan -*.color6: #10aeba -*.color14: #5ddae2 - diff --git a/.xinitrc b/.config/X11/xinitrc similarity index 81% rename from .xinitrc rename to .config/X11/xinitrc index 0a35a3a..5015f41 100644 --- a/.xinitrc +++ b/.config/X11/xinitrc @@ -12,8 +12,8 @@ if [ -d "$xinitdir" ]; then fi source ~/.profile -source ~/.xsession -xrdb -merge ~/.Xresources +source $XDG_CONFIG_HOME/X11/xsession +xrdb -merge $XDG_CONFIG_HOME/X11/xresources ~/.local/share/surfacetools/rotationd --once exec i3 diff --git a/.config/X11/xresources b/.config/X11/xresources new file mode 100644 index 0000000..a00708e --- /dev/null +++ b/.config/X11/xresources @@ -0,0 +1,89 @@ +! Colour order: +! black +! red +! green +! yellow +! blue +! magenta +! cyan +! white/gray + +! Normal colours +*.color0: #333638 +*.color1: #f41f1c +*.color2: #8bc34a +*.color3: #ffc107 +*.color4: #0266f4 +*.color5: #cc17cc +*.color6: #10aeba +*.color7: #8b9396 + +! Bright colours +*.color8: #475760 +*.color9: #e53727 +*.color10: #9ccc65 +*.color11: #ffa000 +*.color12: #81b3f9 +*.color13: #a56ecc +*.color14: #5ddae2 +*.color15: #eceff1 + + +Xft.dpi: 136 +Xft.antialias: true +Xft.rgba: rgb +Xft.hinting: true +Xft.hintstyle: hintfull +Xft.lcdfilter: lcddefault + + + +!!======================!! +!! RXVT-unicode setting !! +!!======================!! + +urxvt.depth: 32 +urxvt.internalBorder: 6 +urxvt.blurRadius: 25 +urxvt.saveLines: 10000 +urxvt.preeditType: Root + +urxvt.scrollBar: false +urxvt.jumpScroll: false +urxvt.scrollTtyOutput: false +urxvt.scrollWithBuffer: true +urxvt.scrollTtyKeypress: true + +urxvt.altSendsEscape: true +xterm.metaSendsEscape: true + +urxvt.termName: xterm-256color + +urxvt.font: xft:SauceCodePro Nerd Font:style=regular:size=9.8 +urxvt.imFont: xft:SauceCodePro Nerd Font:style=regular:size=9.8 +urxvt.boldFont: xft:SauceCodePro Nerd Font:style=bold:size=9.8 +urxvt.italicFont: xft:SauceCodePro Nerd Font:style=italic:size=9.8 +urxvt.boldItalicFont: xft:SauceCodePro Nerd Font:style=bold,italic:size=9.8 + + +urxvt.iso14755: false +urxvt.iso14755_52: false +urxvt.perl-ext-common: default,vtwheel,font-size +urxvt.url-launcher: /usr/bin/chromium +urxvt.matcher.button: 1 + +urxvt.keysym.C-Up: font-size:increase +urxvt.keysym.C-Down: font-size:decrease +urxvt.keysym.C-equal: font-size:reset +urxvt.keysym.C-slash: font-size:show + +! special +*.foreground: #ECEFF1 +*.background: #002B36 +*.cursorColor: #5294E2 +*.highlightColor: #5294E2 +urxvt.background: [95]#383C4A +urxvt.scrollColor: #767B87 +urxvt.dynamicColors: on +urxvt.highlightSelection: true +urxvt.colorMode: on diff --git a/.xsession b/.config/X11/xsession similarity index 100% rename from .xsession rename to .config/X11/xsession diff --git a/.config/vim/vimrc b/.config/vim/vimrc index 36294f6..00dda28 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -265,5 +265,8 @@ com! WQA wqa " Write with sudo cmap w!! w !sudo tee > /dev/null % +" Unmap ex-mode +map Q + autocmd FileType markdown setlocal ts=2 sts=2 sw=2 et autocmd FileType yaml setlocal ts=2 sts=2 sw=2 et diff --git a/.config/zsh/.gitignore b/.config/zsh/.gitignore new file mode 100644 index 0000000..3faf4dd --- /dev/null +++ b/.config/zsh/.gitignore @@ -0,0 +1,4 @@ +/antigen/ +/log/ +/histfile +/.zcompdump* diff --git a/.zshrc b/.config/zsh/.zshrc similarity index 97% rename from .zshrc rename to .config/zsh/.zshrc index 5d7ca21..db1b269 100644 --- a/.zshrc +++ b/.config/zsh/.zshrc @@ -54,6 +54,7 @@ antigen bundle zsh-users/zsh-completions antigen bundle zsh-users/zsh-autosuggestions antigen bundle Tarrasch/zsh-syntax-highlighting antigen bundle zsh-users/zsh-history-substring-search +antigen bundle mafredri/zsh-async antigen apply @@ -122,3 +123,4 @@ source "$DOTFILES/aliases" # Load some manual plugins source "$ZSH_DIR/plugins/sudo.zsh" source "$ZSH_DIR/plugins/fish-theme.zsh" +[ -f '/usr/share/fzf/key-bindings.zsh' ] && source /usr/share/fzf/key-bindings.zsh diff --git a/.profile b/.profile index eb05cd7..da3491c 100644 --- a/.profile +++ b/.profile @@ -2,30 +2,41 @@ export LC_ALL=en_GB.UTF-8 export LANG=en_GB.UTF-8 export LC_NUMERIC=en_GB -export CONFIG_DIR="$HOME/.config" -export XDG_CONFIG_HOME="$CONFIG_DIR" +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" +export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" +export XDG_LOCAL_HOME="$HOME/.local" +export XDG_CURRENT_DESKTOP="GNOME" # Fixes xdg-open + case "$(basename "$(readlink -f /proc/$$/exe)")" in zsh) thisfile="$(readlink -f "${(%):-%N}")";; bash) thisfile="$(readlink -f "${BASH_SOURCE[0]}")";; *) thisfile="$(find /proc/$$/fd/ | xargs readlink -f | grep .profile | head -n1)";; esac -export DOTFILES="$(dirname "${thisfile:-$CONFIG_DIR/dotfiles}")" +export DOTFILES="$(dirname "${thisfile:-$XDG_CONFIG_HOME/dotfiles}")" export PATH="${PATH}:$DOTFILES/scripts:$HOME/.local/share/surface-scripts" -export XDG_CURRENT_DESKTOP="GNOME" # Fixes xdg-open # Allow Vim to load from ~/.config/vim -export VIMDIR="$CONFIG_DIR/vim" +export VIMDIR="$XDG_CONFIG_HOME/vim" export MYVIMRC="$VIMDIR/vimrc" export VIMINIT=":so $MYVIMRC" - export EDITOR="vim" export VISUAL="vim" + +# Allow ZSH to load from ~/.config/zsh +export ZDOTDIR="$XDG_CONFIG_HOME/zsh" + +# Configure X11 config file paths +export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" +export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc" +export XSESSION="$XDG_CONFIG_HOME/X11/xsession" + export MANPAGER="less -+N" export TERMINAL="termite" export BROWSER="chromium" export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" export QT_QPA_PLATFORMTHEME=gtk2 -export GOPATH="$HOME/.cache/go" +export GOPATH="$XDG_LOCAL_HOME/go" exists() { which $@ 0<&- 1>/dev/null 2>/dev/null; } @@ -48,9 +59,9 @@ if exists tput; then fi # Source secret keys and values into environment -if [ -f "$CONFIG_DIR/secrets" ]; then +if [ -f "$XDG_CONFIG_HOME/secrets" ]; then set -o allexport - source $CONFIG_DIR/secrets + source $XDG_CONFIG_HOME/secrets set +o allexport fi diff --git a/aliases b/aliases index 8b73914..28a310e 100644 --- a/aliases +++ b/aliases @@ -97,8 +97,8 @@ alias -s git="git clone --recursive" # Git Aliases alias g=git alias gignore='$EDITOR .gitignore' -alias gitc='$EDITOR ~/.config/git/config' -alias ggignore='$EDITOR ~/.config/git/gitignore' +alias gitc='$EDITOR $XDG_CONFIG_HOME/git/config' +alias ggignore='$EDITOR $XDG_CONFIG_HOME/git/gitignore' alias gcl="git clone --recursive" alias gco="git checkout" alias gcom="git checkout master" @@ -254,18 +254,18 @@ alias zp=zpool # General Aliases alias ssha='eval `ssh-agent` ; ssh-add' alias aliases="$EDITOR $DOTFILES/aliases ; exec zsh" -alias vimrc="$EDITOR $MYVIMRC" -alias zshrc="$EDITOR ~/.zshrc ; exec zsh" -alias gitrc="$EDITOR ~/.config/git/config" -alias xinitrc="$EDITOR ~/.xinitrc" -alias xresources="$EDITOR ~/.Xresources ; xrdb merge ~/.Xresources" -alias xsession="$EDITOR ~/.xsession" +alias vimrc="$EDITOR $VIMRC" +alias zshrc="$EDITOR ${ZDOTDIR:-$HOME}/.zshrc ; exec zsh" +alias gitrc="$EDITOR $XDG_CONFIG_HOME/git/config" +alias xinitrc="$EDITOR $XDG_CONFIG_HOME/X11/xinitrc" +alias xresources="$EDITOR $XDG_CONFIG_HOME/X11/xresources ; xrdb merge $XDG_CONFIG_HOME/X11/Xresources" +alias xsession="$EDITOR $XDG_CONFIG_HOME/X11/xsession" alias sshc="$EDITOR ~/.ssh/config" alias dotfiles="cd $DOTFILES" -alias i3c="$EDITOR ~/.config/i3/config ; i3-msg restart" -alias i3bc="$EDITOR ~/.config/i3/blocks/config ; i3-msg restart" +alias i3c="$EDITOR $XDG_CONFIG_HOME/i3/config ; i3-msg restart" +alias i3bc="$EDITOR $XDG_CONFIG_HOME/i3/blocks/config ; i3-msg restart" i3b() { - $EDITOR ~/.config/i3/blocks/$@ + $EDITOR $XDG_CONFIG_HOME/i3/blocks/$@ } alias sf=screenfetch alias nf=neofetch