├── .gitignore ├── Makefile ├── README.md ├── fish ├── config │ ├── abbreviations.fish │ ├── config.fish │ └── functions │ │ ├── cdf.fish │ │ ├── code.fish │ │ ├── fdc.fish │ │ ├── g.fish │ │ ├── gm.fish │ │ ├── l.fish │ │ └── rvm.fish └── fish.install ├── fonts └── sf-mono.install ├── ghostty ├── config └── ghostty.install ├── git ├── .gitattributes.symlink ├── .gitconfig.symlink ├── .gitignore.symlink └── difftools │ └── image.sh ├── img └── dark.png ├── keynote └── settings.install ├── macOS ├── defaults.install └── shortcuts.install ├── ruby └── .gemrc.symlink ├── services ├── Open in Linear.workflow │ └── Contents │ │ ├── Info.plist │ │ ├── QuickLook │ │ └── Thumbnail.png │ │ └── document.wflow ├── Sort Selection.workflow │ └── Contents │ │ ├── Info.plist │ │ ├── QuickLook │ │ └── Thumbnail.png │ │ └── document.wflow └── services.install ├── starship ├── starship.install └── starship.toml ├── vim └── .vimrc.symlink ├── vscode ├── keybindings.json ├── link-settings.install └── settings.json └── xcode └── settings.install /.gitignore: -------------------------------------------------------------------------------- 1 | fish/config/fish_variables 2 | 3 | secret/ 4 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: link run 2 | .PHONY: all 3 | 4 | SHELL := /bin/bash 5 | 6 | LINK = $(patsubst %.symlink, ~/%, $(notdir $(wildcard **/*.symlink) $(wildcard **/.*.symlink))) 7 | RUN = $(wildcard **/*.install) 8 | 9 | ~/%: **/%.symlink 10 | @echo "- Linking $<" 11 | @ln -sF "$(CURDIR)/$<" "$@" 12 | 13 | delete: 14 | @echo "- Removing linked files" 15 | @rm -f $(LINK) 16 | 17 | link: $(LINK) 18 | 19 | run: $(RUN) 20 | @echo $^ | xargs -n 1 $(SHELL) 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # .dotfiles 2 | 3 |

4 | 5 |

6 | 7 | ## Install guide 8 | 9 | 1. Clone it into `~` 10 | 2. Run `make` 11 | -------------------------------------------------------------------------------- /fish/config/abbreviations.fish: -------------------------------------------------------------------------------- 1 | if status --is-interactive 2 | set -g fish_user_abbreviations 3 | 4 | abbr --add .xco 'open *.xcodeproj' 5 | abbr --add .xcw 'open *.xcworkspace' 6 | abbr --add gl 'g log --pretty=oneline --decorate --abbrev-commit --format="%C(yellow)%h%C(reset)%w("(math (tput cols) - 8)",1,8)%s"' 7 | abbr --add show 'open -R' 8 | end 9 | -------------------------------------------------------------------------------- /fish/config/config.fish: -------------------------------------------------------------------------------- 1 | # Abbreviations 2 | source ~/.config/fish/abbreviations.fish 3 | 4 | # Locale 5 | set -x LANGUAGE "en_US.UTF-8" 6 | set -x LC_ALL "en_US.UTF-8" 7 | set -x LANG "en_US.UTF-8" 8 | 9 | # Starship 10 | starship init fish | source 11 | 12 | # Homebrew 13 | set -x HOMEBREW_NO_ANALYTICS 1 14 | 15 | function fish_greeting 16 | clear 17 | end 18 | 19 | function fish_title 20 | end 21 | 22 | # Homebrew 23 | if test -d /usr/local/sbin 24 | set PATH "/usr/local/sbin" $PATH 25 | end 26 | 27 | # Rust 28 | if test -d ~/.cargo/bin 29 | set PATH "$HOME/.cargo/bin" $PATH 30 | end 31 | 32 | # Sublime Text 33 | if test -d /Applications/Sublime\ Text.app/Contents/SharedSupport 34 | set PATH "/Applications/Sublime Text.app/Contents/SharedSupport/bin" $PATH 35 | end 36 | 37 | # Initialize RVM 38 | if type -q rvm 39 | rvm default 40 | end 41 | 42 | # npm 43 | if test -d ~/Developer/.npm-global 44 | set PATH "$HOME/Developer/.npm-global/bin" $PATH 45 | end 46 | 47 | # bun 48 | set --export BUN_INSTALL "$HOME/.bun" 49 | set --export PATH $BUN_INSTALL/bin $PATH 50 | -------------------------------------------------------------------------------- /fish/config/functions/cdf.fish: -------------------------------------------------------------------------------- 1 | function cdf --description "Navigate to the folder of the frontmost Finder window." 2 | set path (echo "\ 3 | tell application \"Finder\" to set the source_folder to (folder of the front window) as alias 4 | 5 | set result to (POSIX path of the source_folder as string)" | osascript 2> /dev/null) 6 | 7 | and cd $path 8 | end 9 | -------------------------------------------------------------------------------- /fish/config/functions/code.fish: -------------------------------------------------------------------------------- 1 | function code -d "Open Visual Studio Code" 2 | set -l files 3 | set -l opts 4 | set -l projects 5 | 6 | # We'll just ignore anything that looks like an option string... 7 | for file in $argv 8 | switch $file 9 | case '-*' 10 | set opts $opts $file 11 | 12 | case '.*' '*' 13 | set files $files $file 14 | end 15 | end 16 | 17 | # If there's one (and only one) *.code-workspace file in the folder listed, 18 | # open that instead. 19 | if [ (count $files) -eq 1 ] 20 | set projects (find $files[1] -name "*.code-workspace" -maxdepth 1 2> /dev/null) 21 | end 22 | 23 | if [ (count $projects) -eq 1 ] 24 | set argv $opts $projects[1] 25 | end 26 | 27 | if set -e CODE_PATH 28 | eval $CODE_PATH $argv 29 | else if begin; which code > /dev/null 2>&1; and test -x (which code); end 30 | command code $argv 31 | else if test -d "/Applications/Visual Studio Code.app" 32 | "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" $argv 33 | else 34 | echo 'No Visual Studio Code installation found' >&2 35 | echo 'Add `code` to your $PATH or set $CODE_PATH' >&2 36 | return 1 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /fish/config/functions/fdc.fish: -------------------------------------------------------------------------------- 1 | function fdc --description "Opens the current working directory in Finder." 2 | echo "\ 3 | set current_folder to ( POSIX file \""(pwd)\"" as alias ) 4 | try 5 | tell application \"Finder\" to set the (folder of the front window) to current_folder 6 | on error -- no open folder windows 7 | tell application \"Finder\" to open current_folder 8 | end try 9 | 10 | tell application \"System Events\" to set frontmost of process \"Finder\" to true" | osascript > /dev/null 11 | end 12 | -------------------------------------------------------------------------------- /fish/config/functions/g.fish: -------------------------------------------------------------------------------- 1 | function g -w git 2 | if test (count $argv) -eq 0 3 | git status --short 4 | else 5 | git $argv 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /fish/config/functions/gm.fish: -------------------------------------------------------------------------------- 1 | function gm --description "Go to linear-app/mobile-ios" 2 | cd ~/Developer/linear-app/mobile-ios 3 | end 4 | -------------------------------------------------------------------------------- /fish/config/functions/l.fish: -------------------------------------------------------------------------------- 1 | function l 2 | set branch (git rev-parse --abbrev-ref HEAD 2>/dev/null) 3 | set issue (string match -r '[a-zA-Z]+-\d+' $branch) 4 | open "linear://linear/issue/$issue" 5 | end 6 | -------------------------------------------------------------------------------- /fish/config/functions/rvm.fish: -------------------------------------------------------------------------------- 1 | function rvm --description='Ruby enVironment Manager' 2 | if not test -e ~/.rvm/scripts/rvm 3 | return 4 | end 5 | 6 | # run RVM and capture the resulting environment 7 | set --local env_file (mktemp -t rvm.fish.XXXXXXXXXX) 8 | bash -c 'source ~/.rvm/scripts/rvm; rvm "$@"; status=$?; env > "$0"; exit $status' $env_file $argv 9 | 10 | # apply rvm_* and *PATH variables from the captured environment 11 | and eval (grep '^rvm\|^[^=]*PATH\|^GEM_HOME' $env_file | grep -v '_clr=' | sed '/^[^=]*PATH/s/:/" "/g; s/^/set -xg /; s/=/ "/; s/$/" ;/; s/(//; s/)//') 12 | # needed under fish >= 2.2.0 13 | and set -xg GEM_PATH (echo $GEM_PATH | sed 's/ /:/g') 14 | 15 | # clean up 16 | rm -f $env_file 17 | end 18 | 19 | function __handle_rvmrc_stuff --on-variable PWD 20 | # Source a .rvmrc file in a directory after changing to it, if it exists. 21 | # To disable this fature, set rvm_project_rvmrc=0 in $HOME/.rvmrc 22 | if test "$rvm_project_rvmrc" != 0 23 | set -l cwd $PWD 24 | while true 25 | if contains $cwd "" $HOME "/" 26 | if test "$rvm_project_rvmrc_default" = 1 27 | rvm default 1>/dev/null 2>&1 28 | end 29 | break 30 | else 31 | if test -e .rvmrc -o -e .ruby-version -o -e .ruby-gemset 32 | eval "rvm reload" > /dev/null 33 | eval "rvm rvmrc load" >/dev/null 34 | break 35 | else 36 | set cwd (dirname "$cwd") 37 | end 38 | end 39 | end 40 | 41 | set -e cwd 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /fish/fish.install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "- Linking ~/.config/fish" 4 | 5 | mkdir -p ~/.config 6 | rm -rf ~/.config/fish 7 | 8 | ln -sF ~/.dotfiles/fish/config/ ~/.config/fish 9 | -------------------------------------------------------------------------------- /fonts/sf-mono.install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "- Installing SF Mono" 4 | 5 | cp -R /System/Applications/Utilities/Terminal.app/Contents/Resources/Fonts/. ~/Library/Fonts 6 | -------------------------------------------------------------------------------- /ghostty/config: -------------------------------------------------------------------------------- 1 | adjust-cell-height = 14 2 | adjust-cell-width = -4% 3 | adjust-cursor-height = -2 4 | background-blur = 25 5 | background-opacity = 0.98 6 | cursor-style = bar 7 | font-family = SF Mono 8 | font-family = SF Pro 9 | font-feature = -ss03,+ss04 10 | font-style = Regular 11 | font-style-bold = Bold 12 | font-style-bold-italic = "Medium Italic" 13 | macos-icon = custom-style 14 | macos-icon-frame = plastic 15 | macos-icon-screen-color = #00FF00 16 | macos-titlebar-style = tabs 17 | shell-integration = fish 18 | window-decoration = auto 19 | window-padding-x = 12 20 | window-padding-y = 8 21 | window-theme = system 22 | -------------------------------------------------------------------------------- /ghostty/ghostty.install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "- Linking ~/.config/ghostty/config" 4 | 5 | mkdir -p ~/.config/ghostty 6 | 7 | ln -sF ~/.dotfiles/ghostty/config ~/.config/ghostty/config 8 | -------------------------------------------------------------------------------- /git/.gitattributes.symlink: -------------------------------------------------------------------------------- 1 | *.gif diff=image 2 | *.jpg diff=image 3 | *.png diff=image 4 | 5 | *.htm diff=html 6 | *.html diff=html 7 | *.m diff=objc 8 | *.rb diff=ruby 9 | -------------------------------------------------------------------------------- /git/.gitconfig.symlink: -------------------------------------------------------------------------------- 1 | [advice] 2 | statusHints = false 3 | addEmptyPathspec = false 4 | 5 | [alias] 6 | cl = clone --recursive 7 | co = checkout --quiet 8 | g = !exec git 9 | git = !exec git 10 | subup = submodule update --recursive --init 11 | 12 | [branch] 13 | autosetupmerge = true 14 | sort = -authordate 15 | 16 | [branch "main"] 17 | merge = refs/heads/main 18 | remote = origin 19 | 20 | [branch "master"] 21 | merge = refs/heads/master 22 | remote = origin 23 | 24 | [color] 25 | branch = auto 26 | diff = auto 27 | status = auto 28 | ui = true 29 | 30 | [color "branch"] 31 | current = green bold 32 | local = normal 33 | remote = red italic 34 | upsteam = yellow 35 | 36 | [color "diff"] 37 | frag = magenta bold 38 | meta = yellow bold 39 | new = green bold 40 | old = red italic 41 | whitespace = red reverse 42 | 43 | [color "status"] 44 | added = green 45 | changed = red bold 46 | unmerged = red 47 | untracked = blue 48 | 49 | [column] 50 | status = auto,row,nodense 51 | ui = auto,row,nodense 52 | 53 | [core] 54 | attributesfile = ~/.gitattributes 55 | editor = /usr/bin/vim 56 | excludesfile = ~/.gitignore 57 | trustctime = false 58 | whitespace = trailing-space,space-before-tab 59 | 60 | [credential] 61 | helper = osxkeychain 62 | 63 | [diff] 64 | algorithm = histogram 65 | renames = copies 66 | wsErrorHighlight = all 67 | 68 | [difftool "Kaleidoscope"] 69 | cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\" 70 | 71 | [difftool] 72 | prompt = false 73 | 74 | [grep] 75 | extendRegexp = true 76 | lineNumber = true 77 | 78 | [help] 79 | autocorrect = 10 80 | 81 | [include] 82 | path = .dotfiles/secret/.gitconfig 83 | 84 | [init] 85 | defaultBranch = main 86 | 87 | [log] 88 | abbrevCommit = true 89 | decorate = auto 90 | 91 | [merge] 92 | tool = Kaleidoscope 93 | 94 | [mergetool "Kaleidoscope"] 95 | cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot 96 | trustExitCode = true 97 | 98 | [mergetool] 99 | prompt = false 100 | 101 | [pull] 102 | ff = only 103 | 104 | [push] 105 | default = current 106 | 107 | [rerere] 108 | enabled = true 109 | 110 | [status] 111 | showUntrackedFiles = all 112 | submoduleSummary = true 113 | 114 | [user] 115 | useConfigOnly = true 116 | [filter "lfs"] 117 | smudge = git-lfs smudge -- %f 118 | process = git-lfs filter-process 119 | required = true 120 | clean = git-lfs clean -- %f 121 | -------------------------------------------------------------------------------- /git/.gitignore.symlink: -------------------------------------------------------------------------------- 1 | # Mac OS X 2 | .DS_Store 3 | 4 | # node 5 | node_modules/ 6 | 7 | # vim 8 | *~ 9 | *.swp 10 | 11 | # Xcode 12 | !default.mode1v3 13 | !default.mode2v3 14 | !default.pbxuser 15 | !default.perspectivev3 16 | *.hmap 17 | *.ipa 18 | *.mode1v3 19 | *.mode2v3 20 | *.moved-aside 21 | *.pbxuser 22 | *.perspectivev3 23 | *.xccheckout 24 | *.xcuserstate 25 | build/ 26 | DerivedData 27 | xcuserdata 28 | 29 | # Xcode Playgrounds 30 | *.xctimeline 31 | 32 | # Swift Package Manager 33 | .swiftpm/xcode 34 | .build 35 | 36 | contents.xcworkspacedata 37 | 38 | # macOS folder icons 39 | Icon 40 | -------------------------------------------------------------------------------- /git/difftools/image.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if which sips > /dev/null ; then 4 | sips -g all $1 | tail -n +2 | sort 5 | else 6 | md5 -r $1 7 | fi 8 | -------------------------------------------------------------------------------- /img/dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robb/dotfiles/36abf98167d2a9cd51e23c773f39a4a5b640cdf1/img/dark.png -------------------------------------------------------------------------------- /keynote/settings.install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Keynote specific settings 4 | 5 | echo "- Setting up Keynote" 6 | 7 | # Disable smart quotes 8 | defaults write com.apple.iWork.Keynote TSWPAutomaticQuoteSubstitution 0 9 | -------------------------------------------------------------------------------- /macOS/defaults.install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # macOS Specific settings 4 | 5 | echo "- Setting up Dock" 6 | 7 | ## Dock 8 | 9 | # Move Dock to the right 10 | defaults write com.apple.dock orientation -string "right" 11 | 12 | # Remove the auto-hiding Dock delay 13 | defaults write com.apple.dock autohide-delay -float 0 14 | 15 | # Remove the animation when hiding/showing the Dock 16 | defaults write com.apple.dock autohide-time-modifier -float 0 17 | 18 | # Automatically hide and show the Dock 19 | defaults write com.apple.dock autohide -bool true 20 | 21 | # Make Dock icons of hidden applications translucent 22 | defaults write com.apple.dock showhidden -bool true 23 | 24 | # Set the icon size to 32 points 25 | defaults write com.apple.dock tilesize -int 32 26 | 27 | # Prevent the Dock from changing size 28 | defaults write com.apple.dock size-immutable -bool YES 29 | 30 | # Prevent icons from bouncing 31 | defaults write com.apple.dock no-bouncing -bool true 32 | 33 | # Remove all permanent apps from the dock 34 | defaults write com.apple.dock persistent-apps -array 35 | 36 | # Disable hot corners 37 | defaults write com.apple.dock wvous-tl-corner -int 1 38 | defaults write com.apple.dock wvous-bl-corner -int 1 39 | defaults write com.apple.dock wvous-tr-corner -int 1 40 | defaults write com.apple.dock wvous-br-corner -int 1 41 | 42 | echo "- Restarting Dock" 43 | killall Dock 44 | -------------------------------------------------------------------------------- /macOS/shortcuts.install: -------------------------------------------------------------------------------- 1 | # !/bin/sh 2 | 3 | echo "- Setting up System-wide Shortcuts" 4 | 5 | # Map ⇧⌘R to rename the current document. 6 | defaults write -g NSUserKeyEquivalents -dict-add "Rename\\U2026" "@\$r" 7 | -------------------------------------------------------------------------------- /ruby/.gemrc.symlink: -------------------------------------------------------------------------------- 1 | gem: --no-ri --no-rdoc 2 | -------------------------------------------------------------------------------- /services/Open in Linear.workflow/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSServices 6 | 7 | 8 | NSBackgroundColorName 9 | background 10 | NSIconName 11 | NSActionTemplate 12 | NSMenuItem 13 | 14 | default 15 | Open in Linear 16 | 17 | NSMessage 18 | runWorkflowAsService 19 | NSSendTypes 20 | 21 | public.utf8-plain-text 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /services/Open in Linear.workflow/Contents/QuickLook/Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robb/dotfiles/36abf98167d2a9cd51e23c773f39a4a5b640cdf1/services/Open in Linear.workflow/Contents/QuickLook/Thumbnail.png -------------------------------------------------------------------------------- /services/Open in Linear.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 527 7 | AMApplicationVersion 8 | 2.10 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.cocoa.string 25 | 26 | 27 | AMActionVersion 28 | 2.0.3 29 | AMApplication 30 | 31 | Automator 32 | 33 | AMParameterProperties 34 | 35 | COMMAND_STRING 36 | 37 | CheckedForUserDefaultShell 38 | 39 | inputMethod 40 | 41 | shell 42 | 43 | source 44 | 45 | 46 | AMProvides 47 | 48 | Container 49 | List 50 | Types 51 | 52 | com.apple.cocoa.string 53 | 54 | 55 | ActionBundlePath 56 | /System/Library/Automator/Run Shell Script.action 57 | ActionName 58 | Run Shell Script 59 | ActionParameters 60 | 61 | COMMAND_STRING 62 | open "linear://linear/issue/$1" 63 | CheckedForUserDefaultShell 64 | 65 | inputMethod 66 | 1 67 | shell 68 | /bin/bash 69 | source 70 | 71 | 72 | BundleIdentifier 73 | com.apple.RunShellScript 74 | CFBundleVersion 75 | 2.0.3 76 | CanShowSelectedItemsWhenRun 77 | 78 | CanShowWhenRun 79 | 80 | Category 81 | 82 | AMCategoryUtilities 83 | 84 | Class Name 85 | RunShellScriptAction 86 | InputUUID 87 | FC0DCDC7-2D41-4AD8-86BF-19E45912E12B 88 | Keywords 89 | 90 | Shell 91 | Script 92 | Command 93 | Run 94 | Unix 95 | 96 | OutputUUID 97 | CF5CF042-58EC-48F4-AD1D-8DFD2740B25E 98 | UUID 99 | E2767536-D697-4CCC-8F44-B711028EE4E5 100 | UnlocalizedApplications 101 | 102 | Automator 103 | 104 | arguments 105 | 106 | 0 107 | 108 | default value 109 | 0 110 | name 111 | inputMethod 112 | required 113 | 0 114 | type 115 | 0 116 | uuid 117 | 0 118 | 119 | 1 120 | 121 | default value 122 | 123 | name 124 | CheckedForUserDefaultShell 125 | required 126 | 0 127 | type 128 | 0 129 | uuid 130 | 1 131 | 132 | 2 133 | 134 | default value 135 | 136 | name 137 | source 138 | required 139 | 0 140 | type 141 | 0 142 | uuid 143 | 2 144 | 145 | 3 146 | 147 | default value 148 | 149 | name 150 | COMMAND_STRING 151 | required 152 | 0 153 | type 154 | 0 155 | uuid 156 | 3 157 | 158 | 4 159 | 160 | default value 161 | /bin/sh 162 | name 163 | shell 164 | required 165 | 0 166 | type 167 | 0 168 | uuid 169 | 4 170 | 171 | 172 | isViewVisible 173 | 174 | location 175 | 309.000000:305.000000 176 | nibPath 177 | /System/Library/Automator/Run Shell Script.action/Contents/Resources/Base.lproj/main.nib 178 | 179 | isViewVisible 180 | 181 | 182 | 183 | connectors 184 | 185 | workflowMetaData 186 | 187 | applicationBundleIDsByPath 188 | 189 | applicationPaths 190 | 191 | inputTypeIdentifier 192 | com.apple.Automator.text 193 | outputTypeIdentifier 194 | com.apple.Automator.nothing 195 | presentationMode 196 | 11 197 | processesInput 198 | 199 | serviceInputTypeIdentifier 200 | com.apple.Automator.text 201 | serviceOutputTypeIdentifier 202 | com.apple.Automator.nothing 203 | serviceProcessesInput 204 | 205 | systemImageName 206 | NSActionTemplate 207 | useAutomaticInputType 208 | 209 | workflowTypeIdentifier 210 | com.apple.Automator.servicesMenu 211 | 212 | 213 | 214 | -------------------------------------------------------------------------------- /services/Sort Selection.workflow/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSServices 6 | 7 | 8 | NSBackgroundColorName 9 | background 10 | NSIconName 11 | NSActionTemplate 12 | NSMenuItem 13 | 14 | default 15 | Sort Selection 16 | 17 | NSMessage 18 | runWorkflowAsService 19 | NSReturnTypes 20 | 21 | public.utf8-plain-text 22 | 23 | NSSendTypes 24 | 25 | public.utf8-plain-text 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /services/Sort Selection.workflow/Contents/QuickLook/Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robb/dotfiles/36abf98167d2a9cd51e23c773f39a4a5b640cdf1/services/Sort Selection.workflow/Contents/QuickLook/Thumbnail.png -------------------------------------------------------------------------------- /services/Sort Selection.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 444.39 7 | AMApplicationVersion 8 | 2.9 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.cocoa.string 25 | 26 | 27 | AMActionVersion 28 | 2.0.3 29 | AMApplication 30 | 31 | Automator 32 | 33 | AMParameterProperties 34 | 35 | COMMAND_STRING 36 | 37 | CheckedForUserDefaultShell 38 | 39 | inputMethod 40 | 41 | shell 42 | 43 | source 44 | 45 | 46 | AMProvides 47 | 48 | Container 49 | List 50 | Types 51 | 52 | com.apple.cocoa.string 53 | 54 | 55 | ActionBundlePath 56 | /System/Library/Automator/Run Shell Script.action 57 | ActionName 58 | Run Shell Script 59 | ActionParameters 60 | 61 | COMMAND_STRING 62 | sort | uniq 63 | CheckedForUserDefaultShell 64 | 65 | inputMethod 66 | 0 67 | shell 68 | /bin/bash 69 | source 70 | 71 | 72 | BundleIdentifier 73 | com.apple.RunShellScript 74 | CFBundleVersion 75 | 2.0.3 76 | CanShowSelectedItemsWhenRun 77 | 78 | CanShowWhenRun 79 | 80 | Category 81 | 82 | AMCategoryUtilities 83 | 84 | Class Name 85 | RunShellScriptAction 86 | InputUUID 87 | FC0DCDC7-2D41-4AD8-86BF-19E45912E12B 88 | Keywords 89 | 90 | Shell 91 | Script 92 | Command 93 | Run 94 | Unix 95 | 96 | OutputUUID 97 | CF5CF042-58EC-48F4-AD1D-8DFD2740B25E 98 | UUID 99 | E2767536-D697-4CCC-8F44-B711028EE4E5 100 | UnlocalizedApplications 101 | 102 | Automator 103 | 104 | arguments 105 | 106 | 0 107 | 108 | default value 109 | 0 110 | name 111 | inputMethod 112 | required 113 | 0 114 | type 115 | 0 116 | uuid 117 | 0 118 | 119 | 1 120 | 121 | default value 122 | 123 | name 124 | source 125 | required 126 | 0 127 | type 128 | 0 129 | uuid 130 | 1 131 | 132 | 2 133 | 134 | default value 135 | 136 | name 137 | CheckedForUserDefaultShell 138 | required 139 | 0 140 | type 141 | 0 142 | uuid 143 | 2 144 | 145 | 3 146 | 147 | default value 148 | 149 | name 150 | COMMAND_STRING 151 | required 152 | 0 153 | type 154 | 0 155 | uuid 156 | 3 157 | 158 | 4 159 | 160 | default value 161 | /bin/sh 162 | name 163 | shell 164 | required 165 | 0 166 | type 167 | 0 168 | uuid 169 | 4 170 | 171 | 172 | isViewVisible 173 | 174 | location 175 | 309.000000:305.000000 176 | nibPath 177 | /System/Library/Automator/Run Shell Script.action/Contents/Resources/Base.lproj/main.nib 178 | 179 | isViewVisible 180 | 181 | 182 | 183 | connectors 184 | 185 | workflowMetaData 186 | 187 | applicationBundleIDsByPath 188 | 189 | applicationPaths 190 | 191 | inputTypeIdentifier 192 | com.apple.Automator.text 193 | outputTypeIdentifier 194 | com.apple.Automator.text 195 | presentationMode 196 | 11 197 | processesInput 198 | 0 199 | serviceInputTypeIdentifier 200 | com.apple.Automator.text 201 | serviceOutputTypeIdentifier 202 | com.apple.Automator.text 203 | serviceProcessesInput 204 | 0 205 | systemImageName 206 | NSActionTemplate 207 | useAutomaticInputType 208 | 0 209 | workflowTypeIdentifier 210 | com.apple.Automator.servicesMenu 211 | 212 | 213 | 214 | -------------------------------------------------------------------------------- /services/services.install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "- Setting up Services" 4 | 5 | # Sort Selection 6 | cp -R ~/.dotfiles/services/Sort\ Selection.workflow ~/Library/Services/ 7 | defaults write -g NSUserKeyEquivalents -dict-add "Sort Selection" "@^s" 8 | 9 | # Open in Linear.app 10 | cp -R ~/.dotfiles/services/Open\ in\ Linear.workflow ~/Library/Services/ 11 | defaults write -g NSUserKeyEquivalents -dict-add "Open in Linear" "~@^l" 12 | -------------------------------------------------------------------------------- /starship/starship.install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "- Linking ~/.config/starship.toml" 4 | 5 | mkdir -p ~/.config 6 | rm -f ~/.config/starship.toml 7 | 8 | ln -sF ~/.dotfiles/starship/starship.toml ~/.config/starship.toml 9 | -------------------------------------------------------------------------------- /starship/starship.toml: -------------------------------------------------------------------------------- 1 | add_newline = false 2 | format = """ 3 | $character$directory$git_branch$git_status ${custom.separator}""" 4 | right_format = """${custom.swift}""" 5 | 6 | [character] 7 | error_symbol = "[􀇿 ](bold fg:#FFCC00)" 8 | success_symbol = "[􀒆 ](bold)" 9 | 10 | [directory] 11 | format = "[$path]($style)[$read_only]($read_only_style)" 12 | style = "bold" 13 | truncate_to_repo = false 14 | truncation_length = 2 15 | 16 | [git_branch] 17 | format = " at [$branch(:$remote_branch)]($style)" 18 | style = "bold" 19 | truncation_length = 20 20 | 21 | [git_status] 22 | ahead = "(􀄨 ${count})" 23 | behind = "(􀄩 ${count})" 24 | diverged = "(􀄨 ${ahead_count}, 􀄩 ${behind_count})" 25 | format = "[(([,]() $ahead_behind))]($style)" 26 | staged = "􀈸 " 27 | stashed = "" 28 | style = "bold" 29 | untracked = "􀈷 " 30 | 31 | [swift] 32 | disabled = true 33 | 34 | [custom.separator] 35 | command = "prompt_separator" 36 | description = "A custom separator, indicating the style of the repo" 37 | format = "[($output )]($style)" 38 | style = "bold" 39 | when = true 40 | 41 | [custom.swift] 42 | description = "Current directory contains a Swift Project" 43 | detect_extensions = ["swift", "xcodeproj"] 44 | format = " [$symbol]($style)" 45 | style = "fg:#bf5700" 46 | symbol = "􀫊 " 47 | when = "[ -n \"$(find . -maxdepth 1 -type d -name '*.xcodeproj' 2>/dev/null)\" ] || exit 1" 48 | -------------------------------------------------------------------------------- /vim/.vimrc.symlink: -------------------------------------------------------------------------------- 1 | " Enable syntax highlighting 2 | syntax on 3 | 4 | " Enable utf-8 encoding 5 | if has("multi_byte") 6 | if &termencoding == "" 7 | let &termencoding = &encoding 8 | endif 9 | set encoding=utf-8 10 | setglobal fileencoding=utf-8 11 | "setglobal bomb 12 | set fileencodings=ucs-bom,utf-8,latin1 13 | endif 14 | 15 | " Switch between relative and absolute line numbers 16 | " when entering or leaving insert mode 17 | if version >= 703 18 | set rnu 19 | au InsertEnter * :set nu 20 | au InsertLeave * :set rnu 21 | au FocusLost * :set nu 22 | au FocusGained * :set rnu 23 | endif 24 | 25 | " Display invisible characters 26 | " 27 | " For utf-8 use the following characters 28 | " 29 | " ▸ for tabs 30 | " . for trailing spaces 31 | " ¬ for line breaks 32 | " 33 | " otherwise, fall back to 34 | " 35 | " > for tabs 36 | " . for trailing spaces 37 | " - for line breaks 38 | " 39 | if &encoding == "utf-8" 40 | set list 41 | set listchars=tab:▸\ ,trail:.,eol:¬ 42 | else 43 | set list 44 | set listchars=tab:>\ ,trail:.,eol:- 45 | endif 46 | 47 | " Treat Podfiles like ruby 48 | au BufRead,BufNewFile Podfile set filetype=ruby 49 | 50 | " Automatically wrap git commits at 72 characters 51 | au FileType gitcommit set tw=72 52 | 53 | " Color invisible characters 54 | " 55 | " NonText affects eol, extends and precedes 56 | " SpecialKey affects nbsp, tab and trail 57 | highlight NonText ctermfg=DarkGrey 58 | highlight SpecialKey ctermfg=DarkGrey 59 | 60 | " Italicize comments 61 | highlight Comment cterm=Italic 62 | 63 | " Color line numbers 64 | highlight LineNr ctermfg=DarkGrey 65 | 66 | " Quickly pressing j twice exits insert mode 67 | :imap jj 68 | -------------------------------------------------------------------------------- /vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "ctrl+cmd+s", 4 | "command": "editor.action.sortLinesAscending", 5 | "when": "editorHasSelection" 6 | }, 7 | { 8 | "key": "ctrl+cmd+e", 9 | "command": "editor.action.rename", 10 | "when": "editorHasRenameProvider && editorTextFocus && !editorReadonly" 11 | }, 12 | { 13 | "key": "cmd+K", 14 | "command": "workbench.action.terminal.clear", 15 | "when": "terminalFocus" 16 | }, 17 | { 18 | "key": "ctrl+cmd+l", 19 | "command": "gitblame.quickInfo" 20 | }, 21 | { 22 | "key": "shift+cmd+l", 23 | "command": "editor.action.insertCursorAtEndOfEachLineSelected", 24 | "when": "editorTextFocus" 25 | }, 26 | { 27 | "key": "shift+alt+i", 28 | "command": "-editor.action.insertCursorAtEndOfEachLineSelected", 29 | "when": "editorTextFocus" 30 | }, 31 | { 32 | "key": "ctrl+shift+up", 33 | "command": "editor.action.insertCursorAbove", 34 | "when": "editorTextFocus" 35 | }, 36 | { 37 | "key": "ctrl+shift+down", 38 | "command": "editor.action.insertCursorBelow", 39 | "when": "editorTextFocus" 40 | }, 41 | { 42 | "key": "alt+cmd+down", 43 | "command": "-editor.action.insertCursorBelow", 44 | "when": "editorTextFocus" 45 | }, 46 | { 47 | "key": "alt+cmd+up", 48 | "command": "-editor.action.insertCursorAbove", 49 | "when": "editorTextFocus" 50 | }, 51 | { 52 | "key": "cmd+1", 53 | "command": "workbench.action.openEditorAtIndex1" 54 | }, 55 | { 56 | "key": "ctrl+1", 57 | "command": "-workbench.action.openEditorAtIndex1" 58 | }, 59 | { 60 | "key": "cmd+2", 61 | "command": "workbench.action.openEditorAtIndex2" 62 | }, 63 | { 64 | "key": "ctrl+2", 65 | "command": "-workbench.action.openEditorAtIndex2" 66 | }, 67 | { 68 | "key": "cmd+3", 69 | "command": "workbench.action.openEditorAtIndex3" 70 | }, 71 | { 72 | "key": "ctrl+3", 73 | "command": "-workbench.action.openEditorAtIndex3" 74 | }, 75 | { 76 | "key": "cmd+4", 77 | "command": "workbench.action.openEditorAtIndex4" 78 | }, 79 | { 80 | "key": "ctrl+4", 81 | "command": "-workbench.action.openEditorAtIndex4" 82 | }, 83 | { 84 | "key": "cmd+5", 85 | "command": "workbench.action.openEditorAtIndex5" 86 | }, 87 | { 88 | "key": "ctrl+5", 89 | "command": "-workbench.action.openEditorAtIndex5" 90 | }, 91 | { 92 | "key": "cmd+6", 93 | "command": "workbench.action.openEditorAtIndex6" 94 | }, 95 | { 96 | "key": "ctrl+6", 97 | "command": "-workbench.action.openEditorAtIndex6" 98 | }, 99 | { 100 | "key": "cmd+7", 101 | "command": "workbench.action.openEditorAtIndex7" 102 | }, 103 | { 104 | "key": "ctrl+7", 105 | "command": "-workbench.action.openEditorAtIndex7" 106 | }, 107 | { 108 | "key": "cmd+8", 109 | "command": "workbench.action.openEditorAtIndex8" 110 | }, 111 | { 112 | "key": "ctrl+8", 113 | "command": "-workbench.action.openEditorAtIndex8" 114 | }, 115 | { 116 | "key": "cmd+9", 117 | "command": "workbench.action.openEditorAtIndex9" 118 | }, 119 | { 120 | "key": "ctrl+9", 121 | "command": "-workbench.action.openEditorAtIndex9" 122 | }, 123 | { 124 | "key": "cmd+0", 125 | "command": "workbench.action.lastEditorInGroup" 126 | }, 127 | { 128 | "key": "ctrl+0", 129 | "command": "-workbench.action.lastEditorInGroup" 130 | } 131 | ] 132 | -------------------------------------------------------------------------------- /vscode/link-settings.install: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/fish 2 | 3 | echo "- Linking VS Code Settings" 4 | 5 | # Link VS Code settings 6 | mkdir -p ~/Library/Application\ Support/Code/User/ 7 | 8 | ln -sf ~/.dotfiles/vscode/settings.json ~/Library/Application\ Support/Code/User/settings.json 9 | ln -sf ~/.dotfiles/vscode/keybindings.json ~/Library/Application\ Support/Code/User/keybindings.json 10 | -------------------------------------------------------------------------------- /vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[markdown]": { 3 | "files.trimTrailingWhitespace": false 4 | }, 5 | "editor.bracketPairColorization.enabled": true, 6 | "editor.cursorStyle": "line-thin", 7 | "editor.fontFamily": "'SF Mono', 'SF Pro', Monaco, 'Courier New', monospace", 8 | "editor.fontLigatures": true, 9 | "editor.fontSize": 13, 10 | "editor.fontWeight": "300", 11 | "editor.formatOnPaste": true, 12 | "editor.formatOnSave": true, 13 | "editor.inlineSuggest.enabled": true, 14 | "editor.lineHeight": 24, 15 | "editor.minimap.enabled": false, 16 | "editor.multiCursorModifier": "ctrlCmd", 17 | "editor.renderControlCharacters": true, 18 | "editor.renderWhitespace": "all", 19 | "editor.rulers": [ 20 | 80 21 | ], 22 | "editor.showFoldingControls": "always", 23 | "editor.snippetSuggestions": "top", 24 | "editor.trimAutoWhitespace": true, 25 | "explorer.confirmDelete": false, 26 | "explorer.confirmDragAndDrop": false, 27 | "extensions.ignoreRecommendations": true, 28 | "files.associations": { 29 | "*.ldjson": "json", 30 | "*.podspec": "ruby", 31 | "*.swiftinterface": "swift" 32 | }, 33 | "files.exclude": { 34 | "**/.build": true, 35 | "**/.DS_Store": true, 36 | "**/.git": true, 37 | "**/.github": true, 38 | "**/.hg": true, 39 | "**/.svn": true, 40 | "**/.swiftpm": true, 41 | "**/.swp": true, 42 | "**/*.playground/timeline.xctimeline": true, 43 | "**/*.xcworkspace": true, 44 | "**/CVS": true 45 | }, 46 | "files.insertFinalNewline": true, 47 | "files.trimTrailingWhitespace": true, 48 | "git.confirmSync": false, 49 | "redhat.telemetry.enabled": false, 50 | "search.useGlobalIgnoreFiles": true, 51 | "sublimeTextKeymap.promptV3Features": true, 52 | "telemetry.enableCrashReporter": false, 53 | "telemetry.enableTelemetry": false, 54 | "terminal.integrated.cursorBlinking": true, 55 | "terminal.integrated.cursorStyle": "underline", 56 | "terminal.integrated.env.osx": {}, 57 | "terminal.integrated.fontFamily": "'SF Mono', 'SF Pro', monospace", 58 | "terminal.integrated.fontSize": 13, 59 | "terminal.integrated.fontWeight": "400", 60 | "terminal.integrated.fontWeightBold": "800", 61 | "terminal.integrated.lineHeight": 1.5, 62 | "tslint.autoFixOnSave": true, 63 | "typescript.format.semicolons": "insert", 64 | "typescript.surveys.enabled": false, 65 | "window.titleBarStyle": "native", 66 | "workbench.activityBar.visible": false, 67 | "workbench.colorCustomizations": { 68 | "terminal.ansiBlack": "#000000", 69 | "terminal.ansiBlue": "#5240C9", 70 | "terminal.ansiBrightBlack": "#666666", 71 | "terminal.ansiBrightBlue": "#0000FF", 72 | "terminal.ansiBrightCyan": "#00E5E5", 73 | "terminal.ansiBrightGreen": "#68BF49", 74 | "terminal.ansiBrightMagenta": "#CF57D7", 75 | "terminal.ansiBrightRed": "#C14D35", 76 | "terminal.ansiBrightWhite": "#E5E5E5", 77 | "terminal.ansiBrightYellow": "#B6B248", 78 | "terminal.ansiCyan": "#00A6B2", 79 | "terminal.ansiGreen": "#00A600", 80 | "terminal.ansiMagenta": "#B200B2", 81 | "terminal.ansiRed": "#BF4C35", 82 | "terminal.ansiWhite": "#BFBFBF", 83 | "terminal.ansiYellow": "#999900", 84 | "terminal.background": "#171717", 85 | "terminal.foreground": "#FFFFFF" 86 | }, 87 | "workbench.colorTheme": "Solarized Dark", 88 | "workbench.startupEditor": "newUntitledFile", 89 | "workbench.statusBar.feedback.visible": false, 90 | "css.format.enable": false, 91 | "html.format.enable": false, 92 | "[typescript]": { 93 | "editor.defaultFormatter": "denoland.vscode-deno" 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /xcode/settings.install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Xcode specific settings 4 | 5 | echo "- Setting up Xcode" 6 | 7 | # Trim trailing whitespace 8 | defaults write com.apple.dt.Xcode DVTTextEditorTrimTrailingWhitespace -bool true 9 | 10 | # Trim whitespace only lines 11 | defaults write com.apple.dt.Xcode DVTTextEditorTrimWhitespaceOnlyLines -bool true 12 | 13 | # Show invisible characters 14 | defaults write com.apple.dt.Xcode DVTTextShowInvisibleCharacters -bool true 15 | 16 | # Show line numbers 17 | defaults write com.apple.dt.Xcode DVTTextShowLineNumbers -bool true 18 | 19 | # Show ruler at 80 chars 20 | defaults write com.apple.dt.Xcode DVTTextShowPageGuide -bool true 21 | defaults write com.apple.dt.Xcode DVTTextPageGuideLocation -int 80 22 | 23 | # Enable internal debug menu 24 | defaults write com.apple.dt.Xcode ShowDVTDebugMenu -bool true 25 | 26 | # Map ⌘D to select the next occurrence of the current selection 27 | defaults write com.apple.dt.Xcode NSUserKeyEquivalents -dict-add "Select Next Occurrence" "@d" 28 | 29 | # Map ⌃⌘L to show last change for the current line 30 | defaults write com.apple.dt.Xcode NSUserKeyEquivalents -dict-add "Show Last Change for Line" "@^l" 31 | 32 | # Map ⇧⌘L to adding cursors to line ends 33 | defaults write com.apple.dt.Xcode NSUserKeyEquivalents -dict-add "Split Selection By Lines" "@\$l" 34 | 35 | # Ignore whitespace changes for blame 36 | defaults write com.apple.dt.Xcode DVTDiffSessionIgnoreWhitespaceKey -bool true 37 | 38 | # Show Code Folding Ribbon 39 | defaults write com.apple.dt.Xcode DVTTextShowFoldingSidebar -bool true 40 | 41 | # Show All File Extensions 42 | defaults write com.apple.dt.Xcode IDEFileExtensionDisplayMode -int 1 --------------------------------------------------------------------------------