-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(config): update zshrc settings
- Loading branch information
Showing
9 changed files
with
128 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
selector::select() { | ||
options="" | ||
while read -r data; do | ||
options="$options\n$data" | ||
done | ||
|
||
printf "$options" | choose -c 31d6e0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source "$DOTFILES_PATH/scripts/core/_main.sh" | ||
|
||
##? Shows the logs of the selected container | ||
##? | ||
##? Usage: | ||
##? logs | ||
docs::parse "$@" | ||
|
||
if docker ps >/dev/null 2>&1; then | ||
container=$(docker ps | awk '{if (NR!=1) print $1 ": " $(NF)}' | fzf --height 40%) | ||
|
||
if [[ -n $container ]]; then | ||
container_id=$(echo $container | awk -F ': ' '{print $1}') | ||
|
||
docker logs -f --tail 100 $container_id | ||
else | ||
echo "You haven't selected any container! ΰΌΌγ€β_βΰΌ½γ€" | ||
fi | ||
else | ||
echo "Docker daemon is not running! (ΰ² _ΰ² )" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source "$DOTLY_PATH/scripts/core/_main.sh" | ||
|
||
##? Empty the trash and remove cache files | ||
#?? 1.0.0 | ||
##? | ||
##? Usage: | ||
##? empty_trash | ||
docs::parse "$@" | ||
|
||
free_space_in_home() { | ||
df -h ~ | tail -n1 | awk '{print $4}' | ||
} | ||
|
||
free_space_before_empty=$(free_space_in_home) | ||
|
||
ls /Volumes | grep -v GoogleDrive | xargs -I_ sudo rm -rfv /Volumes/_/.Trashes | ||
sudo rm -rfv ~/.Trash/* | ||
echo 'π All trashes empty' | ||
|
||
sudo rm -rfv /private/var/log/asl/*.asl | ||
sudo rm -rfv /var/log/asl/*.asl | ||
echo 'π Mac logs empty' | ||
|
||
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'delete from LSQuarantineEvent' | ||
echo 'β¬ Mac downloads history empty' | ||
|
||
rm -rf "$HOME/Movies/"*.fcpbundle"/"*"/Render Files/High Quality Media" | ||
echo 'π¬ Final Cut rendered media cleared' | ||
|
||
brew cleanup | ||
brew cleanup --prune-prefix | ||
rm -rf ~/Library/Caches/Homebrew | ||
echo 'πΊ Brew cache cleared' | ||
|
||
rm -rf ~/Library/Caches/com.tinyspeck.slackmacgap | ||
rm -rf ~/Library/Caches/com.tinyspeck.slackmacgap.ShipIt | ||
rm -rf ~/Library/Application Support/Slack/Cache | ||
rm -rf "$HOME/Library/Application Support/Slack/Service Worker/CacheStorage" | ||
echo 'π¬ Slack cache cleared' | ||
|
||
rm -rf ~/Library/Caches/com.spotify.client/Data | ||
echo 'πΆ Spotify cache cleared' | ||
|
||
rm -rf ~/Library/Caches/JetBrains | ||
echo 'π Έ JetBrains cache cleared' | ||
|
||
rm -rf ~/Library/Caches/Yarn/ | ||
echo 'πͺ Yarn cache cleared' | ||
|
||
rm -rf ~/.gradle/wrapper/dists/ | ||
rm -rf ~/.gradle/caches/ | ||
echo 'π Gradle cache cleared' | ||
|
||
rm -rf ~/.composer/cache/ | ||
echo 'π¨βπ€ Composer cache cleared' | ||
|
||
rm -rf ~/Library/Caches/Google/Chrome || true | ||
rm -rf "$HOME/Library/Application Support/Google/Chrome/"*"/Service Worker/CacheStorage" || true | ||
rm -rf "$HOME/Library/Application Support/Google/Chrome/"*"/Application Cache/Cache" || true | ||
echo 'π‘ Chrome cache cleared' | ||
|
||
free_space_after_empty=$(free_space_in_home) | ||
|
||
echo "Done! Free space before: $free_space_before_empty, free space now: $free_space_after_empty" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters