Move more files to XDG directories

This commit is contained in:
Observer of Time 2019-11-24 16:50:07 +02:00
parent 0d0d32e9cb
commit 42a6d15193
Signed by: chronobserver
GPG Key ID: 8A2DEA1DBAEBCA9E
15 changed files with 164 additions and 97 deletions

View File

@ -3,12 +3,6 @@
# Print date on login # Print date on login
printf '\e[1m\e[91m%(%A, %B %e, %Y)T \e[90m- \e[36m%(%Z %z)T\e[m\n\n' printf '\e[1m\e[91m%(%A, %B %e, %Y)T \e[90m- \e[36m%(%Z %z)T\e[m\n\n'
# Ctrl + Space to expand command
bind '\C-Space':magic-space
# Case insensitive completion
bind 'set completion-ignore-case on'
# Include hidden files in glob # Include hidden files in glob
shopt -s dotglob shopt -s dotglob
@ -40,6 +34,10 @@ export XDG_CACHE_HOME="$HOME/.cache"
# Set the paths used by python {{{ # Set the paths used by python {{{
export PYTHONPYCACHEPREFIX="$XDG_CACHE_HOME/__pycache__" export PYTHONPYCACHEPREFIX="$XDG_CACHE_HOME/__pycache__"
export PYTHONSTARTUP="$XDG_CONFIG_HOME/pythonrc.py"
export PYTHON_EGG_CACHE="$XDG_CACHE_HOME/python-eggs"
export IPYTHONDIR="$XDG_CONFIG_HOME/jupyter"
export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME/jupyter"
# }}} # }}}
# Set the paths used by go {{{ # Set the paths used by go {{{
@ -50,6 +48,10 @@ export GOPATH="$HOME/.local/go"
export GEM_HOME="$HOME/.local/ruby" export GEM_HOME="$HOME/.local/ruby"
export GEM_SPEC_CACHE="$GEM_HOME/specs" export GEM_SPEC_CACHE="$GEM_HOME/specs"
export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/2.6.0" export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/2.6.0"
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME/bundle"
export BUNDLE_USER_CACHE="$XDG_CACHE_HOME/bundle"
export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME/bundle"
export TRAVIS_CONFIG_PATH="$XDG_CONFIG_HOME/travis"
# }}} # }}}
# Set the paths used by perl5 {{{ # Set the paths used by perl5 {{{
@ -67,8 +69,33 @@ export NODE_REPL_HISTORY="$XDG_CACHE_HOME/.node_repl_history"
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc" export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
# }}} # }}}
# Set the paths used by the android sdk {{{ # Set the paths used by android {{{
export ANDROID_HOME="$HOME/.local/android" export ANDROID_SDK_HOME="$HOME/.local/android"
export ANDROID_SDK_ROOT="$ANDROID_SDK_HOME"
export ANDROID_EMULATOR_HOME="$ANDROID_SDK_HOME"
export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
# }}}
# Set the paths used by sqlite {{{
export SQLITE_HISTORY="$XDG_CACHE_HOME/.sqlite_history"
# }}}
# Set the paths used by gtk {{{
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtkrc-2.0"
# }}}
# Set the paths used by xorg {{{
export XCOMPOSEFILE="$XDG_CONFIG_HOME/X11/XCompose"
export XCOMPOSECACHE="$XDG_CACHE_HOME/X11/XCompose"
# }}}
# Set the paths used by ccache {{{
export CCACHE_CONFIGPATH="$XDG_CONFIG_HOME/ccache.cfg"
export CCACHE_DIR="$XDG_CACHE_HOME/ccache"
# }}}
# Set the paths used by gpg {{{
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
# }}} # }}}
# Set the search path for commands {{{ # Set the search path for commands {{{
@ -81,13 +108,8 @@ export PATH="$HOME/.local/bin:\
$HOME/.local/perl/bin:\ $HOME/.local/perl/bin:\
$GOPATH/bin:\ $GOPATH/bin:\
$GEM_HOME/bin:\ $GEM_HOME/bin:\
$ANDROID_HOME/tools:\ $ANDROID_SDK_HOME/tools:\
$ANDROID_HOME/platform-tools:" $ANDROID_SDK_HOME/platform-tools:"
# }}}
# Set the paths used by ccache {{{
export CCACHE_CONFIGPATH="$XDG_CONFIG_HOME/ccache.cfg"
export CCACHE_DIR="$XDG_CACHE_HOME/ccache"
# }}} # }}}
# Use a 256color terminal if one exists {{{ # Use a 256color terminal if one exists {{{
@ -97,7 +119,13 @@ for t in {konsole,xterm,gnome}-256color; do
done done
# }}} # }}}
# Source bashrc # Specify inputrc
test -f ~/.bashrc && source ~/.bashrc test -f "$XDG_CONFIG_HOME/inputrc" && export INPUTRC="$_"
# vim:set fdm=marker fdl=1: # Specify xinitrc
test -f "$XDG_CONFIG_HOME/X11/xinitrc" && export XINITRC="$_"
# Source bashrc
test -f "$XDG_DATA_HOME/bash/bashrc.sh" && . "$_"
# vim:fdm=marker:fdl=1:

48
.config/inputrc Normal file
View File

@ -0,0 +1,48 @@
# Bindings {{{
# Expand history with Ctrl + Space
Control-Space: magic-space
# Complete items with Insert
"\e[2~": menu-complete
# }}}
# Settings {{{
# Disable the bell
set bell-style none
# Enable file colors
set colored-stats on
# Enable case-insensitive completion
set completion-ignore-case on
# Don't ask to show all completions
set completion-query-items -1
# Set the maximum number of history entries
set history-size 500
# Disable completion pages
set page-completions off
# Print completions horizontally
set print-completions-horizontally on
# Show ambiguous completions immediately
set show-all-if-ambiguous on
# Show full completions immediately
set show-all-if-unmodified on
# Skip completed text after the cursor
set skip-completed-text on
# Show file type characters
set visible-stats on
# }}}
# vim:fdm=marker:fdl=1:

View File

@ -1,29 +0,0 @@
[Desktop Entry]
DefaultProfile=Default.profile
[DownloadDialog Settings]
Height 768=510
Width 1366=700
[Favorite Profiles]
Favorites=Default.profile,NvimTerm.profile
[FileDialogSize]
Height 768=619
Width 1366=1004
[MainWindow]
Height 1080=619
Height 720=370
Height 768=590
State=AAAA/wAAAAD9AAAAAAAABVYAAALHAAAABAAAAAQAAAAIAAAACPwAAAAA
ToolBarsMovable=Disabled
Width 1024=648
Width 1280=640
Width 1366=1004
Width 1920=1004
Window-Maximized 768x1024=true
Window-Maximized 768x1366=true
[TabBar]
TabBarVisibility=ShowTabBarWhenNeeded

View File

@ -114,7 +114,7 @@ sub-auto=all
sub-file-paths=Subs sub-file-paths=Subs
# Specify the position of subtitles on the screen. # Specify the position of subtitles on the screen.
sub-pos=95 sub-pos=97
# }}} # }}}

16
.config/pythonrc.py Normal file
View File

@ -0,0 +1,16 @@
import atexit
import os
import readline
import sys
histfile = os.path.join(os.getenv(
'XDG_CACHE_HOME', os.path.expanduser('~/.config')
), '.python_history')
try:
readline.read_history_file(histfile)
readline.set_history_length(1000)
except FileNotFoundError:
pass
atexit.register(readline.write_history_file, histfile)

View File

@ -10,9 +10,9 @@ c.content.headers.accept_language = 'en_GB,en'
c.content.headers.user_agent = ' '.join(( c.content.headers.user_agent = ' '.join((
'Mozilla/5.0', 'Mozilla/5.0',
'(X11; Linux x86_64)', '(X11; Linux x86_64)',
'QtWebEngine/5.13.1', 'QtWebEngine/5.13.2',
'Chromium/73.0.3683.105', 'Chromium/73.0.3683.105',
'qutebrowser/1.8.1' 'qutebrowser/1.8.2'
)) ))
# Allow JavaScript to read from or write to the clipboard. # Allow JavaScript to read from or write to the clipboard.
@ -48,20 +48,10 @@ c.fonts.monospace = ','.join((
c.qt.process_model = 'process-per-site' c.qt.process_model = 'process-per-site'
# Languages to use for spell checking. # Languages to use for spell checking.
c.spellcheck.languages = [ c.spellcheck.languages = ['en-GB', 'en-US', 'el-GR']
'en-GB',
'en-US',
'el-GR'
]
# List of widgets displayed in the statusbar. # List of widgets displayed in the statusbar.
c.statusbar.widgets = [ c.statusbar.widgets = ['keypress', 'url', 'history', 'tabs', 'progress']
'keypress',
'url',
'history',
'tabs',
'progress'
]
# Page(s) to open at the start. # Page(s) to open at the start.
c.url.start_pages = [ # {{{1 c.url.start_pages = [ # {{{1

View File

@ -3,15 +3,15 @@
"private": true, "private": true,
"dependencies": { "dependencies": {
"american-british-english-translator": "^0.1.2", "american-british-english-translator": "^0.1.2",
"eslint": "^6.6.0", "eslint": "^6.7.0",
"grunt-cli": "^1.3.2", "grunt-cli": "^1.3.2",
"gulp-cli": "^2.2.0", "gulp-cli": "^2.2.0",
"htmlhint": "^0.11.0", "htmlhint": "^0.11.0",
"neovim": "^4.5.0", "neovim": "^4.5.0",
"pug-cli": "^1.0.0-alpha6", "pug-cli": "^1.0.0-alpha6",
"pug-lint": "^2.5.0", "pug-lint": "^2.5.0",
"stylelint": "^11.1.1", "stylelint": "^12.0.0",
"stylelint-scss": "^3.12.1", "stylelint-scss": "^3.13.0",
"svgo": "^1.3.0" "svgo": "^1.3.0"
} }
} }

14
.gitattributes vendored
View File

@ -14,7 +14,6 @@
.config/aria2/aria2.conf linguist-language=INI .config/aria2/aria2.conf linguist-language=INI
.config/ccache.cfg linguist-language=INI .config/ccache.cfg linguist-language=INI
.config/htop/htoprc linguist-language=INI .config/htop/htoprc linguist-language=INI
.config/konsolerc linguist-language=INI
.config/mpv/input.conf linguist-language=INI .config/mpv/input.conf linguist-language=INI
.config/mpv/mpv.conf linguist-language=INI .config/mpv/mpv.conf linguist-language=INI
.config/newsboat/config linguist-language=INI .config/newsboat/config linguist-language=INI
@ -22,20 +21,23 @@
.config/plasma-localerc linguist-language=INI .config/plasma-localerc linguist-language=INI
.config/pycodestyle linguist-language=INI .config/pycodestyle linguist-language=INI
.config/youtube-dl/config linguist-language=INI .config/youtube-dl/config linguist-language=INI
.gnupg/gpg.conf linguist-language=INI .local/share/gnupg/gpg.conf linguist-language=INI
.local/share/konsole/Default.profile linguist-language=INI .local/share/konsole/Default.profile linguist-language=INI
.local/share/konsole/Gruvbox8.colorscheme linguist-language=INI .local/share/konsole/Gruvbox8.colorscheme linguist-language=INI
.local/share/konsole/NvimTerm.profile linguist-language=INI .local/share/konsole/NvimTerm.profile linguist-language=INI
.config/pythonrc.py linguist-language=Python
.config/qutebrowser/config.py linguist-language=Python .config/qutebrowser/config.py linguist-language=Python
.bash_aliases linguist-language=Shell .config/inputrc linguist-language=Readline-Config
.bash_funcs linguist-language=Shell
.bash_profile linguist-language=Shell .bash_profile linguist-language=Shell
.bashrc linguist-language=Shell
.config/aria2/notif.sh linguist-language=Shell .config/aria2/notif.sh linguist-language=Shell
.config/newsboat/notif.sh linguist-language=Shell .config/newsboat/notif.sh linguist-language=Shell
.local/arch/init.sh linguist-language=Shell .local/arch/init.sh linguist-language=Shell
.local/share/bash/aliases.sh linguist-language=Shell
.local/share/bash/bashrc.sh linguist-language=Shell
.local/share/bash/functions.sh linguist-language=Shell
.local/arch/packages.aur.txt linguist-language=Text .local/arch/packages.aur.txt linguist-language=Text
.local/arch/packages.repo.txt linguist-language=Text .local/arch/packages.repo.txt linguist-language=Text
@ -53,7 +55,7 @@
# .yarnrc linguist-language=YAML # .yarnrc linguist-language=YAML
# skews the stats due to its size # skews the stats due to its size
.XCompose linguist-language=XCompose linguist-detectable=false .config/X11/XCompose linguist-language=XCompose linguist-detectable=false
# these aren't part of the dotfiles # these aren't part of the dotfiles
.gitattributes linguist-detectable=false .gitattributes linguist-detectable=false

View File

@ -98,6 +98,7 @@ declare -A ALIASES=(
[goapp]=go [goapp]=go
[godoc]=go [godoc]=go
[gradlew]=gradle [gradlew]=gradle
[bundler]=bundle
) )
mkdir -p "$DIRECTORY" mkdir -p "$DIRECTORY"
raw() (printf 'https://raw.githubusercontent.com/%s' "$1/$2/master/$3") raw() (printf 'https://raw.githubusercontent.com/%s' "$1/$2/master/$3")
@ -110,9 +111,18 @@ $(raw omakoto go-completion.bash go-completion.bash)
out=go out=go
$(raw llvm-mirror clang utils/bash-autocomplete.sh) $(raw llvm-mirror clang utils/bash-autocomplete.sh)
out=clang out=clang
$(raw mernen completion-ruby completion-ruby)
out=ruby
$(raw mernen completion-ruby completion-gem)
out=gem
$(raw mernen completion-ruby completion-bundle)
out=bundle
$(raw mernen completion-ruby completion-rake)
out=rake
EOF EOF
printf 'complete -o default -F _ffmpeg ffprobe\n' >> "$DIRECTORY/ffmpeg" printf 'complete -o default -F _ffmpeg ffprobe\n' >> "$DIRECTORY/ffmpeg"
printf 'complete -o default -F _clang clang++\n' >> "$DIRECTORY/clang" printf 'complete -o default -F _clang clang++\n' >> "$DIRECTORY/clang"
printf 'complete -o default -F __bundle bundler\n' >> "$DIRECTORY/bundle"
for key in "${!ALIASES[@]}"; do for key in "${!ALIASES[@]}"; do
ln -fvs "$DIRECTORY/${ALIASES[$key]}" "$DIRECTORY/$key" ln -fvs "$DIRECTORY/${ALIASES[$key]}" "$DIRECTORY/$key"
done done
@ -120,6 +130,8 @@ grunt --completion=bash > "$DIRECTORY/grunt"
gulp --completion=bash > "$DIRECTORY/gulp" gulp --completion=bash > "$DIRECTORY/gulp"
pandoc --bash-completion > "$DIRECTORY/pandoc" pandoc --bash-completion > "$DIRECTORY/pandoc"
poetry completions bash > "$DIRECTORY/poetry" poetry completions bash > "$DIRECTORY/poetry"
ln -fvs "$(gem contents travis | grep 'travis.sh$')" "$DIRECTORY/travis"
ln -fvs /usr/share/fzf/completion.bash "$DIRECTORY/fzf"
unset -f DIRECTORY ALIASES raw unset -f DIRECTORY ALIASES raw
# }}} # }}}
@ -167,12 +179,17 @@ sudo grub-mkconfig -o /boot/grub/grub.cfg
unset -f URL THEME SWAP clone unset -f URL THEME SWAP clone
# }}} # }}}
# Make maven use XDG_CACHE_HOME {{{
sudo sed -i /opt/maven/conf/settings.xml \
-e "\%xsi:schema%a \\
<localRepository>\\
\${env.XDG_CACHE_HOME}/maven/repository\\
</localRepository>"
# }}}
# Setup neovim {{{ # Setup neovim {{{
nvim --headless +q >/dev/null nvim --headless +q >/dev/null
nvim --headless +PlugInstall +qa >/dev/null nvim --headless +PlugInstall +qa >/dev/null
sudo update-alternatives --set editor /usr/bin/nvim
sudo tee --append /etc/sudoers <<< \
'Defaults env_keep += "EDITOR"' >/dev/null
# }}} # }}}
# Setup mozilla profiles {{{ # Setup mozilla profiles {{{

View File

@ -58,9 +58,6 @@ alert() { # Use like so: sleep 10; alert
# }}} # }}}
# Functions kept separately # Functions kept separately
test -f ~/.bash_funcs && . "$_" test -f "$XDG_DATA_HOME/bash/functions.sh" && . "$_"
# Secret ssh aliases # vim:fdm=marker:fdl=1:
test -f ~/.ssh/aliases && . "$_"
# vim:set fdm=marker fdl=1:

View File

@ -1,9 +1,6 @@
# If not running interactively, don't do anything # If not running interactively, don't do anything
[[ $- =~ i ]] || return [[ $- =~ i ]] || return
# Make less more friendly for non-text input files
[ -x /usr/bin/lesspipe.sh ] && eval "$(SHELL=/bin/sh lesspipe.sh)"
# Define where cd looks for targets # Define where cd looks for targets
[ -d ~/Documents/Code/GitHub ] && CDPATH='.:~/Documents/Code/GitHub' [ -d ~/Documents/Code/GitHub ] && CDPATH='.:~/Documents/Code/GitHub'
@ -34,17 +31,11 @@ FIGNORE='~:.o:.swp:.pyc'
COMP_CONFIGURE_HINTS=1 COMP_CONFIGURE_HINTS=1
# Alias definitions # Alias definitions
test -f ~/.bash_aliases && . "$_" test -f "$XDG_DATA_HOME/bash/aliases.sh" && . "$_"
# Travis completion
test -f ~/.travis/travis.sh && . "$_"
# FZF completion
test -f /usr/share/fzf/completion.bash && . "$_"
# Uni configuration # Uni configuration
test -f ~/.unirc.sh && . "$_" test -f ~/.unirc.sh && . "$_"
: # ensure 0 exit code : # ensure 0 exit code
# vim:set wrap lbr bri briopt=shift\:4: # vim:wrap:lbr:bri:briopt=shift\:4:

View File

@ -157,4 +157,4 @@ pwned() { # Checks if a password has been compromised
done done
} }
# vim:set ft=sh fdm=syntax fdl=0: # vim:fdm=syntax:fdl=0:

View File

@ -17,10 +17,10 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
## [Bash](https://www.gnu.org/software/bash/) ## [Bash](https://www.gnu.org/software/bash/)
* [.bash_aliases](.bash_aliases): contains various aliases
* [.bash_funcs](.bash_funcs): contains various functions
* [.bash_profile](.bash_profile): login shell configuration file * [.bash_profile](.bash_profile): login shell configuration file
* [.bashrc](.bashrc): interactive shell configuration file * [.local/share/bash/aliases.sh](.local/share/bash/aliases.sh): contains various aliases
* [.local/share/bash/bashrc.sh](.local/share/bash/bashrc.sh): interactive shell configuration file
* [.local/share/bash/functions.sh](.local/share/bash/functions.sh): contains various functions
## [Ccache](https://github.com/ccache/ccache) ## [Ccache](https://github.com/ccache/ccache)
@ -57,7 +57,7 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
## [GnuPG](https://gnupg.org/) ## [GnuPG](https://gnupg.org/)
* [.gnupg/gpg.conf](.gnupg/gpg.conf): configuration file * [.local/share/gnupgp/gpg.conf](.local/share/gnupg/gpg.conf): configuration file
## [KDE Plasma](https://kde.org/plasma-desktop) ## [KDE Plasma](https://kde.org/plasma-desktop)
@ -65,7 +65,6 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
## [Konsole](https://konsole.kde.org/) ## [Konsole](https://konsole.kde.org/)
* [.config/konsolerc](.config/konsolerc): configuration file
* [.local/share/konsole/Default.profile](.local/share/konsole/Default.profile): default profile * [.local/share/konsole/Default.profile](.local/share/konsole/Default.profile): default profile
* [.local/share/konsole/NvimTerm.profile](.local/share/konsole/NvimTerm.profile): `nvim +term` profile * [.local/share/konsole/NvimTerm.profile](.local/share/konsole/NvimTerm.profile): `nvim +term` profile
* [.local/share/konsole/Gruvbox8.colorscheme](.local/share/konsole/Gruvbox8.colorscheme): `Gruvbox8` colorscheme * [.local/share/konsole/Gruvbox8.colorscheme](.local/share/konsole/Gruvbox8.colorscheme): `Gruvbox8` colorscheme
@ -96,6 +95,10 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
* [.config/pycodestyle](.config/pycodestyle): configuration file * [.config/pycodestyle](.config/pycodestyle): configuration file
## [Python](https://www.python.org/)
* [.config/pythonrc.py](.config/pythonrc.py): startup file
## [Qutebrowser](https://www.qutebrowser.org/) ## [Qutebrowser](https://www.qutebrowser.org/)
* [.config/qutebrowser/config.py](.config/qutebrowser/config.py): configuration file * [.config/qutebrowser/config.py](.config/qutebrowser/config.py): configuration file
@ -104,6 +107,10 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
* [.pug-lintrc.json](.pug-lintrc.json): configuration file * [.pug-lintrc.json](.pug-lintrc.json): configuration file
## [Readline](https://tiswww.case.edu/php/chet/readline/rltop.html)
* [.config/inputrc](.config/inputrc): configuration file
## [Stylelint](https://stylelint.io/) ## [Stylelint](https://stylelint.io/)
* [.stylelintrc.json](.stylelintrc.json): configuration file * [.stylelintrc.json](.stylelintrc.json): configuration file
@ -114,7 +121,7 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
## [X.Org](https://www.x.org/wiki/) ## [X.Org](https://www.x.org/wiki/)
* [.XCompose](.XCompose): X client character mappings * [.config/X11/XCompose](.config/X11/XCompose): X client character mappings
## [Yarn](https://yarnpkg.com/lang/en/) ## [Yarn](https://yarnpkg.com/lang/en/)