Browse Source

Move more files to XDG directories

master
Observer of Time 1 year ago
parent
commit
42a6d15193
Signed by: chronobserver GPG Key ID: 8A2DEA1DBAEBCA9E
15 changed files with 163 additions and 96 deletions
  1. +45
    -17
      .bash_profile
  2. +0
    -0
      .config/X11/XCompose
  3. +48
    -0
      .config/inputrc
  4. +0
    -29
      .config/konsolerc
  5. +1
    -1
      .config/mpv/mpv.conf
  6. +16
    -0
      .config/pythonrc.py
  7. +4
    -14
      .config/qutebrowser/config.py
  8. +3
    -3
      .config/yarn/global/package.json
  9. +8
    -6
      .gitattributes
  10. +20
    -3
      .local/arch/init.sh
  11. +2
    -5
      .local/share/bash/aliases.sh
  12. +2
    -11
      .local/share/bash/bashrc.sh
  13. +1
    -1
      .local/share/bash/functions.sh
  14. +0
    -0
      .local/share/gnupg/gpg.conf
  15. +13
    -6
      README.md

+ 45
- 17
.bash_profile View File

@ -3,12 +3,6 @@
# 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'
# Ctrl + Space to expand command
bind '\C-Space':magic-space
# Case insensitive completion
bind 'set completion-ignore-case on'
# Include hidden files in glob
shopt -s dotglob
@ -40,6 +34,10 @@ export XDG_CACHE_HOME="$HOME/.cache"
# Set the paths used by python {{{
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 {{{
@ -50,6 +48,10 @@ export GOPATH="$HOME/.local/go"
export GEM_HOME="$HOME/.local/ruby"
export GEM_SPEC_CACHE="$GEM_HOME/specs"
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 {{{
@ -67,8 +69,33 @@ export NODE_REPL_HISTORY="$XDG_CACHE_HOME/.node_repl_history"
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
# }}}
# Set the paths used by the android sdk {{{
export ANDROID_HOME="$HOME/.local/android"
# Set the paths used by 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 {{{
@ -81,13 +108,8 @@ export PATH="$HOME/.local/bin:\
$HOME/.local/perl/bin:\
$GOPATH/bin:\
$GEM_HOME/bin:\
$ANDROID_HOME/tools:\
$ANDROID_HOME/platform-tools:"
# }}}
# Set the paths used by ccache {{{
export CCACHE_CONFIGPATH="$XDG_CONFIG_HOME/ccache.cfg"
export CCACHE_DIR="$XDG_CACHE_HOME/ccache"
$ANDROID_SDK_HOME/tools:\
$ANDROID_SDK_HOME/platform-tools:"
# }}}
# Use a 256color terminal if one exists {{{
@ -97,7 +119,13 @@ for t in {konsole,xterm,gnome}-256color; do
done
# }}}
# Specify inputrc
test -f "$XDG_CONFIG_HOME/inputrc" && export INPUTRC="$_"
# Specify xinitrc
test -f "$XDG_CONFIG_HOME/X11/xinitrc" && export XINITRC="$_"
# Source bashrc
test -f ~/.bashrc && source ~/.bashrc
test -f "$XDG_DATA_HOME/bash/bashrc.sh" && . "$_"
# vim:set fdm=marker fdl=1:
# vim:fdm=marker:fdl=1:

.XCompose → .config/X11/XCompose View File


+ 48
- 0
.config/inputrc 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:

+ 0
- 29
.config/konsolerc 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

+ 1
- 1
.config/mpv/mpv.conf View File

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


+ 16
- 0
.config/pythonrc.py 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)

+ 4
- 14
.config/qutebrowser/config.py View File

@ -10,9 +10,9 @@ c.content.headers.accept_language = 'en_GB,en'
c.content.headers.user_agent = ' '.join((
'Mozilla/5.0',
'(X11; Linux x86_64)',
'QtWebEngine/5.13.1',
'QtWebEngine/5.13.2',
'Chromium/73.0.3683.105',
'qutebrowser/1.8.1'
'qutebrowser/1.8.2'
))
# 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'
# Languages to use for spell checking.
c.spellcheck.languages = [
'en-GB',
'en-US',
'el-GR'
]
c.spellcheck.languages = ['en-GB', 'en-US', 'el-GR']
# List of widgets displayed in the statusbar.
c.statusbar.widgets = [
'keypress',
'url',
'history',
'tabs',
'progress'
]
c.statusbar.widgets = ['keypress', 'url', 'history', 'tabs', 'progress']
# Page(s) to open at the start.
c.url.start_pages = [ # {{{1


+ 3
- 3
.config/yarn/global/package.json View File

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

+ 8
- 6
.gitattributes View File

@ -14,7 +14,6 @@
.config/aria2/aria2.conf linguist-language=INI
.config/ccache.cfg linguist-language=INI
.config/htop/htoprc linguist-language=INI
.config/konsolerc linguist-language=INI
.config/mpv/input.conf linguist-language=INI
.config/mpv/mpv.conf linguist-language=INI
.config/newsboat/config linguist-language=INI
@ -22,20 +21,23 @@
.config/plasma-localerc linguist-language=INI
.config/pycodestyle 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/Gruvbox8.colorscheme linguist-language=INI
.local/share/konsole/NvimTerm.profile linguist-language=INI
.config/pythonrc.py linguist-language=Python
.config/qutebrowser/config.py linguist-language=Python
.bash_aliases linguist-language=Shell
.bash_funcs linguist-language=Shell
.config/inputrc linguist-language=Readline-Config
.bash_profile linguist-language=Shell
.bashrc linguist-language=Shell
.config/aria2/notif.sh linguist-language=Shell
.config/newsboat/notif.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.repo.txt linguist-language=Text
@ -53,7 +55,7 @@
# .yarnrc linguist-language=YAML
# 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
.gitattributes linguist-detectable=false


+ 20
- 3
.local/arch/init.sh View File

@ -98,6 +98,7 @@ declare -A ALIASES=(
[goapp]=go
[godoc]=go
[gradlew]=gradle
[bundler]=bundle
)
mkdir -p "$DIRECTORY"
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
$(raw llvm-mirror clang utils/bash-autocomplete.sh)
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
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 __bundle bundler\n' >> "$DIRECTORY/bundle"
for key in "${!ALIASES[@]}"; do
ln -fvs "$DIRECTORY/${ALIASES[$key]}" "$DIRECTORY/$key"
done
@ -120,6 +130,8 @@ grunt --completion=bash > "$DIRECTORY/grunt"
gulp --completion=bash > "$DIRECTORY/gulp"
pandoc --bash-completion > "$DIRECTORY/pandoc"
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
# }}}
@ -167,12 +179,17 @@ sudo grub-mkconfig -o /boot/grub/grub.cfg
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 {{{
nvim --headless +q >/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 {{{


.bash_aliases → .local/share/bash/aliases.sh View File


.bashrc → .local/share/bash/bashrc.sh View File


.bash_funcs → .local/share/bash/functions.sh View File


.gnupg/gpg.conf → .local/share/gnupg/gpg.conf View File


+ 13
- 6
README.md 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_aliases](.bash_aliases): contains various aliases
* [.bash_funcs](.bash_funcs): contains various functions
* [.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)
@ -57,7 +57,7 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
## [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)
@ -65,7 +65,6 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
## [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/NvimTerm.profile](.local/share/konsole/NvimTerm.profile): `nvim +term` profile
* [.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
## [Python](https://www.python.org/)
* [.config/pythonrc.py](.config/pythonrc.py): startup file
## [Qutebrowser](https://www.qutebrowser.org/)
* [.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
## [Readline](https://tiswww.case.edu/php/chet/readline/rltop.html)
* [.config/inputrc](.config/inputrc): configuration file
## [Stylelint](https://stylelint.io/)
* [.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/)
* [.XCompose](.XCompose): X client character mappings
* [.config/X11/XCompose](.config/X11/XCompose): X client character mappings
## [Yarn](https://yarnpkg.com/lang/en/)


Loading…
Cancel
Save