Skip to content

A repository for various pieces of workstation setup: dotfiles, configs, extensions, etc.

License

Notifications You must be signed in to change notification settings

maxrothman/config

Repository files navigation

config

A repository for various pieces of workstation setup: dotfiles, configs, extensions, etc.

Contents

  • Alfred.alfredpreferences: Alfred plugins. See the README therein for details.
  • bashrc.d: All executable files in here will be sourced by ~/.bashrc. Each file is self-explanatory. This directory will be symlinked to ~/.bashrc.d.
  • bin: executables that are used by code in bashrc.d. This directory will be symlinked to ~/.bin
  • dotfiles: configuration files that various applications expect to be in ~/. Each file will be symlinked to ~/.$FILE (e.g. bashrc -> ~/.bashrc).
  • iTerm: iTerm configuration files.
  • misc-stuff: Files used once during setup.
  • stylus: CSS themes for the Stylus Chrome plugin
  • manual.md: stuff to manually install
  • deploy.sh: a script for automatically deploying the parts of this repo that can be automated.
  • automator: add buttons to Finder that open apps via Apple automator
  • VSCode: VSCode configs and a list of extensions to install
  • git-hooks: My flexible git-hooks setup that allows for multiple global and repo-local hooks of the same type. Mostly used to turn my pre-push hook on for all repos.

Setup instructions:

  • Clone this repo somewhere
  • Install brew: https://brew.sh/
  • Run deploy.sh
  • Run misc-scripts/misc-setup.bash
  • Follow the instructions in manual.md
  • Follow the instructions in Alfred.alfredpreferences/README.md
  • Follow the instructions in the README in automator/

Short-term Todo

Long-term Todo

Deprecated todos

  • Sublime likes to reformat the prefs and remove comments. Find a workaround?
  • Find vscode plugins to:
    • remove matching brackets
    • split selection on words (rather than lines)
  • For macbooks with force touch, set force threshold to "Firm" in System Preferences, then run defaults write com.apple.AppleMultitouchTrackpad SecondClickThreshold 1 to make force touch a little lighter
    • Maybe figure out what some of the other keys do like ActuateDedents
  • Distribute modified Ansible package

Troubleshooting bash prompt performance problems

My bashrc setup is complex enough that performance can be an issue. This repo contains a few tools for troubleshooting such issues:

  • Run __bashrc_bench=1 bash -i to time the evaluation of each file in bashrc.d/
  • To troubleshoot performance issues within a file:
    • Add the following lines to the file:
      # At the very top
      PS4='+ $(date "+%s.%N")\011 '
      exec 3>&2 2>/tmp/bashstart.$$.log
      set -x
      
      ...
      
      # At the very bottom
      set +x
      exec 2>&3 3>&-
    • Source the instrumented file. This will create a file /tmp/bashstart.XXXX.log, where XXXX is the PID of the process.
    • Some of the logged lines in the bashstart file contain newlines, which interferes with the next step. Edit the file to collapse those into single lines or simply remove the extra lines. Once you're done, every line should look something like this:
      ++++ 1606154722.825342000	 __git_merge_strategies=
      
    • Run bin/bash-format-perf < bashstart.XXXX.log > formatted.log to change the absolute timestamps in the perf log into relative timings
    • To find the most expensive lines, you might want to edit formatted.log to remove the +s and run sort -n on it.

References

About

A repository for various pieces of workstation setup: dotfiles, configs, extensions, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published