Skip to content

Commit 477eaa1

Browse files
Merge pull request #142 from StrangeRanger/dependabot/submodules/submodules/dotfiles-5078327
[Submodule Update]: Bump submodules/dotfiles from `68efc86` to `5078327`
2 parents 6b2f003 + f44324e commit 477eaa1

File tree

6 files changed

+309
-226
lines changed

6 files changed

+309
-226
lines changed

CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@ Entries under the **Removed** section indicate items removed from the entire doc
1010

1111
## Unreleased
1212

13+
## 2025-03-24
14+
15+
### Changed
16+
17+
- changed(style/alias): modify format and style of comments and aliases
18+
- changed(function): implement functions for update aliases
19+
- changed(function): Update the description of the functions
20+
- changed(alias): update the style and seperation of aliases
21+
22+
### Fixed
23+
24+
- fixed(white-space): remove extra blank line
25+
26+
### Added
27+
28+
- added(alias): add section for functions to improve alias functionality
29+
- added(alias): alias restarts the Core Auido Process (can resolve audio issues)
30+
1331
## 2025-03-17
1432

1533
### Changed

includes/zshrc-files/zshrc-linux-snippet.zsh

+23-52
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# --8<-- [start:user_config]
2-
####[ Aliases ]#########################################################################
2+
####[ Aliases ]#############################################################################
33

44

55
###
@@ -8,68 +8,39 @@
88

99
## General aliases.
1010
alias zls="eza"
11-
alias formatc="find . -name '*.cs' -type f -exec clang-format --style='file:$HOME/Programs/Mine/Formatter Configs/CSharp_clang-format/_clang-format' -i {} +"
12-
alias update-grub-config="sudo grub-mkconfig -o /boot/grub/grub.cfg"
13-
alias deletelocalbranches="git branch | grep -v 'main' | xargs git branch -D"
1411
hash xdg-open 2>/dev/null && alias open="xdg-open"
1512

13+
## Configuration related aliases.
14+
alias update_grub_config="sudo grub-mkconfig -o /boot/grub/grub.cfg"
15+
16+
## File action related aliases.
17+
alias format_csharp_code="find . -name '*.cs' -type f -exec clang-format --style='file:$HOME/Programs/Mine/Formatter Configs/CSharp_clang-format/_clang-format' -i {} +"
18+
alias delete_local_git_branches="git branch | grep -v 'main' | xargs git branch -D"
19+
1620
## Update based aliases.
17-
alias updateapt="sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt autoclean"
18-
alias updatepacman="sudo pacman -Syu && yay && yay -Yc && sudo pkgfile -u && update-grub-config"
21+
alias update_apt="apt_update_and_cleanup"
22+
alias update_pacman="pacman_update_and_cleanup"
1923

2024
## Systemd aliases.
21-
alias start-bluetooth="sudo systemctl start bluetooth.service"
22-
alias stop-bluetooth="sudo systemctl stop bluetooth.service"
23-
alias start-firewalld="sudo systemctl start firewalld.service"
24-
alias stop-firewalld="sudo systemctl stop firewalld.service"
25-
alias start-docker="sudo systemctl start docker.service containerd.service"
26-
alias stop-docker="sudo systemctl stop docker.socket docker.service containerd.service"
25+
alias start_bluetooth="sudo systemctl start bluetooth.service"
26+
alias stop_bluetooth="sudo systemctl stop bluetooth.service"
27+
alias start_firewalld="sudo systemctl start firewalld.service"
28+
alias stop_firewalld="sudo systemctl stop firewalld.service"
29+
alias start_docker="sudo systemctl start docker.service containerd.service"
30+
alias stop_docker="sudo systemctl stop docker.socket docker.service containerd.service"
2731

2832
###
2933
### [ Group 2 ]
3034
###
31-
### Due to the number of commands that I find to be useful, I've created aliases
32-
### containing some of these commands. They are specifically commands that I don't
33-
### often use, but are useful to have on hand. Having these aliases allows me to see
34-
### a list of these commands, without having to commit them to memory.
35+
### Due to the number of commands that I find to be useful, I've created aliases containing
36+
### some of these commands. They are specifically commands that I don't often use, but are
37+
### useful to have on hand. Having these aliases allows me to see a list of these commands,
38+
### without having to commit them to memory.
3539
###
3640

37-
alias lt="echo -e \"
38-
####[ Installed Commands ]##############################################################
39-
40-
bandwhich - Terminal bandwidth utilization tool.
41-
bat - A cat(1) clone with wings.
42-
cheat - Allows you to create and view interactive cheatsheets on the command-line.
43-
codespell - Check code for common misspellings.
44-
duf - Disk Usage/Free Utility - a better 'df' alternative.
45-
fzf - A command-line fuzzy finder.
46-
ncdu - ncdu (NCurses Disk Usage) is a curses-based version of the well-known 'du'.
47-
pstree - List processes as a tree.
48-
tmux - Terminal multiplexer.
49-
50-
####[[ Grouped Commands ]]##############################################################
51-
52-
lt_conversion - List of programs used for converting the formats of videos, images, etc.
53-
lt_git - List of programs used for git related commands.
54-
55-
56-
####[ Keyboard Combinations ]###########################################################
57-
58-
Ctrl + O - Allows you to copy what you are currently typing, via 'Ctrl' + 'O'.
59-
\""
60-
alias lt_conversion="echo -e \"
61-
####[ Image and Video Formatters ]######################################################
62-
63-
ffmpeg - FFmpeg is a collection of libraries and tools to process multimedia content.
64-
magick - Convert between image formats as well as resize an image, blur, crop,
65-
despeckle, dither, draw on, flip, join, re-sample, and much more.
66-
\""
67-
alias lt_git="echo -e \"
68-
####[ Git Related Commands ]############################################################
69-
70-
lazygit - Simple terminal UI for git commands.
71-
git open - Opens the GitHub page for a repo/branch in your browser.
72-
\""
41+
alias lt="alias_lt"
42+
alias lt_conversion="alias_lt_conversion"
43+
alias lt_git="alias_lt_git"
7344

7445

7546
# --8<-- [end:user_config]

includes/zshrc-files/zshrc-linux.zsh

+130-67
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
####[ Oh-My-Zsh Configurations ]########################################################
1+
####[ Oh-My-Zsh Configurations ]############################################################
22

33

44
# Path to your oh-my-zsh installation.
@@ -43,9 +43,9 @@ HIST_STAMPS="yyyy-mm-dd"
4343
plugins=(colored-man-pages command-not-found) # Server
4444

4545

46-
####[ Pre `compinit` ]##################################################################
47-
#### These are configurations that have to be set before the `compinit` function is
48-
#### called, which is done when sourcing the 'oh-my-zsh.sh' file.
46+
####[ Pre `compinit` ]######################################################################
47+
#### These are configurations that have to be set before the `compinit` function is called,
48+
#### which is done when sourcing the 'oh-my-zsh.sh' file.
4949

5050

5151
## Zsh plugin for completions.
@@ -58,86 +58,149 @@ zsh_completion="${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completio
5858
[[ -f ~/.zfunc/_rustup ]] && fpath+=~/.zfunc
5959

6060

61-
####[ Source Oh-My-Zsh ]################################################################
62-
63-
64-
source "$ZSH/oh-my-zsh.sh"
65-
66-
67-
####[ Aliases ]#########################################################################
68-
61+
####[ Resource File - Functions ]###########################################################
62+
63+
64+
####
65+
# Perform the update, upgrade, and cleanup of packages managed by the Apt Package Manager.
66+
apt_update_and_cleanup() {
67+
echo "[INFO] Executing: $ sudo apt update"
68+
sudo apt update
69+
echo "[INFO] Executing: $ sudo apt upgrade -y"
70+
sudo apt upgrade -y
71+
echo "[INFO] Executing: $ sudo apt autoremove -y"
72+
sudo apt autoremove -y
73+
echo "[INFO] Executing: $ sudo apt autoclean"
74+
sudo apt autoclean
75+
}
76+
77+
####
78+
# Perform the update, upgrade, and cleanup of packages managed by Pacman. Additionally, GRUB
79+
# configurations are updated to include snapshot changes.
80+
pacman_update_and_cleanup() {
81+
echo "[INFO] Executing: $ sudo pacman -Syu"
82+
sudo pacman -Syu
83+
echo "[INFO] Executing: $ yay && yay -Yc"
84+
yay && yay -Yc
85+
echo "[INFO] Executing: $ sudo pkgfile -u"
86+
sudo pkgfile -u
87+
echo "[INFO] Executing: $ UpdateGrubConfigs"
88+
sudo grub-mkconfig -o /boot/grub/grub.cfg
89+
}
6990

7091
###
71-
### [ Group 1 ]
92+
### [ Alias Related Functions ]
7293
###
7394

74-
## General aliases.
75-
alias zls="eza"
76-
alias formatc="find . -name '*.cs' -type f -exec clang-format --style='file:$HOME/Programs/Mine/Formatter Configs/CSharp_clang-format/_clang-format' -i {} +"
77-
alias update-grub-config="sudo grub-mkconfig -o /boot/grub/grub.cfg"
78-
alias deletelocalbranches="git branch | grep -v 'main' | xargs git branch -D"
79-
hash xdg-open 2>/dev/null && alias open="xdg-open"
80-
81-
## Update based aliases.
82-
alias updateapt="sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt autoclean"
83-
alias updatepacman="sudo pacman -Syu && yay && yay -Yc && sudo pkgfile -u && update-grub-config"
84-
85-
## Systemd aliases.
86-
alias start-bluetooth="sudo systemctl start bluetooth.service"
87-
alias stop-bluetooth="sudo systemctl stop bluetooth.service"
88-
alias start-firewalld="sudo systemctl start firewalld.service"
89-
alias stop-firewalld="sudo systemctl stop firewalld.service"
90-
alias start-docker="sudo systemctl start docker.service containerd.service"
91-
alias stop-docker="sudo systemctl stop docker.socket docker.service containerd.service"
92-
93-
###
94-
### [ Group 2 ]
95-
###
96-
### Due to the number of commands that I find to be useful, I've created aliases
97-
### containing some of these commands. They are specifically commands that I don't
98-
### often use, but are useful to have on hand. Having these aliases allows me to see
99-
### a list of these commands, without having to commit them to memory.
100-
###
101-
102-
alias lt="echo -e \"
103-
####[ Installed Commands ]##############################################################
95+
####
96+
# List of Aliases
97+
alias_lt() {
98+
cat <<EOF
99+
####[ Installed Commands ]######################################################
104100
105101
bandwhich - Terminal bandwidth utilization tool.
106102
bat - A cat(1) clone with wings.
107-
cheat - Allows you to create and view interactive cheatsheets on the command-line.
103+
cheat - Allows you to create and view interactive cheatsheets on the
104+
command-line.
108105
codespell - Check code for common misspellings.
109106
duf - Disk Usage/Free Utility - a better 'df' alternative.
110107
fzf - A command-line fuzzy finder.
111-
ncdu - ncdu (NCurses Disk Usage) is a curses-based version of the well-known 'du'.
108+
ncdu - ncdu (NCurses Disk Usage) is a curses-based version of the
109+
well-known 'du'.
112110
pstree - List processes as a tree.
113111
tmux - Terminal multiplexer.
114112
115-
####[[ Grouped Commands ]]##############################################################
113+
###
114+
### [ Grouped Commands ]
115+
###
116116
117-
lt_conversion - List of programs used for converting the formats of videos, images, etc.
117+
lt_conversion - List of programs used for converting the formats of videos,
118+
images, etc.
118119
lt_git - List of programs used for git related commands.
119120
120121
121-
####[ Keyboard Combinations ]###########################################################
122+
####[ Keyboard Combinations ]###################################################
122123
123124
Ctrl + O - Allows you to copy what you are currently typing, via 'Ctrl' + 'O'.
124-
\""
125-
alias lt_conversion="echo -e \"
126-
####[ Image and Video Formatters ]######################################################
125+
EOF
126+
}
127+
128+
####
129+
# Image and Video Formatters
130+
alias_lt_conversion() {
131+
cat <<EOF
132+
####[ Image and Video Formatters ]##############################################
127133
128-
ffmpeg - FFmpeg is a collection of libraries and tools to process multimedia content.
134+
ffmpeg - FFmpeg is a collection of libraries and tools to process multimedia
135+
content.
129136
magick - Convert between image formats as well as resize an image, blur, crop,
130137
despeckle, dither, draw on, flip, join, re-sample, and much more.
131-
\""
132-
alias lt_git="echo -e \"
133-
####[ Git Related Commands ]############################################################
138+
EOF
139+
}
140+
141+
####
142+
# Git Related Commands
143+
alias_lt_git() {
144+
cat <<EOF
145+
####[ Git Related Commands ]####################################################
134146
135147
lazygit - Simple terminal UI for git commands.
136148
git open - Opens the GitHub page for a repo/branch in your browser.
137-
\""
149+
EOF
150+
}
138151

139152

