pomodoro from terminal
[dotfiles] / .bashrc
1 #!/bin/sh
2
3
4 # python setup.py --command-packages=stdeb.command sdist_dsc
5
6 # dns servers 80.67.169.12 || 2001:910:800::12
7 # 31.14.133.188 (ns5.it) -- 99.30% uptime
8 # 87.98.242.252 (ns11.fr) -- 99.58% uptime
9 # 87.98.175.85 (ns10.fr) -- 99.61% uptime
10 # 193.183.98.154 (ns1.it) -- 99.84% uptime
11
12 # unicode characters https://en.wikipedia.org/wiki/List_of_Unicode_characters
13
14 # ~/.bashrc: executed by bash(1) for non-login shells.
15 # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
16 # for examples
17
18 # vcprompt & other things
19 export PATH=$PATH:$HOME/bin
20
21 # nim lang
22 export PATH=$PATH:$HOME/bin/nim-0.10.2/bin
23
24 # If not running interactively, don't do anything
25 case $- in
26 *i*) ;;
27 *) return;;
28 esac
29
30
31 # make less more friendly for non-text input files, see lesspipe(1)
32 #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
33
34 # set variable identifying the chroot you work in (used in the prompt below)
35 if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
36 debian_chroot=$(cat /etc/debian_chroot)
37 fi
38
39 # set a fancy prompt (non-color, unless we know we "want" color)
40 case "$TERM" in
41 xterm-color) color_prompt=yes;;
42 esac
43
44 # uncomment for a colored prompt, if the terminal has the capability; turned
45 # off by default to not distract the user: the focus in a terminal window
46 # should be on the output of commands, not on the prompt
47 force_color_prompt=yes
48
49 if [ -n "$force_color_prompt" ]; then
50 if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
51 # We have color support; assume it's compliant with Ecma-48
52 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
53 # a case would tend to support setf rather than setaf.)
54 color_prompt=yes
55 else
56 color_prompt=
57 fi
58 fi
59
60 # export command for coloring
61 # '\e[x;ym $PS1 \e[m' or [\033[x;ym\] $PS1 [\033[00m\] x;y being the color pair to use
62
63 if [ "$color_prompt" = yes ]; then
64 #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] $(__git_ps1 "[%s]") \$ '
65 #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] $(vcprompt -f %b%a%m%u) > '
66 if [ $USER='nsukami' ]; then
67 #PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]\h\[\033[00m\]:\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] > '
68 #PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]k\[\033[00m\]:\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] \n > '
69 #PS1='${debian_chroot:+($debian_chroot)}\[\033[31m\]\[\033[00m\]:\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] \n '
70 #PS1=$'\u03c6 \w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] \n '
71 PS1=$'\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] \n\u21D2 '
72 else
73 PS1='${debian_chroot:+($debian_chroot)}\u@\[\033[31m\]\h\[\033[00m\]:\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] \n > '
74 fi
75 else
76 #PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w $(__git_ps1 "[%s]") \$ '
77 if [ $USER='nsukami' ]; then
78 #PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]\h\[\033[00m\]:\w $(vcprompt -f %b%a%m%u) > '
79 PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]k\[\033[00m\]:\w $(vcprompt -f %b%a%m%u) \n > '
80 else
81 PS1='${debian_chroot:+($debian_chroot)}\u@\[\033[31m\]\h\[\033[00m\]:\w $(vcprompt -f %b%a%m%u) \n > '
82 fi
83
84 fi
85 unset color_prompt force_color_prompt
86
87 # If this is an xterm set the title to user@host:dir
88 case "$TERM" in
89 xterm*|rxvt*)
90 PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w $(vcprompt -f %b%a%m%u) \a\]$PS1"
91 ;;
92 *)
93 ;;
94 esac
95
96 # enable color support of ls
97 if [ -x /usr/bin/dircolors ]; then
98 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
99 alias ls='ls --color=auto'
100 fi
101
102
103
104 # enable programmable completion features (you don't need to enable
105 # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
106 # sources /etc/bash.bashrc).
107 if ! shopt -oq posix; then
108 if [ -f /usr/share/bash-completion/bash_completion ]; then
109 . /usr/share/bash-completion/bash_completion
110 elif [ -f /etc/bash_completion ]; then
111 . /etc/bash_completion
112 fi
113 fi
114
115 # start gpg agent
116 # be sure to have done apt install gpg-agent pinentry-curses first
117 eval `gpg-agent --daemon`
118
119 # print available tmux sessions if available
120 tmux list-sessions 2> /dev/null
121
122 # always put prompt at bottom
123 # PS1="\[$(tput cup "$LINES")\]"$PS1
124
125 # Hook for desk activation
126 [ -n "$DESK_ENV" ] && source "$DESK_ENV"
127
128 # Alias definitions.
129 # You may want to put all your additions into a separate file like
130 # ~/.bash_aliases, instead of adding them here directly.
131 # See /usr/share/doc/bash-doc/examples in the bash-doc package.
132 [[ -f ~/.bash_aliases ]] && . ~/.bash_aliases
133
134 # git completion
135 [[ -f ~/.git_completion ]] && . ~/.git_completion
136
137 # personal customization
138 [[ -f ~/.bash_customization ]] && . ~/.bash_customization
139
140 # personal functions
141 [[ -f ~/.bash_function ]] && . ~/.bash_function
142
143 # personal export
144 [[ -f ~/.bash_export ]] && . ~/.bash_export
145
146 # personal color
147 [[ -f ~/.bash_color ]] && . ~/.bash_color
148
149 # personal shopt
150 [[ -f ~/.bash_shopt ]] && . ~/.bash_shopt
151
152 # git completion
153 [[ -f ~/.git_completion ]] && . ~/.git_completion
154
155 # is or is not
156 [[ -f ~/.bash_is ]] && . ~/.bash_is
157
158 # jump to directories
159 [[ -f ~/.bash_marks ]] && . ~/.bash_marks
160
161 # tmux completion script
162 [[ -f ~/.bash_tmux ]] && . ~/.bash_tmux
163
164 # jump completion script
165 [[ -f ~/.bash_compl ]] && . ~/.bash_compl
166
167 # jump completion script
168 [[ -f ~/.bash_base64 ]] && . ~/.bash_base64
169
170 # emacs launcher script
171 [[ -f ~/.bash_emacs ]] && . ~/.bash_emacs
172
173 # memo
174 [[ -f ~/.bash_memo ]] && . ~/.bash_memo
175
176 # custom bindings
177 [[ -f ~/.bash_bind ]] && . ~/.bash_bind
178
179 # custom filters
180 [[ -f ~/.bash_filters ]] && . ~/.bash_filters
181
182 # openssl
183 [[ -f ~/.bash_openssl ]] && . ~/.bash_openssl
184
185 # pomodoro
186 [[ -f ~/.bash_pomodoro ]] && . ~/.bash_pomodoro