dev: automated commit - 2025-05-31 15:50:49

This commit is contained in:
Mariano Z. 2025-05-31 15:50:49 -03:00
parent 6629b42952
commit 9076125efa
7 changed files with 62 additions and 54 deletions

View file

@ -59,8 +59,8 @@
plain = blue plain = blue
[interactive] [interactive]
diffFilter = diff-so-fancy --patch ; diffFilter = diff-so-fancy --patch
signlekey = true singlekey = true
[credential] [credential]
helper = /usr/lib/git-core/git-credential-libsecret helper = /usr/lib/git-core/git-credential-libsecret
@ -77,8 +77,8 @@
renames = copies renames = copies
interHunkContext = 10 interHunkContext = 10
[pager] ; [pager]
pager = diff-so-fancy | $PAGER ; pager = diff-so-fancy | less --tabs=4 -RF
[diff-so-fancy] [diff-so-fancy]
markEmptyLines = false markEmptyLines = false

View file

@ -10,8 +10,10 @@
o = checkout o = checkout
p = pull p = pull
r = restore r = restore
cleanout = restore
rs = restore --staged rs = restore --staged
s = status s = status
ush = push
# Frequently used commands # Frequently used commands
aa = add --all aa = add --all

View file

@ -2,35 +2,35 @@
# Make sure we're running as root or with sudo # Make sure we're running as root or with sudo
if [ "$(id -u)" -ne 0 ]; then if [ "$(id -u)" -ne 0 ]; then
gum style --foreground 196 --bold "This script must be run as root or with sudo" gum style --foreground 196 --bold "This script must be run as root or with sudo"
exit 1 exit 1
fi fi
# Check if gum is installed # Check if gum is installed
if ! command -v gum &>/dev/null; then if ! command -v gum &>/dev/null; then
echo "This script uses gum for a nice interface." echo "This script uses gum for a nice interface."
echo "Please install gum first: pacman -S gum" echo "Please install gum first: pacman -S gum"
exit 1 exit 1
fi fi
# Function to print section headers # Function to print section headers
print_section() { 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 # Function to print tasks
print_task() { print_task() {
echo "$1..." echo "$1..."
} }
# Function to print success messages # Function to print success messages
print_success() { print_success() {
gum style --foreground 46 "$1" gum style --foreground 46 "$1"
} }
# Function to print warning messages # Function to print warning messages
print_warning() { print_warning() {
gum style --foreground 226 "$1" gum style --foreground 226 "$1"
} }
# Starting message # Starting message
@ -55,11 +55,11 @@ print_success "Pacman cache cleaned"
# Clean AUR cache if paru is installed # Clean AUR cache if paru is installed
if command -v paru &>/dev/null; then if command -v paru &>/dev/null; then
print_task "Cleaning paru cache" print_task "Cleaning paru cache"
paru -Sc --noconfirm paru -Sc --noconfirm
print_success "Paru cache cleaned" print_success "Paru cache cleaned"
else else
print_warning "paru not found. Skipping AUR cache cleanup." print_warning "paru not found. Skipping AUR cache cleanup."
fi fi
# Remove orphaned packages # Remove orphaned packages
@ -67,14 +67,14 @@ print_section "Removing Orphaned Packages"
print_task "Finding orphaned packages" print_task "Finding orphaned packages"
ORPHANS=$(pacman -Qtdq) ORPHANS=$(pacman -Qtdq)
if [ -n "$ORPHANS" ]; then if [ -n "$ORPHANS" ]; then
echo "Found orphaned packages:" echo "Found orphaned packages:"
echo "$ORPHANS" echo "$ORPHANS"
print_task "Removing orphaned packages" print_task "Removing orphaned packages"
pacman -Rns $(pacman -Qtdq) --noconfirm pacman -Rns $(pacman -Qtdq) --noconfirm
print_success "Orphaned packages removed" print_success "Orphaned packages removed"
else else
print_success "No orphaned packages found" print_success "No orphaned packages found"
fi fi
# # Clean user cache directory # # Clean user cache directory
@ -144,8 +144,8 @@ print_section "Resetting Failed Systemd Units"
print_task "Checking for failed systemd units" print_task "Checking for failed systemd units"
FAILED_UNITS=$(systemctl --failed --no-legend | awk '{print $1}') FAILED_UNITS=$(systemctl --failed --no-legend | awk '{print $1}')
if [ -n "$FAILED_UNITS" ]; then if [ -n "$FAILED_UNITS" ]; then
echo "Failed units found:" echo "Failed units found:"
echo "$FAILED_UNITS" echo "$FAILED_UNITS"
fi fi
print_task "Clearing failed systemd units" print_task "Clearing failed systemd units"
systemctl reset-failed systemctl reset-failed
@ -160,11 +160,11 @@ print_success "Temporary files removed"
# Update file database # Update file database
print_section "Updating File Database" print_section "Updating File Database"
if command -v updatedb &>/dev/null; then if command -v updatedb &>/dev/null; then
print_task "Updating file database for locate command" print_task "Updating file database for locate command"
updatedb updatedb
print_success "File database updated" print_success "File database updated"
else else
print_warning "updatedb not found. Skipping file database update." print_warning "updatedb not found. Skipping file database update."
fi fi
# Check for and install security updates # Check for and install security updates
@ -172,24 +172,24 @@ print_section "Security Updates Check"
print_task "Checking for security updates" print_task "Checking for security updates"
SECURITY_UPDATES=$(pacman -Qu | grep -i "security") SECURITY_UPDATES=$(pacman -Qu | grep -i "security")
if [ -n "$SECURITY_UPDATES" ]; then if [ -n "$SECURITY_UPDATES" ]; then
echo "Security updates available:" echo "Security updates available:"
echo "$SECURITY_UPDATES" echo "$SECURITY_UPDATES"
print_task "Installing security updates" print_task "Installing security updates"
pacman -S --needed $(echo "$SECURITY_UPDATES" | awk '{print $1}') --noconfirm pacman -S --needed $(echo "$SECURITY_UPDATES" | awk '{print $1}') --noconfirm
print_success "Security updates installed" print_success "Security updates installed"
else else
print_success "No security updates needed" print_success "No security updates needed"
fi fi
# Check for pacman database errors # Check for pacman database errors
print_section "Checking Pacman Database" print_section "Checking Pacman Database"
print_task "Verifying package database integrity" print_task "Verifying package database integrity"
if command -v paccheck &>/dev/null; then if command -v paccheck &>/dev/null; then
paccheck --md5sum --quiet paccheck --md5sum --quiet
print_success "Pacman database check complete" print_success "Pacman database check complete"
else else
print_warning "paccheck not found. Consider installing pacutils package." print_warning "paccheck not found. Consider installing pacutils package."
fi fi
# Cleanup pacnew/pacsave files # Cleanup pacnew/pacsave files
@ -197,13 +197,13 @@ print_section "Configuration File Management"
print_task "Checking for .pacnew and .pacsave files" print_task "Checking for .pacnew and .pacsave files"
PACFILES=$(find /etc -name "*.pacnew" -o -name "*.pacsave" 2>/dev/null) PACFILES=$(find /etc -name "*.pacnew" -o -name "*.pacsave" 2>/dev/null)
if [ -n "$PACFILES" ]; then if [ -n "$PACFILES" ]; then
echo "Found the following .pacnew/.pacsave files:" echo "Found the following .pacnew/.pacsave files:"
echo "$PACFILES" echo "$PACFILES"
print_warning "You may want to merge these configuration files" print_warning "You may want to merge these configuration files"
echo "Use 'pacdiff' to help manage these files (install pacdiff from pacman-contrib)" echo "Use 'pacdiff' to help manage these files (install pacdiff from pacman-contrib)"
else else
print_success "No .pacnew or .pacsave files found" print_success "No .pacnew or .pacsave files found"
fi fi
# System status # System status
@ -211,11 +211,11 @@ print_section "System Status"
# Disk usage with duf # Disk usage with duf
print_task "Checking disk usage" print_task "Checking disk usage"
if command -v duf &>/dev/null; then if command -v dysk &>/dev/null; then
duf --only local dysk
else else
print_warning "duf not found. Using df instead. Consider installing duf for better disk usage display." print_warning "duf not found. Using df instead. Consider installing duf for better disk usage display."
df -h | grep -v "tmpfs" | grep -v "udev" df -h | grep -v "tmpfs" | grep -v "udev"
fi fi
# Memory usage # Memory usage

View file

@ -10,6 +10,8 @@ node = "20"
dotnet-core = "8.0.401" dotnet-core = "8.0.401"
bun = "1.2.4" bun = "1.2.4"
go = "1.24.1" go = "1.24.1"
ruby = "3.2"
caddy = "latest"
[settings] [settings]
# plugins can read the versions files used by other version managers (if enabled by the plugin) # plugins can read the versions files used by other version managers (if enabled by the plugin)

View file

@ -19,7 +19,8 @@ alias vairix='cd ~/Development/vairix'
alias seekr='cd ~/Development/seekr' alias seekr='cd ~/Development/seekr'
# File operations/utilities # File operations/utilities
alias df="duf" # alias df="duf"
alias df="dysk"
alias mkdir="mkdir -pv" alias mkdir="mkdir -pv"
alias chmox="chmod +x" alias chmox="chmod +x"
alias lf="yazi" alias lf="yazi"
@ -92,3 +93,6 @@ fi
alias la='ll -a' alias la='ll -a'
alias tree='ll --tree --level=2' alias tree='ll --tree --level=2'
alias valheim="cd ~/.config/r2modmanPlus-local/Valheim/profiles/Default/ && ./start_server_bepinex.sh"

View file

@ -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 if command -v eza &> /dev/null; then compdef eza=ls; fi
# ALIASES # ALIASES
yarn() { echo 🖕; } # yarn() { echo 🖕; }
yarnpkg() { echo 🖕; } # yarnpkg() { echo 🖕; }
pnpm() { echo 🖕; } # pnpm() { echo 🖕; }
pn() { echo 🖕; } # pn() { echo 🖕; }
pnpx() { echo 🖕; } # pnpx() { echo 🖕; }
npm() { echo 🖕; } # npm() { echo 🖕; }
alias p='_package_manager' alias p='_package_manager'
alias fo='fopen' alias fo='fopen'

Binary file not shown.