140-
####[ Environmental Variables ]#########################################################
153+
####[ Source Oh-My-Zsh ]####################################################################
154+
155+
156+
source "$ZSH/oh-my-zsh.sh"
157+
158+
159+
####[ Aliases ]#############################################################################
160+
161+
162+
###
163+
### [ Group 1 ]
164+
###
165+
166+
## General aliases.
167+
alias zls="eza"
168+
hash xdg-open 2>/dev/null && alias open="xdg-open"
169+
170+
## Configuration related aliases.
171+
alias update_grub_config="sudo grub-mkconfig -o /boot/grub/grub.cfg"
172+
173+
## File action related aliases.
174+
alias format_csharp_code="find . -name '*.cs' -type f -exec clang-format --style='file:$HOME/Programs/Mine/Formatter Configs/CSharp_clang-format/_clang-format' -i {} +"
175+
alias delete_local_git_branches="git branch | grep -v 'main' | xargs git branch -D"
176+
177+
## Update based aliases.
178+
alias update_apt="apt_update_and_cleanup"
179+
alias update_pacman="pacman_update_and_cleanup"
180+
181+
## Systemd aliases.
182+
alias start_bluetooth="sudo systemctl start bluetooth.service"
183+
alias stop_bluetooth="sudo systemctl stop bluetooth.service"
184+
alias start_firewalld="sudo systemctl start firewalld.service"
185+
alias stop_firewalld="sudo systemctl stop firewalld.service"
186+
alias start_docker="sudo systemctl start docker.service containerd.service"
187+
alias stop_docker="sudo systemctl stop docker.socket docker.service containerd.service"
188+
189+
###
190+
### [ Group 2 ]
191+
###
192+
### Due to the number of commands that I find to be useful, I've created aliases containing
193+
### some of these commands. They are specifically commands that I don't often use, but are
194+
### useful to have on hand. Having these aliases allows me to see a list of these commands,
195+
### without having to commit them to memory.
196+
###
197+
198+
alias lt="alias_lt"
199+
alias lt_conversion="alias_lt_conversion"
200+
alias lt_git="alias_lt_git"
201+
202+
203+
####[ Environmental Variables ]#############################################################
141204

142205

143206
# 1Password auth socket.
@@ -166,7 +229,7 @@ fi
166229
export NVM_DIR="$HOME/.nvm"
167230

168231

169-
####[ Sourced Files ]###################################################################
232+
####[ Sourced Files ]#######################################################################
170233

171234

172235
## Load NVM.
@@ -186,18 +249,19 @@ zsh_autosuggestions="${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggesti
186249
## Zsh plugin for fzf-tab.
187250
## This plugin is installed via chezmoi, specified in the '.chezmoiexternal.toml' file.
188251
fzf_tab="${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab/fzf-tab.plugin.zsh"
189-
[[ -f $fzf_tab ]] && hash fzf 2>/dev/null && source "$fzf_tab"
252+
[[ -f $fzf_tab ]] \
253+
&& hash fzf 2>/dev/null \
254+
&& source "$fzf_tab"
190255

191256
## Source the plugins.sh file for the `op` command.
192-
[[ -f $HOME/.config/op/plugins.sh ]] \
193-
&& source "$HOME/.config/op/plugins.sh"
257+
[[ -f $HOME/.config/op/plugins.sh ]] && source "$HOME/.config/op/plugins.sh"
194258

195259
## Make the 'command-not-found' functionality available.
196260
[[ -f /usr/share/doc/pkgfile/command-not-found.zsh ]] \
197261
&& source /usr/share/doc/pkgfile/command-not-found.zsh
198262

199263

200-
####[ Zsh Style Configurations ]########################################################
264+
####[ Zsh Style Configurations ]############################################################
201265

202266

203267
# Disable sort when completing `git checkout`.
@@ -214,9 +278,9 @@ hash eza 2>/dev/null \
214278
zstyle ':fzf-tab:*' switch-group '<' '>'
215279

216280

217-
####[ End of File Configurations ]######################################################
218-
#### These are configurations that are specified to be placed at the end of the file, by
219-
#### the developer/documentation.
281+
####[ End of File Configurations ]##########################################################
282+
#### These are configurations that are specified to be placed at the end of the file, by the
283+
#### developer/documentation.
220284

221285

222286
# Initialize Starship prompt, if it is installed and $ZSH_THEME is not set.
@@ -225,6 +289,5 @@ hash starship 2>/dev/null \
225289
&& eval "$(starship init zsh)"
226290

227291

228-
####[ Others ]##########################################################################
292+
####[ Others ]##############################################################################
229293
#### These are generally configurations set up by setup scripts or other programs.
230-

0 commit comments

Comments
 (0)