-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
117f62d
commit c5bb331
Showing
2 changed files
with
60 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env zsh | ||
|
||
# Enable atuin | ||
eval "$(atuin init zsh)" |
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,56 @@ | ||
#!/usr/bin/env zsh | ||
|
||
# Mac OS X configuration | ||
# | ||
# This configuration applies to the latest version of macOS (currently 11.3), | ||
# and sets up preferences and configurations for all the built-in services and | ||
# apps. Third-party app config should be done elsewhere. | ||
# | ||
# Options: | ||
# --no-restart: Don't restart any apps or services after running the script. | ||
# | ||
# If you want to figure out what default needs changing, do the following: | ||
# | ||
# 1. `cd /tmp` | ||
# 2. Store current defaults in file: `defaults read > before` | ||
# 3. Make a change to your system. | ||
# 4. Store new defaults in file: `defaults read > after` | ||
# 5. Diff the files: `diff before after` | ||
# | ||
# @see: http://secrets.blacktree.com/?showapp=com.apple.finder | ||
# @see: https://github.com/herrbischoff/awesome-macos-command-line | ||
# | ||
# @author Antoine Meausoone | ||
# @from Jeff Geerling | ||
|
||
# Warn that some commands will not be run if the script is not run as root. | ||
if [[ $EUID -ne 0 ]]; then | ||
RUN_AS_ROOT=false | ||
printf "Certain commands will not be run without sudo privileges. To run as root, run the same command prepended with 'sudo', for example: $ sudo $0\n\n" | fold -s -w 80 | ||
else | ||
RUN_AS_ROOT=true | ||
# Update existing `sudo` timestamp until `.osx` has finished | ||
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | ||
fi | ||
|
||
############################################################################### | ||
# General UI/UX # | ||
############################################################################### | ||
|
||
# Restart automatically if the computer freezes | ||
if [[ "$RUN_AS_ROOT" = true ]]; then | ||
systemsetup -setrestartfreeze on | ||
fi | ||
|
||
############################################################################### | ||
# Screen # | ||
############################################################################### | ||
|
||
# Save screenshots to Downloads folder. | ||
defaults write com.apple.screencapture location -string "${HOME}/Downloads" | ||
|
||
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) | ||
defaults write com.apple.screencapture type -string "png" | ||
|
||
# Disable shadow in screenshots | ||
defaults write com.apple.screencapture disable-shadow -bool true |