From 9c94f06db9fdc9d40f98a0abd4a9646977f45ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Fri, 1 Apr 2022 18:49:06 +0200 Subject: Home dots --- home-dots/dot-bashrc | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ home-dots/dot-inputrc | 1 + home-dots/dot-sbclrc | 2 +- home-dots/dot-zshrc | 9 ++++----- 4 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 home-dots/dot-bashrc (limited to 'home-dots') diff --git a/home-dots/dot-bashrc b/home-dots/dot-bashrc new file mode 100644 index 0000000..ad6595f --- /dev/null +++ b/home-dots/dot-bashrc @@ -0,0 +1,52 @@ +#-*- mode: shell-script; -*- +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return +# GPG agent with ssh +unset SSH_AGENT_PID +if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" +fi +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# Git branch in prompt. +git_current_branch() { + local ref + ref=$(git symbolic-ref --quiet HEAD 2>/dev/null) + local ret=$? + if [[ $ret != 0 ]]; then + [[ $ret == 128 ]] && return # no git repo. + ref=$(git rev-parse --short HEAD 2>/dev/null) || return + fi + echo ${ref#refs/heads/} +} + +export PS1="\u@\h \W\[\033[32m\] \$(git_current_branch)\[\033[00m\] $ " + +export PATH="$HOME/.local/bin:$PATH" +alias isrun='ps -ae | grep' +alias gdimg='git difftool -t image_diff' +alias G='grep -i' +alias lar='ls -lahrt' +alias mykeys='setxkbmap -I$HOME/.config/xkb/ oscar -option caps:escape -print | xkbcomp -I$HOME/.config/xkb/ - $DISPLAY' + +# export PATH="$HOME/.cargo/bin:$PATH" +if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer +[ -f "$HOME/.ghcup/env" ] && source "$HOME/.ghcup/env" # ghcup-env +GUIX_PROFILE="$HOME/.guix-profile" && [ -e "$GUIX_PROFILE" ] && . "$GUIX_PROFILE/etc/profile" && export GUIX_LOCPATH=$GUIX_PROFILE/lib/locale +GUIX_PROFILE="$HOME/.config/guix/current" && [ -e "$GUIX_PROFILE" ] && . "$GUIX_PROFILE/etc/profile" +# export SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs" +# export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt" diff --git a/home-dots/dot-inputrc b/home-dots/dot-inputrc index 5a53eaf..db8d91d 100644 --- a/home-dots/dot-inputrc +++ b/home-dots/dot-inputrc @@ -1 +1,2 @@ set show-all-if-ambiguous on +set completion-ignore-case on diff --git a/home-dots/dot-sbclrc b/home-dots/dot-sbclrc index e1d2c74..a9569d3 100644 --- a/home-dots/dot-sbclrc +++ b/home-dots/dot-sbclrc @@ -2,7 +2,7 @@ ;;; The following lines added by ql:add-to-init-file: #-quicklisp -(let ((quicklisp-init (merge-pathnames ".quicklisp/setup.lisp" +(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))) (when (probe-file quicklisp-init) (load quicklisp-init))) diff --git a/home-dots/dot-zshrc b/home-dots/dot-zshrc index 560c2bd..2a3efb5 100644 --- a/home-dots/dot-zshrc +++ b/home-dots/dot-zshrc @@ -57,8 +57,7 @@ export TERM="xterm-256color" # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -export WORKON_HOME=$HOME/.virtualenvs -plugins=(git archlinux python virtualenvwrapper gpg-agent) +plugins=(git archlinux gpg-agent) # User configuration @@ -122,10 +121,10 @@ alias -g G='| grep' alias lar='ls -lahrt' alias mykeys='setxkbmap -I$HOME/.config/xkb/ oscar -option caps:escape -print | xkbcomp -I$HOME/.config/xkb/ - $DISPLAY' -export PATH="$HOME/.cargo/bin:$PATH" +# export PATH="$HOME/.cargo/bin:$PATH" if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer [ -f "$HOME/.ghcup/env" ] && source "$HOME/.ghcup/env" # ghcup-env GUIX_PROFILE="$HOME/.guix-profile" && [ -e "$GUIX_PROFILE" ] && . "$GUIX_PROFILE/etc/profile" && export GUIX_LOCPATH=$GUIX_PROFILE/lib/locale GUIX_PROFILE="$HOME/.config/guix/current" && [ -e "$GUIX_PROFILE" ] && . "$GUIX_PROFILE/etc/profile" -export SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs" -export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt" +# export SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs" +# export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt" -- cgit v1.2.3