-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
86 lines (72 loc) · 2.21 KB
/
.zshrc
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
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="robbyrussell"
ENABLE_CORRECTION="false"
plugins=(git zsh-syntax-highlighting tmux artisan)
source $ZSH/oh-my-zsh.sh
# aliases
alias :c="clear"
alias :C="clear"
alias nv="nvim"
alias nf="neofetch"
alias y="yazi"
alias b="bat"
alias dots="cd ~/dots/"
alias :wq="exit"
alias :off="poweroff"
alias slp="systemctl suspend"
alias out="pkill -KILL -u $(whoami)"
alias wflist="nmcli device wifi list"
alias wfconnect="nmcli -ask device wifi connect"
alias c="gcc -std=c99 -fdiagnostics-color=always"
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
alias phpstan='./vendor/bin/phpstan'
alias dstart="sudo systemctl start docker"
alias dstop="sudo systemctl stop docker.service docker.socket"
alias phpstart="sudo systemctl start php-fpm nginx mariadb"
alias phpstop="sudo systemctl stop php-fpm nginx mariadb"
alias botrun="php artisan nutgram:run"
alias helper="~/projects/personal/helper-cli/cli"
alias stmd="sudo systemctl"
alias t="touch"
alias a="artisan"
alias blon="sudo systemctl start bluetooth.service"
alias bloff="sudo systemctl stop bluetooth"
alias commit="git add . && git commit -am"
alias open="xdg-open"
# functions
function proxy_on() {
export no_proxy="localhost,127.0.0.1,localaddress,.loc"
if [[ $1 != "" ]]; then
local proxy=$1
export http_proxy="$proxy" \
https_proxy=$proxy \
ftp_proxy=$proxy \
rsync_proxy=$proxy
echo "Proxy set"
return 0
fi
echo -n "server: "
read server
echo -n "port: "
read port
if [[ $port -eq "" ]]; then
local port=44355
fi
local proxy=$server:$port
export http_proxy="$proxy" \
https_proxy=$proxy \
ftp_proxy=$proxy \
rsync_proxy=$proxy \
HTTP_PROXY=$proxy \
HTTPS_PROXY=$proxy \
FTP_PROXY=$proxy \
RSYNC_PROXY=$proxy
}
function proxy_off() {
unset http_proxy https_proxy ftp_proxy rsync_proxy \
HTTP_PROXY HTTPS_PROXY FTP_PROXY RSYNC_PROXY
echo -e "Proxy environment variable removed."
}
export PATH=$PATH:/home/ar4sh/.local/bin/:/home/ar4sh/.config/composer/vendor/bin