This commit is contained in:
2026-02-16 17:28:48 +08:00
parent d13a8a44d1
commit 6e4c5eee38
24 changed files with 656 additions and 209 deletions

View File

@@ -1,11 +0,0 @@
#!/usr/bin/env bash
# X11:
# xrandr --listactivemonitors
# xrandr --output $OUTPUT --rotate (left|right|normal|...)
# Wayland KDE: https://www.reddit.com/r/kde/comments/11vrbwc/how_do_i_rotate_the_screen_on_kde_with_wayland/
# kscreen-doctor --outputs
OUTPUT='HDMI-A-1'
[ "$1" ] && DIRECTION="$1" || DIRECTION="normal" # (left|right|normal|inverted)
kscreen-doctor "output.$OUTPUT.rotation.$DIRECTION"

View File

@@ -1,57 +0,0 @@
#!/usr/bin/env bash
# Очистка места на диске
# https://gist.github.com/anthonyaxenov/02c00c965be4eb5bb163a153abdf4c2b
# https://itsfoss.com/free-up-space-ubuntu-linux/
echo
echo
df -hx tmpfs
echo
echo
echo "[1/5] Removing apt caches and unused packages"
echo
sudo apt autoremove --purge
sudo apt autoclean
sudo apt clean
echo
echo "[2/5] Removing old system logs"
echo
sudo journalctl --vacuum-time=1d
sudo rm -rf /var/log/journal/user-*@*
sudo rm -rf /var/log/journal/system*@*
sudo rm /var/log/{syslog,dmesg,btmp}.*
sudo rm /var/log/{auth,dpkg,kern,alternatives,dmesg}.log.*
echo
echo "[3/5] Cleaning user trash and thumbnails"
echo
rm -rf ~/.local/share/Trash/files/*
rm -rf ~/.cache/thumbnails/*
echo
echo "[4/5] Cleaning out dangling docker objects"
echo
docker system prune -f
# docker system prune -af
echo
echo "[5/5] Removing disabled unused snaps"
echo
sudo snap list --all \
| awk '/disabled/{print $1, $3}' \
| while read snapname revision; do
sudo snap remove "$snapname" --revision="$revision"
done
echo
echo
df -hx tmpfs
echo
echo

0
scripts/ubuntu/lemp.sh Normal file → Executable file
View File

0
scripts/ubuntu/mediasrv.sh Normal file → Executable file
View File

0
scripts/ubuntu/server.sh Normal file → Executable file
View File

22
scripts/vscode-fix-cache.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
rename() {
local dir="$1"
echo "Processing: $dir"
[ -d "$dir.bak" ] && rm -rf "$dir.bak"
mv "$dir" "$dir.bak"
}
dirs=(
"$HOME/.config/Code/Cache"
"$HOME/.config/Code/CachedData"
"$HOME/.config/Code/Code Cache"
"$HOME/.config/Code/GPUCache"
"$HOME/.config/Code/Service Worker"
)
for dir in "${dirs[@]}"; do
rename "$dir"
done
echo "Success"