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
|
pager = diff-so-fancy | less --tabs=4 -RFX
|
||||||
autocrlf = input
|
autocrlf = input
|
||||||
excludesfile = ~/.config/git/.gitignore
|
excludesfile = ~/.config/git/.gitignore
|
||||||
|
compression = 9
|
||||||
|
whitespace = error
|
||||||
|
preloadindex = true
|
||||||
|
|
||||||
|
[advice]
|
||||||
|
addEmptyPathspec = false
|
||||||
|
pushNonFastForward = false
|
||||||
|
statusHints = false
|
||||||
|
|
||||||
[color]
|
[color]
|
||||||
ui = true
|
ui = true
|
||||||
[color "diff-highlight"]
|
[color "diff-highlight"]
|
||||||
|
@ -62,6 +71,12 @@
|
||||||
[url "https://github.com/RustSec/advisory-db"]
|
[url "https://github.com/RustSec/advisory-db"]
|
||||||
insteadOf = 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"]
|
[filter "lfs"]
|
||||||
clean = git-lfs clean -- %f
|
clean = git-lfs clean -- %f
|
||||||
smudge = git-lfs smudge -- %f
|
smudge = git-lfs smudge -- %f
|
||||||
|
|
|
@ -425,6 +425,8 @@
|
||||||
# status with short format and showing branch and tracking info.
|
# status with short format and showing branch and tracking info.
|
||||||
ssb = status --short --branch
|
ssb = status --short --branch
|
||||||
|
|
||||||
|
s = "!clear -x; git status; git log --oneline -4"
|
||||||
|
|
||||||
### ALIAS MANAGEMENT ###
|
### ALIAS MANAGEMENT ###
|
||||||
|
|
||||||
# Show our defined alias list
|
# Show our defined alias list
|
||||||
|
|
|
@ -77,61 +77,61 @@ else
|
||||||
print_success "No orphaned packages found"
|
print_success "No orphaned packages found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean user cache directory
|
# # Clean user cache directory
|
||||||
print_section "Cleaning User Cache Directory"
|
# print_section "Cleaning User Cache Directory"
|
||||||
|
#
|
||||||
# Get current user's username
|
# # Get current user's username
|
||||||
CURRENT_USER=$(logname 2>/dev/null || echo $SUDO_USER)
|
# CURRENT_USER=$(logname 2>/dev/null || echo $SUDO_USER)
|
||||||
|
#
|
||||||
# If we still don't have a username, try to get it from /home
|
# # If we still don't have a username, try to get it from /home
|
||||||
if [ -z "$CURRENT_USER" ]; then
|
# if [ -z "$CURRENT_USER" ]; then
|
||||||
CURRENT_USER=$(ls -la /home | grep -v "\.\." | grep -v "total" | awk '{print $9}' | head -1)
|
# CURRENT_USER=$(ls -la /home | grep -v "\.\." | grep -v "total" | awk '{print $9}' | head -1)
|
||||||
fi
|
# fi
|
||||||
|
#
|
||||||
echo "Cleaning cache for user: $CURRENT_USER"
|
# echo "Cleaning cache for user: $CURRENT_USER"
|
||||||
|
#
|
||||||
# Create a backup directory
|
# # Create a backup directory
|
||||||
BACKUP_DIR="/home/$CURRENT_USER/.cache_backup_$(date +%Y%m%d)"
|
# BACKUP_DIR="/home/$CURRENT_USER/.cache_backup_$(date +%Y%m%d)"
|
||||||
mkdir -p "$BACKUP_DIR"
|
# mkdir -p "$BACKUP_DIR"
|
||||||
chown $CURRENT_USER:$CURRENT_USER "$BACKUP_DIR"
|
# chown $CURRENT_USER:$CURRENT_USER "$BACKUP_DIR"
|
||||||
|
#
|
||||||
# User cache directory
|
# # User cache directory
|
||||||
USER_CACHE="/home/$CURRENT_USER/.cache"
|
# USER_CACHE="/home/$CURRENT_USER/.cache"
|
||||||
|
#
|
||||||
if [ -d "$USER_CACHE" ]; then
|
# if [ -d "$USER_CACHE" ]; then
|
||||||
# Firefox cache
|
# # Firefox cache
|
||||||
if [ -d "$USER_CACHE/mozilla" ]; then
|
# if [ -d "$USER_CACHE/mozilla" ]; then
|
||||||
print_task "Backing up Firefox cache metadata"
|
# print_task "Backing up Firefox cache metadata"
|
||||||
cp -r "$USER_CACHE/mozilla" "$BACKUP_DIR/"
|
# cp -r "$USER_CACHE/mozilla" "$BACKUP_DIR/"
|
||||||
print_task "Cleaning Firefox cache"
|
# print_task "Cleaning Firefox cache"
|
||||||
find "$USER_CACHE/mozilla" -type f -name "*.sqlite" -exec sqlite3 {} "VACUUM;" \;
|
# find "$USER_CACHE/mozilla" -type f -name "*.sqlite" -exec sqlite3 {} "VACUUM;" \;
|
||||||
fi
|
# fi
|
||||||
|
#
|
||||||
# Chrome/Chromium cache
|
# # Chrome/Chromium cache
|
||||||
for chrome_dir in "$USER_CACHE/google-chrome" "$USER_CACHE/chromium"; do
|
# for chrome_dir in "$USER_CACHE/google-chrome" "$USER_CACHE/chromium"; do
|
||||||
if [ -d "$chrome_dir" ]; then
|
# if [ -d "$chrome_dir" ]; then
|
||||||
print_task "Backing up Chrome/Chromium cache metadata"
|
# print_task "Backing up Chrome/Chromium cache metadata"
|
||||||
mkdir -p "$BACKUP_DIR/$(basename $chrome_dir)"
|
# mkdir -p "$BACKUP_DIR/$(basename $chrome_dir)"
|
||||||
cp -r "$chrome_dir/Default/Preferences" "$BACKUP_DIR/$(basename $chrome_dir)/" 2>/dev/null
|
# cp -r "$chrome_dir/Default/Preferences" "$BACKUP_DIR/$(basename $chrome_dir)/" 2>/dev/null
|
||||||
print_task "Cleaning Chrome/Chromium cache"
|
# print_task "Cleaning Chrome/Chromium cache"
|
||||||
rm -rf "$chrome_dir/Default/Cache" "$chrome_dir/Default/Code Cache" 2>/dev/null
|
# rm -rf "$chrome_dir/Default/Cache" "$chrome_dir/Default/Code Cache" 2>/dev/null
|
||||||
fi
|
# fi
|
||||||
done
|
# done
|
||||||
|
#
|
||||||
# Clean thumbnail cache
|
# # Clean thumbnail cache
|
||||||
if [ -d "$USER_CACHE/thumbnails" ]; then
|
# if [ -d "$USER_CACHE/thumbnails" ]; then
|
||||||
print_task "Cleaning thumbnail cache"
|
# print_task "Cleaning thumbnail cache"
|
||||||
rm -rf "$USER_CACHE/thumbnails/*" 2>/dev/null
|
# rm -rf "$USER_CACHE/thumbnails/*" 2>/dev/null
|
||||||
fi
|
# fi
|
||||||
|
#
|
||||||
# General cache cleanup (but preserve important files)
|
# # General cache cleanup (but preserve important files)
|
||||||
print_task "Cleaning general cache 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
|
# 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"
|
# print_success "Cache cleaned for user $CURRENT_USER"
|
||||||
else
|
# else
|
||||||
print_warning "Cache directory not found for user $CURRENT_USER"
|
# print_warning "Cache directory not found for user $CURRENT_USER"
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# Clean system journals
|
# Clean system journals
|
||||||
print_section "Cleaning 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+t exec ~/.bin/code.sh -s ~/.bin/fuzzel.lua
|
||||||
$mod+shift+t exec ~/.bin/present
|
$mod+shift+t exec ~/.bin/present
|
||||||
$mod+n exec ~/.bin/sdm-ui.sh dmenu
|
$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
|
$mod+e exec nemo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ yarnpkg() { echo 🖕; }
|
||||||
pnpm() { echo 🖕; }
|
pnpm() { echo 🖕; }
|
||||||
pn() { echo 🖕; }
|
pn() { echo 🖕; }
|
||||||
pnpx() { echo 🖕; }
|
pnpx() { echo 🖕; }
|
||||||
|
npm() { echo 🖕; }
|
||||||
|
|
||||||
alias p='_package_manager'
|
alias p='_package_manager'
|
||||||
|
|
||||||
|
@ -63,6 +64,14 @@ function open {
|
||||||
done
|
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() {
|
function upload_file() {
|
||||||
if [[ -z "$1" ]]; then
|
if [[ -z "$1" ]]; then
|
||||||
echo "Usage: $0 <file>"
|
echo "Usage: $0 <file>"
|
||||||
|
@ -73,10 +82,11 @@ function upload_file() {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# local url="https://dump.mz.uy"
|
local url="https://dump.mz.uy"
|
||||||
local url="http://localhost:8080"
|
# local url="http://localhost:8080"
|
||||||
echo "Uploading $1 to $url..."
|
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" -F"one_time=" "$url")
|
||||||
|
# local full_response=$(curl -i -F"file=@$1" "$url")
|
||||||
local url_response=$(echo "$full_response" | tail -n 1)
|
local url_response=$(echo "$full_response" | tail -n 1)
|
||||||
local token=$(echo "$full_response" | grep -i "X-Token:" | awk '{print $2}' | tr -d '\r')
|
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 bombadil &> /dev/null; then eval "$(bombadil generate-completions zsh)"; fi
|
||||||
if command -v eza &> /dev/null; then compdef eza=ls; fi
|
if command -v eza &> /dev/null; then compdef eza=ls; fi
|
||||||
|
|
||||||
|
|
||||||
function dc() {
|
function dc() {
|
||||||
git add .
|
git add .
|
||||||
git commit -m 'automated dev commit' --no-gpg-sign
|
git commit -m 'automated dev commit' --no-gpg-sign
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue