1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

X11/xdg: migrate to XDG_CONFIG_DIR

This commit is contained in:
Joe Groocock 2018-04-11 17:42:42 +01:00
parent 1bc7dd7845
commit 8edd378b66
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86
6 changed files with 118 additions and 118 deletions

View File

@ -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: 96
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
urxvt*imFont: xft:Sauce Code Pro:style=Regular:size=9
urxvt*boldFont: xft:Sauce Code Pro:style=Bold:size=9
urxvt*italicFont: xft:Sauce Code Pro:style=Italic:size=9
urxvt*boldItalicFont: xft:Sauce Code Pro:style=Bold,Italic:size=9
! 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

View File

@ -12,7 +12,7 @@ if [ -d "$xinitdir" ]; then
fi fi
source ~/.profile source ~/.profile
source ~/.xsession source $XDG_CONFIG_HOME/X11/xsession
xrdb -merge ~/.Xresources xrdb -merge $XDG_CONFIG_HOME/X11/xresources
exec i3 exec i3

89
.config/X11/xresources Normal file
View File

@ -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: 96
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
urxvt.imFont: xft:SauceCodePro Nerd Font:style=regular:size=9
urxvt.boldFont: xft:SauceCodePro Nerd Font:style=bold:size=9
urxvt.italicFont: xft:SauceCodePro Nerd Font:style=italic:size=9
urxvt.boldItalicFont: xft:SauceCodePro Nerd Font:style=bold,italic:size=9
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

View File

@ -2,34 +2,41 @@ export LC_ALL=en_GB.UTF-8
export LANG=en_GB.UTF-8 export LANG=en_GB.UTF-8
export LC_NUMERIC=en_GB export LC_NUMERIC=en_GB
export CONFIG_DIR="$HOME/.config" export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_CONFIG_HOME="$CONFIG_DIR" 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 case "$(basename "$(readlink -f /proc/$$/exe)")" in
zsh) thisfile="$(readlink -f "${(%):-%N}")";; zsh) thisfile="$(readlink -f "${(%):-%N}")";;
bash) thisfile="$(readlink -f "${BASH_SOURCE[0]}")";; bash) thisfile="$(readlink -f "${BASH_SOURCE[0]}")";;
*) thisfile="$(find /proc/$$/fd/ | xargs readlink -f | grep .profile | head -n1)";; *) thisfile="$(find /proc/$$/fd/ | xargs readlink -f | grep .profile | head -n1)";;
esac esac
export DOTFILES="$(dirname "${thisfile:-$CONFIG_DIR/dotfiles}")" export DOTFILES="$(dirname "${thisfile:-$XDG_CONFIG_HOME/dotfiles}")"
export PATH="${PATH}:$DOTFILES/scripts" export PATH="${PATH}:$DOTFILES/scripts"
export XDG_CURRENT_DESKTOP="GNOME" # Fixes xdg-open
# Allow Vim to load from ~/.config/vim # Allow Vim to load from ~/.config/vim
export VIMDIR="$CONFIG_DIR/vim" export VIMDIR="$XDG_CONFIG_HOME/vim"
export MYVIMRC="$VIMDIR/vimrc" export MYVIMRC="$VIMDIR/vimrc"
export VIMINIT=":so $MYVIMRC" export VIMINIT=":so $MYVIMRC"
export EDITOR="vim" export EDITOR="vim"
export VISUAL="vim" export VISUAL="vim"
# Allow ZSH to load from ~/.config/zsh # Allow ZSH to load from ~/.config/zsh
export ZDOTDIR="$XDG_CONFIG_HOME/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 MANPAGER="less -+N"
export TERMINAL="termite" export TERMINAL="termite"
export BROWSER="chromium" export BROWSER="chromium"
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
export QT_QPA_PLATFORMTHEME=gtk2 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; } exists() { which $@ 0<&- 1>/dev/null 2>/dev/null; }
@ -52,9 +59,9 @@ if exists tput; then
fi fi
# Source secret keys and values into environment # Source secret keys and values into environment
if [ -f "$CONFIG_DIR/secrets" ]; then if [ -f "$XDG_CONFIG_HOME/secrets" ]; then
set -o allexport set -o allexport
source $CONFIG_DIR/secrets source $XDG_CONFIG_HOME/secrets
set +o allexport set +o allexport
fi fi

22
aliases
View File

@ -97,8 +97,8 @@ alias -s git="git clone --recursive"
# Git Aliases # Git Aliases
alias g=git alias g=git
alias gignore='$EDITOR .gitignore' alias gignore='$EDITOR .gitignore'
alias gitc='$EDITOR ~/.config/git/config' alias gitc='$EDITOR $XDG_CONFIG_HOME/git/config'
alias ggignore='$EDITOR ~/.config/git/gitignore' alias ggignore='$EDITOR $XDG_CONFIG_HOME/git/gitignore'
alias gcl="git clone --recursive" alias gcl="git clone --recursive"
alias gco="git checkout" alias gco="git checkout"
alias gcom="git checkout master" alias gcom="git checkout master"
@ -254,18 +254,18 @@ alias zp=zpool
# General Aliases # General Aliases
alias ssha='eval `ssh-agent` ; ssh-add' alias ssha='eval `ssh-agent` ; ssh-add'
alias aliases="$EDITOR $DOTFILES/aliases ; exec zsh" alias aliases="$EDITOR $DOTFILES/aliases ; exec zsh"
alias vimrc="$EDITOR $MYVIMRC" alias vimrc="$EDITOR $VIMRC"
alias zshrc="$EDITOR ~/.zshrc ; exec zsh" alias zshrc="$EDITOR ${ZDOTDIR:-$HOME}/.zshrc ; exec zsh"
alias gitrc="$EDITOR ~/.config/git/config" alias gitrc="$EDITOR $XDG_CONFIG_HOME/git/config"
alias xinitrc="$EDITOR ~/.xinitrc" alias xinitrc="$EDITOR $XDG_CONFIG_HOME/X11/xinitrc"
alias xresources="$EDITOR ~/.Xresources ; xrdb merge ~/.Xresources" alias xresources="$EDITOR $XDG_CONFIG_HOME/X11/xresources ; xrdb merge $XDG_CONFIG_HOME/X11/Xresources"
alias xsession="$EDITOR ~/.xsession" alias xsession="$EDITOR $XDG_CONFIG_HOME/X11/xsession"
alias sshc="$EDITOR ~/.ssh/config" alias sshc="$EDITOR ~/.ssh/config"
alias dotfiles="cd $DOTFILES" alias dotfiles="cd $DOTFILES"
alias i3c="$EDITOR ~/.config/i3/config ; i3-msg restart" alias i3c="$EDITOR $XDG_CONFIG_HOME/i3/config ; i3-msg restart"
alias i3bc="$EDITOR ~/.config/i3/blocks/config ; i3-msg restart" alias i3bc="$EDITOR $XDG_CONFIG_HOME/i3/blocks/config ; i3-msg restart"
i3b() { i3b() {
$EDITOR ~/.config/i3/blocks/$@ $EDITOR $XDG_CONFIG_HOME/i3/blocks/$@
} }
alias sf=screenfetch alias sf=screenfetch
alias nf=neofetch alias nf=neofetch