-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bashrc
executable file
·190 lines (168 loc) · 7.12 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# _ _
# | |__ __ _ ___| |__ _ __ ___
# | '_ \ / _` / __| '_ \| '__/ __|
# _| |_) | (_| \__ \ | | | | | (__
# (_)_.__/ \__,_|___/_| |_|_| \___|
#
# by Yuvan Michael Vivenzi (YMV) (2024)
# -----------------------------------------------------
# ~/dotfiles/.bashrc
# -----------------------------------------------------
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
PS1='[\u@\h \W]\$ '
# Define Editor
export EDITOR=nvim
# -----------------------------------------------------
# MY CUSTOM ALIASES
# -----------------------------------------------------
alias install='sudo pacman --needed -S '
alias install-aur='yay --needed -S '
alias uninstall='sudo pacman -R '
alias remove='sudo pacman -R '
alias uninstall-aur='yay -R '
alias remove-aur='yay -R '
alias upd='sudo pacman -Syu && yay -Syu && yay -Syu --devel' # Adding the --devel to update Hyprland packages to the latest git
alias update='sudo pacman -Syu && yay -Syu && yay -Syu --devel' # Bleeding edge :D
alias search='sudo pacman -Ss '
alias search-aur='yay -Ss '
alias get='git clone '
alias musicinfo='playerctl metadata --format "{{title}} - {{artist}}"'
alias ytspamblock='./ytspamblockpy.sh'
alias netcheck='ping google.com'
alias train='sl '
alias keys='nvim ~/dotfiles/hypr/conf/keybindings/default.conf'
alias autostart='nvim ~/dotfiles/hypr/conf/autostart.conf'
alias wbm='nvim ~/dotfiles/waybar/modules.json'
alias wbw='nvim ~/dotfiles/waybar/themes/ml4w-blur/config'
alias wbws='nvim ~/dotfiles/waybar/themes/ml4w-blur/style.css'
alias unlock='sudo rm /var/lib/pacman/db.lck' # remove pacman lock
alias orphan='sudo pacman -Rns $(pacman -Qtdq)' # remove orphaned packages (DANGEROUS!)
alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist"
alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist"
alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist"
alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash' # PRANK!
alias killvim='killall nvim && pkill nvim && pkill neovim && killall neovim && pkill vim && killall vim'
alias gupd='cdls dotfiles/ && ./syncupdate.sh' # Update my dotfiles on github
# -----------------------------------------------------
# ALIASES
# -----------------------------------------------------
alias c='clear'
alias nf='fastfetch'
alias pf='fastfetch'
alias ff='fastfetch'
alias ls='eza -a --icons'
alias ll='eza -al --icons'
alias lt='eza -a --tree --level=1 --icons'
alias shutdown='systemctl poweroff'
alias v='$EDITOR'
alias vim='$EDITOR'
alias ts='~/dotfiles/scripts/snapshot.sh'
alias matrix='cmatrix'
alias wifi='nmtui'
alias od='~/private/onedrive.sh'
alias rw='~/dotfiles/waybar/reload.sh'
alias winclass="xprop | grep 'CLASS'"
alias dot="cd ~/dotfiles/"
alias cleanup='~/dotfiles/scripts/cleanup.sh'
# -----------------------------------------------------
# ML4W Apps
# -----------------------------------------------------
alias ml4w='~/dotfiles/apps/ML4W_Welcome-x86_64.AppImage'
alias ml4w-settings='~/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage'
alias ml4w-sidebar='~/dotfiles/eww/ml4w-sidebar/launch.sh'
alias ml4w-hyprland='~/dotfiles/apps/ML4W_Hyprland_Settings-x86_64.AppImage'
alias ml4w-diagnosis='~/dotfiles/hypr/scripts/diagnosis.sh'
alias ml4w-hyprland-diagnosis='~/dotfiles/hypr/scripts/diagnosis.sh'
alias ml4w-qtile-diagnosis='~/dotfiles/qtile/scripts/diagnosis.sh'
# -----------------------------------------------------
# Window Managers
# -----------------------------------------------------
alias Qtile='startx'
# Hyprland with Hyprland
# -----------------------------------------------------
# GIT
# -----------------------------------------------------
alias gs="git status"
alias ga="git add"
alias gc="git commit -m"
alias gp="git push"
alias gpl="git pull"
alias gst="git stash"
alias gsp="git stash; git pull"
alias gcheck="git checkout"
alias gcredential="git config credential.helper store"
# -----------------------------------------------------
# SCRIPTS
# -----------------------------------------------------
alias gr='python ~/dotfiles/scripts/growthrate.py'
alias ChatGPT='python ~/mychatgpt/mychatgpt.py'
alias chat='python ~/mychatgpt/mychatgpt.py'
alias ascii='~/dotfiles/scripts/figlet.sh'
# -----------------------------------------------------
# VIRTUAL MACHINE
# -----------------------------------------------------
alias vm='~/private/launchvm.sh'
alias lg='~/dotfiles/scripts/looking-glass.sh'
# -----------------------------------------------------
# EDIT CONFIG FILES
# -----------------------------------------------------
alias confq='$EDITOR ~/dotfiles/qtile/config.py'
alias confp='$EDITOR ~/dotfiles/picom/picom.conf'
alias confb='$EDITOR ~/dotfiles/.bashrc'
# -----------------------------------------------------
# EDIT NOTES
# -----------------------------------------------------
alias notes='$EDITOR ~/notes.txt'
# -----------------------------------------------------
# SYSTEM
# -----------------------------------------------------
alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
alias setkb='setxkbmap de;echo "Keyboard set back to de."'
# -----------------------------------------------------
# SCREEN RESOLUTINS
# -----------------------------------------------------
# Qtile
alias res1='xrandr --output DisplayPort-0 --mode 2560x1440 --rate 120'
alias res2='xrandr --output DisplayPort-0 --mode 1920x1080 --rate 120'
export PATH="/usr/lib/ccache/bin/:$PATH"
# -----------------------------------------------------
# DEVELOPMENT
# -----------------------------------------------------
alias dotsync="~/dotfiles-versions/dotfiles/.dev/sync.sh dotfiles"
# -----------------------------------------------------------------------------------------------------------
# PUT CD AND LS or (EZA) TOGETHER (LITERALLY A NO BRAINER THING TO KEEP 'cd "xyz"' as 'cd "xyz" && ls "xyz"')
# -----------------------------------------------------------------------------------------------------------
cdls() {
local dir="$1"
local dir="${dir:=$HOME}"
if [[ -d "$dir" ]]; then
cd "$dir" >/dev/null && eza -a --icons # Alternatively you can do ls --color=auto. After removing the 'ls' alias
else
echo "bash: cdls: $dir: Directory not found"
fi
}
# -----------------------------------------------------
# START STARSHIP
# -----------------------------------------------------
eval "$(starship init bash)"
# -----------------------------------------------------
# PYWAL
# -----------------------------------------------------
cat ~/.cache/wal/sequences
# -----------------------------------------------------
# Fastfetch if on wm
# -----------------------------------------------------
if [[ $(tty) == *"pts"* ]]; then
fastfetch --config examples/22 && cd
else
echo
if [ -f /bin/qtile ]; then
echo "Start Qtile X11 with command Qtile"
fi
if [ -f /bin/hyprctl ]; then
echo "Start Hyprland with command Hyprland"
fi
fi
export EDITOR=nvim