123456789101112131415161718 |
- #!/bin/sh
- systemmenu() {
- options=" Update\n Cleanup\n Backup\n Audit"
- selected=$(echo "$options" | dmenu -i -p "System:" )
- if [ "$selected" = " Update" ]; then
- $TERMINAL sh -c 'doas pacman -Syu --disable-download-timeout && yay -Syu --disable-download-timeout --aur; exec zsh'
- elif [ "$selected" = " Cleanup" ]; then
- $TERMINAL sh -c 'doas paccache -rvk2 && yay -Sc --aur --noconfirm && rm -f ~/.config/zsh/.zsh_history && find ~/.cache -mindepth 1 -maxdepth 1 -type d ! -name backups -exec rm -rf {} + && doas rm -f /root/.config/zsh/.zsh_history && doas find /var/log -name "*.log" -type f -mtime +7 -delete; exec zsh'
- elif [ "$selected" = " Backup" ]; then
- $TERMINAL sh -c "rsync -artvzP ~/documents ~/music ~/pictures ~/videos ~/.config ~/.librewolf ~/.local ~/.ssh ~/.cache/backups/$(date '+%d_%m_%Y') --delete; exec zsh"
- elif [ "$selected" = " Audit" ]; then
- $TERMINAL sh -c 'doas freshclam && doas clamscan --exclude-dir=/sys -ri ~ && doas paccheck --quiet --files --file-properties --db-files --require-mtree; exec zsh'
- fi
- }
- systemmenu
|