automated dev commit
This commit is contained in:
parent
cf5620f57f
commit
94fe54f20e
8 changed files with 87 additions and 59 deletions
Binary file not shown.
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
BIN
ssh/.ssh/config
BIN
ssh/.ssh/config
Binary file not shown.
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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 <file>"
|
||||
|
@ -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
|
||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue