-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.zshrc
72 lines (66 loc) · 2.27 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
# Zsh Config
autoload -Uz compinit && compinit
zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*:*:*:*:*' menu yes select
zstyle ':completion:*' menu select
setopt MENU_COMPLETE
export HISTFILE=/home/cat/.zsh_history
export SAVEHIST=2147483647
export HISTSIZE=2147483647
setopt APPEND_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_FIND_NO_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_DUPS
setopt HIST_REDUCE_BLANKS
setopt HIST_SAVE_NO_DUPS
setopt HIST_VERIFY
setopt SHARE_HISTORY
# Theming
source /home/cat/.zsh/mh.zsh
# History Substring Search
source /home/cat/.zsh/zsh-history-substring-search.zsh
# Set term title correctly
source /home/cat/.zsh/termsupport.zsh
# Vi Binds
bindkey -v
bindkey "\e[A" history-substring-search-up
bindkey "\e[B" history-substring-search-down
bindkey "^P" history-substring-search-up
bindkey "^N" history-substring-search-down
bindkey "^?" backward-delete-char
export KEYTIMEOUT=1
# Alias | Functions
alias :q="exit"
alias cp="cp -i"
alias ssh="TERM=xterm-256color ssh"
alias pacccache="paccache -rk2 && paccache -ruk0"
alias lidignore="systemd-inhibit --what=handle-lid-switch sleep 666d"
alias pakkuscuffedgitupdate="pakku -S --needed \$(pakku -Qq | grep \"\-git\")"
alias xkill="kill -9 \$(xprop | grep _NET_WM_PID | sed 's/_NET.*\=\ //')"
wttr() { curl wttr.in/"$1" }
mpvyt() { mpv ytdl://ytsearch66:"$*" }
mkcd() { mkdir -p "$1";cd "$1" }
scanwlan() { sudo iwlist wlp3s0 scanning essid $1 }
stream2cam() { ffmpeg -stream_loop -1 -re -i $1 -f v4l2 /dev/video0 }
colorsdesu() {
T=':/3'
echo -e "\n 40m 41m 42m 43m 44m 45m 46m 47m";
for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' ' 36m' '1;36m' ' 37m' '1;37m'; do
FG=${FGs// /}
echo -en " $FGs \033[$FG $T "
for BG in 40m 41m 42m 43m 44m 45m 46m 47m; do
echo -en "$EINS \033[$FG\033[$BG $T \033[0m";
done
echo;
done
echo
}
# Startx if login, start tmux if connecting from ssh
if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
exec startx
fi
if [ -n "$SSH_CONNECTION" ] && [ -z "$TMUX" ]; then
export DISPLAY=:0
tmux a || tmux
fi