From 3e460d7b1b1616e226bdcbf7ab53b0bc4f469517 Mon Sep 17 00:00:00 2001 From: Jannik ZANDER Date: Sat, 22 Sep 2018 08:50:07 +0200 Subject: [PATCH] Update bashrc for debian --- .bash_aliases | 19 ++----------------- .bash_completion | 2 +- .bashrc | 11 ++++------- .config/mimeapps.list | 2 ++ .config/user-dirs.dirs | 11 +++++------ .profile | 6 +----- 6 files changed, 15 insertions(+), 36 deletions(-) diff --git a/.bash_aliases b/.bash_aliases index 22a583c..2fd48cd 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -44,18 +44,15 @@ alias update='sudo apt-get update && sudo apt-get upgrade' alias c='clear' alias h='history' alias 'h?'="history | grep -i" -alias e='ranger-cd' -alias o='rifle' alias vi='vim' alias top='atop' alias open='xdg-open &>/dev/null' alias info='info --vi-keys' alias ag='ag --path-to-ignore=$HOME/.ignore --skip-vcs-ignores' alias rg='rg --path-separator="//"' -alias githome='git --git-dir=$HOME/.githome --work-tree=$HOME' -alias dit='githome' +alias dotfiles='git --git-dir=$HOME/.dotfiles --work-tree=$HOME' +alias dit='dotfiles' alias sudo='sudo ' -alias vlc='vlc *.avi' alias wget='wget -c' # Reboot my home Linksys WAG160N / WAG54 / WAG320 / WAG120N Router / Gateway from *nix. @@ -74,15 +71,3 @@ alias mkdate='mkdir "$(date +'%Y%m%d')"' # Stopwatch alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' - -# Automatically change the directory in bash after closing ranger -function ranger-cd -{ - tempfile="$(mktemp -t tmp.XXXXXX)" - ranger --choosedir="$tempfile" "${@:-$(pwd)}" - test -f "$tempfile" && - if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then - cd -- "$(cat "$tempfile")" - fi - rm -f -- "$tempfile" -} diff --git a/.bash_completion b/.bash_completion index 3db4680..f1906fc 100644 --- a/.bash_completion +++ b/.bash_completion @@ -1,7 +1,7 @@ # Add tab completion for `githome` by marking it as an alias for `git` _completion_loader git 2> /dev/null if type _git &>/dev/null; then - complete -o "default" -o "nospace" -F _git githome; + complete -o "default" -o "nospace" -F _git dotfiles; complete -o "default" -o "nospace" -F _git dit; fi; diff --git a/.bashrc b/.bashrc index 5f0fe02..45ba5ab 100644 --- a/.bashrc +++ b/.bashrc @@ -6,8 +6,8 @@ cd ~ # options -#set -x # debug set -o vi + shopt -s autocd shopt -s cdspell shopt -s checkwinsize @@ -54,10 +54,7 @@ HISTSIZE= HISTFILE=~/.bash_history.local # completion, aliases, and local settings -[ -f ~/.bash_aliases ] && . ~/.bash_aliases; -[ -f ~/.bash_completion ] && . ~/.bash_completion; +[ -f /etc/bash_completion ] && . /etc/bash_completion +[ -f ~/.bash_completion ] && . ~/.bash_completion +[ -f ~/.bash_aliases ] && . ~/.bash_aliases [ -f ~/.bashrc.local ] && . ~/.bashrc.local - -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion diff --git a/.config/mimeapps.list b/.config/mimeapps.list index b0f58bf..f69ba21 100644 --- a/.config/mimeapps.list +++ b/.config/mimeapps.list @@ -126,6 +126,7 @@ application/x-extension-shtml=firefox.desktop application/xhtml+xml=firefox.desktop application/x-extension-xhtml=firefox.desktop application/x-extension-xht=firefox.desktop +x-scheme-handler/mailto=gnome-gmail.desktop [Added Associations] video/ogg=vlc.desktop; @@ -246,3 +247,4 @@ text/html=firefox.desktop; x-scheme-handler/sms=org.gnome.Shell.Extensions.GSConnect.desktop; inode/directory=meld.desktop; application/javascript=gvim.desktop; +x-scheme-handler/mailto=gnome-gmail.desktop; diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs index a83a878..7f9a959 100644 --- a/.config/user-dirs.dirs +++ b/.config/user-dirs.dirs @@ -5,12 +5,11 @@ # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an # absolute path. No other format is supported. # -XDG_DESKTOP_DIR="$HOME/cloud/Desktop" -XDG_TEMPLATES_DIR="$HOME/cloud/Templates" -XDG_PUBLICSHARE_DIR="$HOME/cloud/Public" -XDG_DOCUMENTS_DIR="$HOME/cloud/Documents" -# too big to get synced -XDG_DOWNLOAD_DIR="$HOME/Download" +XDG_DESKTOP_DIR="$HOME/Desktop" +XDG_DOWNLOAD_DIR="$HOME/Downloads" +XDG_TEMPLATES_DIR="$HOME/Templates" +XDG_PUBLICSHARE_DIR="$HOME/Public" +XDG_DOCUMENTS_DIR="$HOME/Documents" XDG_MUSIC_DIR="$HOME/Music" XDG_PICTURES_DIR="$HOME/Pictures" XDG_VIDEOS_DIR="$HOME/Videos" diff --git a/.profile b/.profile index f82b46c..80ad4c7 100644 --- a/.profile +++ b/.profile @@ -14,11 +14,7 @@ export EDITOR='vim' export VISUAL='vim' export PAGER='less' export MANPAGER='less' - -# Prefer US language with SI units (Danish) -export LANG="en_DK.UTF-8" -export LANGUAGE="en_US.UTF-8" -export KEYMAP=us +export LANG="en_US.UTF-8" # Set XDG directories if [ -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs ]; then -- 2.43.0