summaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2021-01-14 17:28:49 +0100
committerEkaitz Zarraga <ekaitz@elenq.tech>2021-01-14 17:28:49 +0100
commit5e995529f7b522452ff1c6798c7a0ff3d0bf4c3c (patch)
treef5d7b5c50b80764899a3d9da367221ae57a312f5 /bash
parentb96a03aa6e1341b5fc4ea2f1df4bffd9b0cb7a0c (diff)
Clean and update bash
Diffstat (limited to 'bash')
-rw-r--r--bash/dot-bash_aliases14
-rw-r--r--bash/dot-bashrc18
2 files changed, 24 insertions, 8 deletions
diff --git a/bash/dot-bash_aliases b/bash/dot-bash_aliases
index 55b8292..6c8a7f2 100644
--- a/bash/dot-bash_aliases
+++ b/bash/dot-bash_aliases
@@ -1,5 +1,6 @@
# vimdiff style with nvim
alias vim='nvim'
+alias vi='nvim'
alias nvimdiff='nvim -d'
# ssh as root -> Sysadmin trick
@@ -19,11 +20,6 @@ alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
-# Add an "alert" alias for long running commands. Use like so:
-# sleep 10; alert
-alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
-
-
# alias for Node.js projects
alias ntree='tree -I node_modules'
# alias for Clojure projects
@@ -35,10 +31,14 @@ alias whiteboard="convert $1 -morphology Convolve DoG:15,100,0 -negate -normaliz
# Pandoc for ElenQ
alias pandoc-xelatex="pandoc $@ --pdf-engine=xelatex --to latex -N"
-alias elenqdoc-article="pandoc-xelatex $@ --standalone --template elenq-article --metadata=documentclass:article"
-alias elenqdoc-book="pandoc-xelatex $@ --standalone --template elenq-book --metadata=documentclass:book --top-level-division=chapter"
+alias elenqdoc-article="pandoc-xelatex $@ --standalone --template elenq-article --metadata=documentclass:article --resource-path=~/.pandoc:."
+alias elenqdoc-book="pandoc-xelatex $@ --standalone --template elenq-book --metadata=documentclass:book --top-level-division=chapter --resource-path=~/.pandoc:."
# Kitty
if [ $TERM = "xterm-kitty" ]; then
alias ssh="kitty +kitten ssh"
+ alias _ssh="ssh"
fi
+
+# Open using xdg
+alias open="xdg-open $@ &>/dev/null"
diff --git a/bash/dot-bashrc b/bash/dot-bashrc
index df74698..70448a2 100644
--- a/bash/dot-bashrc
+++ b/bash/dot-bashrc
@@ -1,7 +1,12 @@
# Bash initialization for interactive non-login shells and
# for remote shells (info "(bash) Bash Startup Files").
-
export SHELL
+eval `dircolors`
+
+
+# Disable xon xoff for Ctrl+S support
+stty -ixon
+
if [[ $- != *i* ]]
then
@@ -18,6 +23,7 @@ source /etc/bashrc
# VARIABLE EXPORTS
######################################################################
+# Colors
export COLOR_BLACK="\[\033[0;30m\]"
export COLOR_RED="\[\033[0;31m\]"
export COLOR_GREEN="\[\033[0;32m\]"
@@ -29,7 +35,15 @@ export COLOR_GREY="\[\033[0;37m\]"
export COLOR_DEFAULT="\[\033[0;39m\]"
export COLOR_WHITE=$COLOR_DEFAULT
+# History length and control
+export HISTCONTROL=ignoreboth
+export HISTSIZE=1000
+export HISTTIMEFORMAT="[%F %T] "
+
+# Editors
export EDITOR=nvim
+export PAGER=less
+
PATH=$PATH:$HOME/.local/bin
# PROMPT
@@ -63,3 +77,5 @@ if [ -f ~/.bash_aliases ] ; then
. ~/.bash_aliases
fi
+# Keyboard layout control spanish - russian
+setxkbmap -layout es,ru -option "grp:alt_space_toggle"