-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc.local
74 lines (62 loc) · 1.71 KB
/
.zshrc.local
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
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh
autoload -U compinit && compinit
source "$HOME/.rye/env"
export EDITOR=/usr/bin/nvim
# functions
function uzp() {
unzip "$1".zip -d "$1";
}
function PACMAN_WRAPPER() {
command pacman "$@";
setxkbmap -option ctrl:nocaps
xmodmap ~/.xmodmap;
}
function YAY_WRAPPER() {
command yay "$@";
setxkbmap -option ctrl:nocaps
xmodmap ~/.xmodmap;
}
function UPDATE_LIST() {
echo -ne "\033[1;32mUpdate 'packages.list' ? (Y/n)\033[0m";
read answer;
if [ "$answer" = "n" ]; then
echo "Skipping 'packages.list' update.";
else
command yay -Syu;
~/dotfiles/update.sh;
fi
cd ~/dotfiles;
echo -ne "\033[1;32mPush diffs to 'git' ? (Y/n)\033[0m";
read answer;
if [ "$answer" = "n" ]; then
echo "Skipping 'git' push.";
else
git add .;
git commit -m "update";
git push;
fi
xmodmap ~/.xmodmap;
setxkbmap -option ctrl:nocaps
}
# common aliases
alias g='git'
alias ip="ip -c"
alias ls="ls --color=auto"
alias la="ls -a"
alias ll="ls -l"
alias i3reload="i3-msg reload"
alias usb="sudo mount /dev/sda1 ~/usb"
alias usbe="sudo umount /dev/sda1"
alias pacman="PACMAN_WRAPPER"
alias yay="YAY_WRAPPER"
alias update="UPDATE_LIST"
alias reload="source ~/.zshrc && setxkbmap -option ctrl:nocaps && xmodmap ~/.xmodmap"
alias vi='vim'
alias gsr='gpu-screen-recorder-gtk'
alias voicevox='~/.voicevox/VOICEVOX.AppImage'
alias NVIDIA='~/dotfiles/NVIDIA.sh'
alias INTEL='~/dotfiles/INTEL.sh'
eval "$(starship init zsh)"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
[ -f /usr/share/fzf/key-bindings.zsh ] && source /usr/share/fzf/key-bindings.zsh