summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--XCompose1
-rw-r--r--bashrc55
-rw-r--r--environment13
-rw-r--r--vimrc3
-rw-r--r--zshrc1
5 files changed, 24 insertions, 49 deletions
diff --git a/XCompose b/XCompose
index a9f2218..e29ae6a 100644
--- a/XCompose
+++ b/XCompose
@@ -27,6 +27,7 @@ include "/usr/share/X11/locale/en_US.UTF-8/Compose"
#<Multi_key> <r> <X> : "Ж"
#<Multi_key> <r> <Y> : "Й"
#<Multi_key> <r> <Z> : "З"
+<Multi_key> <x> <i> <e> : "谢谢"
# USEFUL STUFF
<Multi_key> <d> <o> <t> : "·" # Mid dot for multiplication or units
diff --git a/bashrc b/bashrc
index 05e3333..ac8c12f 100644
--- a/bashrc
+++ b/bashrc
@@ -1,50 +1,19 @@
#!/usr/bin/bash
-c_off='\e[0m'
-c_bold='\e[1m'
-c_black='\e[30m'
-c_red='\e[31m'
-c_green='\e[32m'
-c_yellow='\e[33m'
-c_blue='\e[34m'
-c_purple='\e[35m'
-c_cyan='\e[36m'
-c_white='\e[37m'
-
export HISTSIZE=10000
export HISTTIMEFORMAT="%y-%m-%d %T "
-source /usr/share/git/completion/git-prompt.sh
-
-if [ "$TERM" == "st-256color" ]; then
- # Quick fix for ctrl+arrow key in st
- echo $(tput smkx) > /dev/tty
-fi
-
-###############
-PS1="${c_bold}${c_yellow}\
-┌[${c_green}\u${c_yellow}@${c_blue}\h${c_yellow}][${c_purple}\W${c_yellow}"'$(__git_ps1 " (%s)")'"] ${c_black}<\d \t>${c_yellow}\n\
-└╼ \[${c_off}\]"
-###############
-
-source ~/.aliases
-source ~/.environment
-
-echo Running $(uname) $(uname -r) on $(uname -n) \($(uname -m)\)
-
-if [ -f ~/todo ]; then
- echo To do:
- cat ~/todo
-fi
-
-if [ -f ~/.cache/weather/forecast ]; then
- echo ""
- echo Weather:
- cat ~/.cache/weather/forecast | while read -r l ; do echo " "$l ; done
-fi
+case $- in
+ *i*)
+ # interactive, continue fancy stuff. Printing anything when a
+ # non-interactive session is active breaks scp and other utils
+ source ~/.aliases
+ source ~/.environment
-[ -d ~/Maildir/new/ ] && [ "$(ls ~/Maildir/new/)" ] && echo 'New mail'
+ echo Running $(uname) $(uname -r) on $(uname -n) \($(uname -m)\)
+ ;;
+ *)
+ # non-interactive, don't do anything fancy
+ ;;
+esac
-[ -z "$(ls -A ~/.cache/currency 2>/dev/null)" ] || for c in ~/.cache/currency/* ; do
- echo "$(cat $c) (at $(date -d $(stat -c %Y $c) +"%a %d %H:%M"))"
-done
diff --git a/environment b/environment
index c767584..4952a08 100644
--- a/environment
+++ b/environment
@@ -1,20 +1,21 @@
#!/bin/sh
+bin_available() {
+ hash "$1" 2>/dev/null
+}
+
export GPG_TTY=$(tty)
export EDITOR=/usr/bin/vim
export ORIG_PATH="$PATH"
export PATH="/opt/sbase/bin/:$PATH"
-if hash clang 2>/dev/null; then
+if bin_available clang; then
export CC=clang
export CXX=clang++
-elif hash ❤ 2>/dev/null ; then
- export CC=❤
- export CXX=g++
-elif hash gcc 2>/dev/null ; then
+elif bin_available gcc ; then
export CC=gcc
export CXX=g++
-elif hash tcc 2>/dev/null ; then
+elif bin_available tcc ; then
export CC=tcc
fi
diff --git a/vimrc b/vimrc
index abb9b5e..a896467 100644
--- a/vimrc
+++ b/vimrc
@@ -63,6 +63,7 @@ autocmd FileType bitbake setlocal expandtab
autocmd FileType python setlocal expandtab
autocmd FileType haskell setlocal expandtab
autocmd FileType lhaskell setlocal expandtab
+autocmd FileType perl setlocal noexpandtab
""""""""""""""""""""""""""""""
" airline
@@ -112,3 +113,5 @@ xnoremap <F12> <Nop>
snoremap <F12> <Nop>
onoremap <F12> <Nop>
nnoremap <expr> <F12> PopMode()
+
+au FileType gitcommit setlocal tw=72
diff --git a/zshrc b/zshrc
index 6257fcb..f40a661 100644
--- a/zshrc
+++ b/zshrc
@@ -23,6 +23,7 @@ key[Insert]="$terminfo[kich1]"
key[Backspace]="$terminfo[kbs]"
key[Delete]="$terminfo[kdch1]"
+# Emacs-like bindings default
bindkey -e
bindkey "^R" history-incremental-search-backward