Skip to content

Commit

Permalink
feat(atuin): enable atuin
Browse files Browse the repository at this point in the history
  • Loading branch information
Ameausoone committed Jul 3, 2024
1 parent 117f62d commit c5bb331
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
4 changes: 4 additions & 0 deletions roles/mac_dev_playbook/files/.zshrc.d/core/50_atuin.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env zsh

# Enable atuin
eval "$(atuin init zsh)"
56 changes: 56 additions & 0 deletions roles/mac_dev_playbook/files/osx/.osx
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

0 comments on commit c5bb331

Please sign in to comment.