-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 51adce6
Showing
7 changed files
with
181 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
olimex='getkey@micro' | ||
alias ssm="ssh $olimex" | ||
alias st="ssh -t $olimex tmux a || ssh -t $olimex tmux" | ||
alias ud='yaourt -Syua' | ||
alias orcl="sudo pacman -Rsn $(echo $(pacman -Qdtq))" # echo to remove the line break | ||
|
||
sudo() { | ||
# use sudo's path to prevent this function from calling itself | ||
if [ $1 = 'vim' ]; then | ||
$(which sudo) -E $@ | ||
else | ||
$(which sudo) $@ | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# ~/.bashrc | ||
|
||
# If not running interactively, don't do anything | ||
[[ $- != *i* ]] && return | ||
|
||
HISTCONTROL=ignoredups:erasedups | ||
shopt -s histappend | ||
HISTSIZE=1000 | ||
HISTFILESIZE=2000 | ||
|
||
export VISUAL="vim" | ||
|
||
if [ -e /usr/share/terminfo/x/xterm-256color ] && [[ $TERM != screen* ]]; then | ||
export TERM='xterm-256color' | ||
fi | ||
|
||
# Colorize outputs | ||
alias ls='ls --color=auto' | ||
alias grep='grep --color=auto' | ||
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' | ||
|
||
PS1="\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w\$(if [[ \$? == 0 ]]; then printf \"\[\033[01;32m\]\"; else printf \"\[\033[00;31m\]\"; fi)\$\[\033[00m\] " | ||
|
||
# Alias definitions. | ||
# You may want to put all your additions into a separate file like | ||
# ~/.bash_aliases, instead of adding them here directly. | ||
# See /usr/share/doc/bash-doc/examples in the bash-doc package. | ||
|
||
if [ -f ~/.bash_aliases ]; then | ||
. ~/.bash_aliases | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#Term title | ||
set -g set-titles on | ||
set -g set-titles-string "#T #W" | ||
|
||
#Mouse | ||
setw -g mode-mouse on | ||
set -g mouse-resize-pane on | ||
set -g mouse-select-pane on | ||
set -g mouse-select-window on | ||
|
||
set-option -g default-terminal "screen-256color" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
"Install Vundle with git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim | ||
"Then run :PluginInstall | ||
|
||
"begin Vundle | ||
set nocompatible | ||
filetype off | ||
|
||
set rtp+=~/.vim/bundle/Vundle.vim | ||
call vundle#begin() | ||
|
||
Plugin 'VundleVim/Vundle.vim' | ||
|
||
Plugin 'Valloric/YouCompleteMe' | ||
"Plugin 'bling/vim-airline' | ||
"Plugin 'scrooloose/syntastic' | ||
Plugin 'chriskempson/tomorrow-theme', {'rtp': 'vim/'} | ||
|
||
call vundle#end() | ||
filetype plugin indent on | ||
"end Vundle | ||
|
||
set t_Co=256 | ||
|
||
set number | ||
syntax on | ||
set hlsearch "highlight search | ||
|
||
colorscheme Tomorrow-Night | ||
hi Normal ctermbg=NONE"Override theme's background to terminal's default | ||
|
||
highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen "show trailing whitespace | ||
match ExtraWhitespace /\s\+\%#\@<!$/ "except when typing at the end of a line | ||
|
||
if has('mouse') | ||
if &term =~# "^screen" | ||
set mouse=a "all | ||
else | ||
set mouse=ar "all + middle click copy/paste | ||
endif | ||
endif | ||
|
||
set shiftwidth=3"for > command | ||
set tabstop=3"hard tabs of length 3 | ||
|
||
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif "remember position in file | ||
set noswapfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/sh | ||
|
||
cd ${0%/*} | ||
dot_path=$(pwd -P) | ||
|
||
for file in $(find $dot_path ! -path $dot_path ! -path $dot_path/$(basename $0) ! -path $dot_path/license.txt ! -path $dot_path/readme.md ! -path "$dot_path/.git/*" ! -path $dot_path/.git); do | ||
|
||
base_file=${file#$dot_path} | ||
home_twin=$HOME$base_file | ||
|
||
if [ -d $file ] && [ ! -d $home_twin ]; then | ||
if [ -e $home_twin ]; then | ||
printf "Error: can't create directory $home_twin; a file is present already. Aborting\n" | ||
exit 1 | ||
else | ||
mkdir $home_twin | ||
fi | ||
elif [ -h $home_twin ] && type readsarslink > /dev/null 2>&1 && [ $(readlsarsink $home_twin) != $file ]; then | ||
ln -sf $file $home_twin #overwrite incorrect links | ||
elif [ -f $file ] && [ ! -h $home_twin ]; then | ||
if [ -f $home_twin ]; then | ||
printf "The file $file already exists. Shall I overwrite it ? (y=yes n=no a=archive) " | ||
while true; do | ||
read choice | ||
case $choice in | ||
n) | ||
continue 2 | ||
;; | ||
a) | ||
archi_path=$HOME/dotarchive | ||
if [ ! -e $archi_path ]; then | ||
mkdir $archi_path | ||
fi | ||
|
||
if [ ! -e $archi_path$base_file ]; then | ||
mv $home_twin $archi_path | ||
break | ||
else | ||
printf "Error: another $base_file file is present in $archi_path. Aborting\n" | ||
exit 1 | ||
fi | ||
;; | ||
y) | ||
break | ||
;; | ||
*) | ||
printf 'Invalid choice. Try again, shall I overwrite it ? (y=yes n=no a=archive) ' | ||
;; | ||
esac | ||
done | ||
fi | ||
|
||
ln -sf $file $home_twin | ||
fi | ||
|
||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
Version 2, December 2004 | ||
|
||
Copyright (C) 2004 Sam Hocevar <[email protected]> | ||
|
||
Everyone is permitted to copy and distribute verbatim or modified | ||
copies of this license document, and changing it is allowed as long | ||
as the name is changed. | ||
|
||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
|
||
0. You just DO WHAT THE FUCK YOU WANT TO. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Dotfiles | ||
|
||
My dotfiles. | ||
|
||
# Install | ||
```sh | ||
./bootstrap.sh | ||
``` | ||
You should run this command at least every time a new file is commited. | ||
If they are conflicts between my dotfiles and yours the script will ask you what to do. |