dev: automated commit - 2025-05-31 15:50:49
This commit is contained in:
parent
6629b42952
commit
9076125efa
7 changed files with 62 additions and 54 deletions
|
@ -59,8 +59,8 @@
|
|||
plain = blue
|
||||
|
||||
[interactive]
|
||||
diffFilter = diff-so-fancy --patch
|
||||
signlekey = true
|
||||
; diffFilter = diff-so-fancy --patch
|
||||
singlekey = true
|
||||
|
||||
[credential]
|
||||
helper = /usr/lib/git-core/git-credential-libsecret
|
||||
|
@ -77,8 +77,8 @@
|
|||
renames = copies
|
||||
interHunkContext = 10
|
||||
|
||||
[pager]
|
||||
pager = diff-so-fancy | $PAGER
|
||||
; [pager]
|
||||
; pager = diff-so-fancy | less --tabs=4 -RF
|
||||
|
||||
[diff-so-fancy]
|
||||
markEmptyLines = false
|
||||
|
|
|
@ -10,8 +10,10 @@
|
|||
o = checkout
|
||||
p = pull
|
||||
r = restore
|
||||
cleanout = restore
|
||||
rs = restore --staged
|
||||
s = status
|
||||
ush = push
|
||||
|
||||
# Frequently used commands
|
||||
aa = add --all
|
||||
|
|
|
@ -2,35 +2,35 @@
|
|||
|
||||
# Make sure we're running as root or with sudo
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
gum style --foreground 196 --bold "This script must be run as root or with sudo"
|
||||
exit 1
|
||||
gum style --foreground 196 --bold "This script must be run as root or with sudo"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if gum is installed
|
||||
if ! command -v gum &>/dev/null; then
|
||||
echo "This script uses gum for a nice interface."
|
||||
echo "Please install gum first: pacman -S gum"
|
||||
exit 1
|
||||
echo "This script uses gum for a nice interface."
|
||||
echo "Please install gum first: pacman -S gum"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Function to print section headers
|
||||
print_section() {
|
||||
gum style --border normal --border-foreground 39 --margin "1" --padding "0 2" --bold "$1"
|
||||
gum style --border normal --border-foreground 39 --margin "1" --padding "0 2" --bold "$1"
|
||||
}
|
||||
|
||||
# Function to print tasks
|
||||
print_task() {
|
||||
echo "→ $1..."
|
||||
echo "→ $1..."
|
||||
}
|
||||
|
||||
# Function to print success messages
|
||||
print_success() {
|
||||
gum style --foreground 46 "✓ $1"
|
||||
gum style --foreground 46 "✓ $1"
|
||||
}
|
||||
|
||||
# Function to print warning messages
|
||||
print_warning() {
|
||||
gum style --foreground 226 "⚠ $1"
|
||||
gum style --foreground 226 "⚠ $1"
|
||||
}
|
||||
|
||||
# Starting message
|
||||
|
@ -55,11 +55,11 @@ print_success "Pacman cache cleaned"
|
|||
|
||||
# Clean AUR cache if paru is installed
|
||||
if command -v paru &>/dev/null; then
|
||||
print_task "Cleaning paru cache"
|
||||
paru -Sc --noconfirm
|
||||
print_success "Paru cache cleaned"
|
||||
print_task "Cleaning paru cache"
|
||||
paru -Sc --noconfirm
|
||||
print_success "Paru cache cleaned"
|
||||
else
|
||||
print_warning "paru not found. Skipping AUR cache cleanup."
|
||||
print_warning "paru not found. Skipping AUR cache cleanup."
|
||||
fi
|
||||
|
||||
# Remove orphaned packages
|
||||
|
@ -67,14 +67,14 @@ print_section "Removing Orphaned Packages"
|
|||
print_task "Finding orphaned packages"
|
||||
ORPHANS=$(pacman -Qtdq)
|
||||
if [ -n "$ORPHANS" ]; then
|
||||
echo "Found orphaned packages:"
|
||||
echo "$ORPHANS"
|
||||
echo "Found orphaned packages:"
|
||||
echo "$ORPHANS"
|
||||
|
||||
print_task "Removing orphaned packages"
|
||||
pacman -Rns $(pacman -Qtdq) --noconfirm
|
||||
print_success "Orphaned packages removed"
|
||||
print_task "Removing orphaned packages"
|
||||
pacman -Rns $(pacman -Qtdq) --noconfirm
|
||||
print_success "Orphaned packages removed"
|
||||
else
|
||||
print_success "No orphaned packages found"
|
||||
print_success "No orphaned packages found"
|
||||
fi
|
||||
|
||||
# # Clean user cache directory
|
||||
|
@ -144,8 +144,8 @@ print_section "Resetting Failed Systemd Units"
|
|||
print_task "Checking for failed systemd units"
|
||||
FAILED_UNITS=$(systemctl --failed --no-legend | awk '{print $1}')
|
||||
if [ -n "$FAILED_UNITS" ]; then
|
||||
echo "Failed units found:"
|
||||
echo "$FAILED_UNITS"
|
||||
echo "Failed units found:"
|
||||
echo "$FAILED_UNITS"
|
||||
fi
|
||||
print_task "Clearing failed systemd units"
|
||||
systemctl reset-failed
|
||||
|
@ -160,11 +160,11 @@ print_success "Temporary files removed"
|
|||
# Update file database
|
||||
print_section "Updating File Database"
|
||||
if command -v updatedb &>/dev/null; then
|
||||
print_task "Updating file database for locate command"
|
||||
updatedb
|
||||
print_success "File database updated"
|
||||
print_task "Updating file database for locate command"
|
||||
updatedb
|
||||
print_success "File database updated"
|
||||
else
|
||||
print_warning "updatedb not found. Skipping file database update."
|
||||
print_warning "updatedb not found. Skipping file database update."
|
||||
fi
|
||||
|
||||
# Check for and install security updates
|
||||
|
@ -172,24 +172,24 @@ print_section "Security Updates Check"
|
|||
print_task "Checking for security updates"
|
||||
SECURITY_UPDATES=$(pacman -Qu | grep -i "security")
|
||||
if [ -n "$SECURITY_UPDATES" ]; then
|
||||
echo "Security updates available:"
|
||||
echo "$SECURITY_UPDATES"
|
||||
echo "Security updates available:"
|
||||
echo "$SECURITY_UPDATES"
|
||||
|
||||
print_task "Installing security updates"
|
||||
pacman -S --needed $(echo "$SECURITY_UPDATES" | awk '{print $1}') --noconfirm
|
||||
print_success "Security updates installed"
|
||||
print_task "Installing security updates"
|
||||
pacman -S --needed $(echo "$SECURITY_UPDATES" | awk '{print $1}') --noconfirm
|
||||
print_success "Security updates installed"
|
||||
else
|
||||
print_success "No security updates needed"
|
||||
print_success "No security updates needed"
|
||||
fi
|
||||
|
||||
# Check for pacman database errors
|
||||
print_section "Checking Pacman Database"
|
||||
print_task "Verifying package database integrity"
|
||||
if command -v paccheck &>/dev/null; then
|
||||
paccheck --md5sum --quiet
|
||||
print_success "Pacman database check complete"
|
||||
paccheck --md5sum --quiet
|
||||
print_success "Pacman database check complete"
|
||||
else
|
||||
print_warning "paccheck not found. Consider installing pacutils package."
|
||||
print_warning "paccheck not found. Consider installing pacutils package."
|
||||
fi
|
||||
|
||||
# Cleanup pacnew/pacsave files
|
||||
|
@ -197,13 +197,13 @@ print_section "Configuration File Management"
|
|||
print_task "Checking for .pacnew and .pacsave files"
|
||||
PACFILES=$(find /etc -name "*.pacnew" -o -name "*.pacsave" 2>/dev/null)
|
||||
if [ -n "$PACFILES" ]; then
|
||||
echo "Found the following .pacnew/.pacsave files:"
|
||||
echo "$PACFILES"
|
||||
echo "Found the following .pacnew/.pacsave files:"
|
||||
echo "$PACFILES"
|
||||
|
||||
print_warning "You may want to merge these configuration files"
|
||||
echo "Use 'pacdiff' to help manage these files (install pacdiff from pacman-contrib)"
|
||||
print_warning "You may want to merge these configuration files"
|
||||
echo "Use 'pacdiff' to help manage these files (install pacdiff from pacman-contrib)"
|
||||
else
|
||||
print_success "No .pacnew or .pacsave files found"
|
||||
print_success "No .pacnew or .pacsave files found"
|
||||
fi
|
||||
|
||||
# System status
|
||||
|
@ -211,11 +211,11 @@ print_section "System Status"
|
|||
|
||||
# Disk usage with duf
|
||||
print_task "Checking disk usage"
|
||||
if command -v duf &>/dev/null; then
|
||||
duf --only local
|
||||
if command -v dysk &>/dev/null; then
|
||||
dysk
|
||||
else
|
||||
print_warning "duf not found. Using df instead. Consider installing duf for better disk usage display."
|
||||
df -h | grep -v "tmpfs" | grep -v "udev"
|
||||
print_warning "duf not found. Using df instead. Consider installing duf for better disk usage display."
|
||||
df -h | grep -v "tmpfs" | grep -v "udev"
|
||||
fi
|
||||
|
||||
# Memory usage
|
||||
|
|
|
@ -10,6 +10,8 @@ node = "20"
|
|||
dotnet-core = "8.0.401"
|
||||
bun = "1.2.4"
|
||||
go = "1.24.1"
|
||||
ruby = "3.2"
|
||||
caddy = "latest"
|
||||
|
||||
[settings]
|
||||
# plugins can read the versions files used by other version managers (if enabled by the plugin)
|
||||
|
|
|
@ -19,7 +19,8 @@ alias vairix='cd ~/Development/vairix'
|
|||
alias seekr='cd ~/Development/seekr'
|
||||
|
||||
# File operations/utilities
|
||||
alias df="duf"
|
||||
# alias df="duf"
|
||||
alias df="dysk"
|
||||
alias mkdir="mkdir -pv"
|
||||
alias chmox="chmod +x"
|
||||
alias lf="yazi"
|
||||
|
@ -92,3 +93,6 @@ fi
|
|||
|
||||
alias la='ll -a'
|
||||
alias tree='ll --tree --level=2'
|
||||
|
||||
|
||||
alias valheim="cd ~/.config/r2modmanPlus-local/Valheim/profiles/Default/ && ./start_server_bepinex.sh"
|
||||
|
|
|
@ -299,12 +299,12 @@ if command -v bombadil &> /dev/null; then eval "$(bombadil generate-completions
|
|||
if command -v eza &> /dev/null; then compdef eza=ls; fi
|
||||
|
||||
# ALIASES
|
||||
yarn() { echo 🖕; }
|
||||
yarnpkg() { echo 🖕; }
|
||||
pnpm() { echo 🖕; }
|
||||
pn() { echo 🖕; }
|
||||
pnpx() { echo 🖕; }
|
||||
npm() { echo 🖕; }
|
||||
# yarn() { echo 🖕; }
|
||||
# yarnpkg() { echo 🖕; }
|
||||
# pnpm() { echo 🖕; }
|
||||
# pn() { echo 🖕; }
|
||||
# pnpx() { echo 🖕; }
|
||||
# npm() { echo 🖕; }
|
||||
|
||||
alias p='_package_manager'
|
||||
alias fo='fopen'
|
||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue