Add gitignore and dock management script
This commit is contained in:
parent
406c088547
commit
baf378c393
2 changed files with 137 additions and 0 deletions
38
scripts/dock.sh
Executable file
38
scripts/dock.sh
Executable file
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Function to check dock size
|
||||
check_dock() {
|
||||
echo "Current Dock tile size:"
|
||||
defaults read com.apple.dock tilesize
|
||||
}
|
||||
|
||||
# Function to reset dock
|
||||
reset_dock() {
|
||||
echo "Resetting Dock to default settings..."
|
||||
defaults delete com.apple.dock tilesize
|
||||
killall Dock
|
||||
echo "Dock has been reset and restarted."
|
||||
}
|
||||
|
||||
# Show usage if no arguments provided
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 [check|reset]"
|
||||
echo " check - Show current Dock tile size"
|
||||
echo " reset - Reset Dock to default settings"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Process command line arguments
|
||||
case "$1" in
|
||||
"check")
|
||||
check_dock
|
||||
;;
|
||||
"reset")
|
||||
reset_dock
|
||||
;;
|
||||
*)
|
||||
echo "Invalid option: $1"
|
||||
echo "Usage: $0 [check|reset]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
Loading…
Add table
Add a link
Reference in a new issue