diff --git a/config/.config/sdm-ui.yaml b/config/.config/sdm-ui.yaml index effd6a2..b68fbce 100644 Binary files a/config/.config/sdm-ui.yaml and b/config/.config/sdm-ui.yaml differ diff --git a/git/.config/git/config b/git/.config/git/config index 7325fb1..2c5d683 100644 --- a/git/.config/git/config +++ b/git/.config/git/config @@ -23,6 +23,15 @@ pager = diff-so-fancy | less --tabs=4 -RFX autocrlf = input excludesfile = ~/.config/git/.gitignore + compression = 9 + whitespace = error + preloadindex = true + +[advice] + addEmptyPathspec = false + pushNonFastForward = false + statusHints = false + [color] ui = true [color "diff-highlight"] @@ -62,6 +71,12 @@ [url "https://github.com/RustSec/advisory-db"] insteadOf = https://github.com/RustSec/advisory-db +[url "git@github.com:marianozunino/"] + insteadOf = "mz:" + +[url "git@github.com:Stuzo/"] + insteadOf = "stuzo:" + [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f diff --git a/git/.config/git/gitalias.txt b/git/.config/git/gitalias.txt index 2493276..651a36a 100644 --- a/git/.config/git/gitalias.txt +++ b/git/.config/git/gitalias.txt @@ -425,6 +425,8 @@ # status with short format and showing branch and tracking info. ssb = status --short --branch + s = "!clear -x; git status; git log --oneline -4" + ### ALIAS MANAGEMENT ### # Show our defined alias list diff --git a/local-bin/.local/bin/maintenance.sh b/local-bin/.local/bin/maintenance.sh index 2ce982c..f6b4184 100755 --- a/local-bin/.local/bin/maintenance.sh +++ b/local-bin/.local/bin/maintenance.sh @@ -77,61 +77,61 @@ else print_success "No orphaned packages found" fi -# Clean user cache directory -print_section "Cleaning User Cache Directory" - -# Get current user's username -CURRENT_USER=$(logname 2>/dev/null || echo $SUDO_USER) - -# If we still don't have a username, try to get it from /home -if [ -z "$CURRENT_USER" ]; then - CURRENT_USER=$(ls -la /home | grep -v "\.\." | grep -v "total" | awk '{print $9}' | head -1) -fi - -echo "Cleaning cache for user: $CURRENT_USER" - -# Create a backup directory -BACKUP_DIR="/home/$CURRENT_USER/.cache_backup_$(date +%Y%m%d)" -mkdir -p "$BACKUP_DIR" -chown $CURRENT_USER:$CURRENT_USER "$BACKUP_DIR" - -# User cache directory -USER_CACHE="/home/$CURRENT_USER/.cache" - -if [ -d "$USER_CACHE" ]; then - # Firefox cache - if [ -d "$USER_CACHE/mozilla" ]; then - print_task "Backing up Firefox cache metadata" - cp -r "$USER_CACHE/mozilla" "$BACKUP_DIR/" - print_task "Cleaning Firefox cache" - find "$USER_CACHE/mozilla" -type f -name "*.sqlite" -exec sqlite3 {} "VACUUM;" \; - fi - - # Chrome/Chromium cache - for chrome_dir in "$USER_CACHE/google-chrome" "$USER_CACHE/chromium"; do - if [ -d "$chrome_dir" ]; then - print_task "Backing up Chrome/Chromium cache metadata" - mkdir -p "$BACKUP_DIR/$(basename $chrome_dir)" - cp -r "$chrome_dir/Default/Preferences" "$BACKUP_DIR/$(basename $chrome_dir)/" 2>/dev/null - print_task "Cleaning Chrome/Chromium cache" - rm -rf "$chrome_dir/Default/Cache" "$chrome_dir/Default/Code Cache" 2>/dev/null - fi - done - - # Clean thumbnail cache - if [ -d "$USER_CACHE/thumbnails" ]; then - print_task "Cleaning thumbnail cache" - rm -rf "$USER_CACHE/thumbnails/*" 2>/dev/null - fi - - # General cache cleanup (but preserve important files) - print_task "Cleaning general cache files" - find "$USER_CACHE" -type f -atime +30 -not -path "*/mozilla/*" -not -path "*/chromium/*" -not -path "*/google-chrome/*" -delete 2>/dev/null - - print_success "Cache cleaned for user $CURRENT_USER" -else - print_warning "Cache directory not found for user $CURRENT_USER" -fi +# # Clean user cache directory +# print_section "Cleaning User Cache Directory" +# +# # Get current user's username +# CURRENT_USER=$(logname 2>/dev/null || echo $SUDO_USER) +# +# # If we still don't have a username, try to get it from /home +# if [ -z "$CURRENT_USER" ]; then +# CURRENT_USER=$(ls -la /home | grep -v "\.\." | grep -v "total" | awk '{print $9}' | head -1) +# fi +# +# echo "Cleaning cache for user: $CURRENT_USER" +# +# # Create a backup directory +# BACKUP_DIR="/home/$CURRENT_USER/.cache_backup_$(date +%Y%m%d)" +# mkdir -p "$BACKUP_DIR" +# chown $CURRENT_USER:$CURRENT_USER "$BACKUP_DIR" +# +# # User cache directory +# USER_CACHE="/home/$CURRENT_USER/.cache" +# +# if [ -d "$USER_CACHE" ]; then +# # Firefox cache +# if [ -d "$USER_CACHE/mozilla" ]; then +# print_task "Backing up Firefox cache metadata" +# cp -r "$USER_CACHE/mozilla" "$BACKUP_DIR/" +# print_task "Cleaning Firefox cache" +# find "$USER_CACHE/mozilla" -type f -name "*.sqlite" -exec sqlite3 {} "VACUUM;" \; +# fi +# +# # Chrome/Chromium cache +# for chrome_dir in "$USER_CACHE/google-chrome" "$USER_CACHE/chromium"; do +# if [ -d "$chrome_dir" ]; then +# print_task "Backing up Chrome/Chromium cache metadata" +# mkdir -p "$BACKUP_DIR/$(basename $chrome_dir)" +# cp -r "$chrome_dir/Default/Preferences" "$BACKUP_DIR/$(basename $chrome_dir)/" 2>/dev/null +# print_task "Cleaning Chrome/Chromium cache" +# rm -rf "$chrome_dir/Default/Cache" "$chrome_dir/Default/Code Cache" 2>/dev/null +# fi +# done +# +# # Clean thumbnail cache +# if [ -d "$USER_CACHE/thumbnails" ]; then +# print_task "Cleaning thumbnail cache" +# rm -rf "$USER_CACHE/thumbnails/*" 2>/dev/null +# fi +# +# # General cache cleanup (but preserve important files) +# print_task "Cleaning general cache files" +# find "$USER_CACHE" -type f -atime +30 -not -path "*/mozilla/*" -not -path "*/chromium/*" -not -path "*/google-chrome/*" -delete 2>/dev/null +# +# print_success "Cache cleaned for user $CURRENT_USER" +# else +# print_warning "Cache directory not found for user $CURRENT_USER" +# fi # Clean system journals print_section "Cleaning System Journals" diff --git a/ssh/.ssh/config b/ssh/.ssh/config index 21e5be8..0f41ec3 100644 Binary files a/ssh/.ssh/config and b/ssh/.ssh/config differ diff --git a/sway/.config/sway/config b/sway/.config/sway/config index b7f3e42..1b863ae 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -101,7 +101,9 @@ bindsym { $mod+t exec ~/.bin/code.sh -s ~/.bin/fuzzel.lua $mod+shift+t exec ~/.bin/present $mod+n exec ~/.bin/sdm-ui.sh dmenu - $mod+o exec ~/.bin/obsidian-launcher + # $mod+o exec ~/.bin/obsidian-launcher + # luanch kitty + neovim at ~/Documents/Vault + $mod+o exec bash -c "cd /home/forbi/Documents/Vault && $term nvim" $mod+e exec nemo } diff --git a/zsh/.config/zsh/functions.zsh b/zsh/.config/zsh/functions.zsh index 087b08f..ae77ead 100644 --- a/zsh/.config/zsh/functions.zsh +++ b/zsh/.config/zsh/functions.zsh @@ -50,6 +50,7 @@ yarnpkg() { echo 🖕; } pnpm() { echo 🖕; } pn() { echo 🖕; } pnpx() { echo 🖕; } +npm() { echo 🖕; } alias p='_package_manager' @@ -63,6 +64,14 @@ function open { done } +function fopen() { + local selected + selected=$(fd "$@" | fzf) + [[ -n "$selected" ]] && setsid nohup xdg-open "$selected" >/dev/null 2>&1 & +} + +alias fo='fopen' + function upload_file() { if [[ -z "$1" ]]; then echo "Usage: $0 " @@ -73,10 +82,11 @@ function upload_file() { return 1 fi - # local url="https://dump.mz.uy" - local url="http://localhost:8080" + local url="https://dump.mz.uy" + # local url="http://localhost:8080" echo "Uploading $1 to $url..." local full_response=$(curl -i -F"file=@$1" -F"one_time=" "$url") + # local full_response=$(curl -i -F"file=@$1" "$url") local url_response=$(echo "$full_response" | tail -n 1) local token=$(echo "$full_response" | grep -i "X-Token:" | awk '{print $2}' | tr -d '\r') @@ -290,7 +300,6 @@ if command -v kubefwd &> /dev/null; then eval "$(kubefwd completion zsh)"; fi if command -v bombadil &> /dev/null; then eval "$(bombadil generate-completions zsh)"; fi if command -v eza &> /dev/null; then compdef eza=ls; fi - function dc() { git add . git commit -m 'automated dev commit' --no-gpg-sign diff --git a/zsh/.config/zsh/zsh_history_main b/zsh/.config/zsh/zsh_history_main index 3540d21..6d5793c 100644 Binary files a/zsh/.config/zsh/zsh_history_main and b/zsh/.config/zsh/zsh_history_main differ