From 5cb36733357d3bfff4567c9b767c16eee0573e26 Mon Sep 17 00:00:00 2001 From: MorganGeek Date: Thu, 2 Jul 2020 20:59:21 +0200 Subject: [PATCH] add shell aliases inspired by public dotfiles - Thanks to https://github.com/mathiasbynens/dotfiles/blob/main/.aliases for inspiration --- dot_zsh_aliases | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dot_zsh_aliases b/dot_zsh_aliases index 79a2940..6b1d70a 100644 --- a/dot_zsh_aliases +++ b/dot_zsh_aliases @@ -113,11 +113,22 @@ alias ls='lsd' alias tree='ls --almost-all --tree' alias v=vi alias x='extract' +# Empty the Trash on all mounted volumes and the main HDD. +# Also, clear Appleā€™s System Logs to improve shell startup speed. +# Finally, clear download history from quarantine. https://mths.be/bum +alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl; sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'delete from LSQuarantineEvent'" # System info alias systeminfo='neofetch' alias monitoring='glances' +# System Utils +# Lock the screen (when going AFK) +alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend" + +# Reload the shell (i.e. invoke as a login shell) +alias reload="exec ${SHELL} -l" + # Infrastructure alias awsls='awsls -profile default -region eu-west-1 --attributes tags aws_instance'