-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrc
58 lines (47 loc) · 1.57 KB
/
bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# BEGIN_KITTY_SHELL_INTEGRATION
if test -n "$KITTY_INSTALLATION_DIR" -a -e "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; then source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; fi
# END_KITTY_SHELL_INTEGRATION
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
export EDITOR=vim
alias snek=python
alias xboard='xclip -selection clipboard'
# settings to make fcitx work reliably
export INPUT_METHOD=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
# append to the history instead of overwriting it
shopt -s histappend
# & means, that duplicates of commands (if you run the same command
# twice) won't be reccorded in the history source:
# http://www.talug.org/events/20030709/cmdline_history.html
export HISTIGNORE="&"
# This causes commands that begin with a space to not be entered into
# the history file
export HISTCONTROL="ignorespace"
# stolen from
# https://superuser.com/questions/611538/is-there-a-way-to-display-a-countdown-or-stopwatch-timer-in-a-terminal#611582
function countdown(){
date1=$((`date +%s` + $1));
while [ "$date1" -ge `date +%s` ]; do
echo -ne "$(date -u --date @$(($date1 - `date +%s`)) +%H:%M:%S)\r";
sleep 0.1
done
}
function stopwatch(){
date1=`date +%s`;
while true; do
echo -ne "$(date -u --date @$((`date +%s` - $date1)) +%H:%M:%S)\r";
sleep 0.1
done
}
camelcase() {
perl -pe 's#(_|^)(.)#\u$2#g'
}
alias vijournal='vim ~/Dokumente/Journal/$(date +%Y/%V)/journal.txt'