-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
104 lines (73 loc) · 2.29 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\[\e[1m\]\[\e[32m\]\u@\h \[\e[34m\]\W\[\e[0m\]]\$ '
# If I have a bin directory, add it to PATH
if [ -d "$HOME/.scripts" ] ; then
PATH="$PATH:$HOME/.scripts"
fi
if [ -d "$HOME/.installs/flutter/bin" ] ; then
PATH="$PATH:$HOME/.installs/flutter/bin"
fi
if [ -d "$HOME/.installs/android-studio/bin" ] ; then
PATH="$PATH:$HOME/.installs/android-studio/bin"
fi
# feup-comp
if [ -d "$HOME/.installs/javacc-6.0/bin" ] ; then
PATH="$PATH:$HOME/.installs/javacc-6.0/bin"
fi
########################
# Alias #
########################
# gimme colorful grep
alias grep='grep --color=auto'
# sets the wallpaper
alias sw='feh --bg-scale'
# change wallpaper
alias ref='systemctl --user restart random_wallpaper.service'
# locks the screen
alias lock='betterlockscreen -l dimblur'
# locks and suspends
alias sus='betterlockscreen -s dimblur'
# kill Xorg and open it again
#alias restart='killall Xorg && sleep 5 && startx & disown'
# copies from stdout
alias pbcopy='xclip -selection clipboard'
# loads ranger
alias l='ranger'
alias composer='/home/diogo/.installs/composer/composer.phar'
# show me the 10 last modified files here
alias llast='ls -t | head'
# open a virtual serial port
alias osoc='socat -d -d pty,raw,echo=0 pty,raw,echo=0'
# git #
alias gs='git status'
alias ga='git add -p'
alias gc='git commit -S -m'
# python #
alias act='source env/bin/activate'
alias cenv='python -m virtualenv env'
alias web='python -m http.server 8000'
# tmux #
alias tmuxa='tmux attach-session'
# equalizer #
alias eq='pulseaudio-equalizer-gtk'
export ANDROID_HOME=/home/diogo/.installs/android-studio-installed
# disable yarn emoji
#alias yarn='yarn --no-emoji'
#ya() {
# yarn "$@" --no-emoji
#}
# php #
export PATH=$PATH:/home/diogo/.config/composer/vendor/bin
########################
# Miscellaneous #
########################
# for opening the same directory on new terminal
export PROMPT_COMMAND="pwd > /tmp/current_directory"
# Enable Git autocomplete
[[ -f /usr/share/git/completion/git-completion.bash ]] && . /usr/share/git/completion/git-completion.bash
# Append my top secret alias
[[ -f ~/.secret_alias ]] && . ~/.secret_alias
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash