diff --git a/command_line.yml b/command_line.yml new file mode 100644 index 0000000..e38980d --- /dev/null +++ b/command_line.yml @@ -0,0 +1,16 @@ +--- +- hosts: localhost + connection: local + become: false + + pre_tasks: + - name: Check for Command Line Tools + shell: xcode-select -p | echo $? + register: xcode_output + changed_when: False + + - name: Install Command Line Tools + fail: + msg: Command Line Tools should be installed...Run xcode-select --install + when: + - xcode_output.stdout != "0" diff --git a/dock.yml b/dock.yml new file mode 100644 index 0000000..865f443 --- /dev/null +++ b/dock.yml @@ -0,0 +1,57 @@ +--- +- hosts: localhost + connection: local + become: false + + tasks: + - name: Set autohide to true + community.general.osx_defaults: + domain: com.apple.dock + key: autohide + type: bool + value: true + notify: Reload Dock + + - name: Set autohide-delay to 0 + community.general.osx_defaults: + domain: com.apple.dock + key: autohide-delay + type: float + value: 0 + notify: Reload Dock + + - name: Set dock magnification + community.general.osx_defaults: + domain: com.apple.dock + key: magnification + type: bool + value: true + notify: Reload Dock + + - name: Set Magnification Size + community.general.osx_defaults: + domain: com.apple.dock + key: largesize + type: int + value: 128 + notify: Reload Dock + + - name: Set default tilesize + community.general.osx_defaults: + domain: com.apple.dock + key: tilesize + type: int + value: 16 + notify: Reload Dock + + - name: Set minimize to application value + community.general.osx_defaults: + domain: com.apple.dock + key: minimize-to-application + type: bool + value: true + notify: Reload Dock + + handlers: + - name: Reload Dock + shell: killall -u {{ lookup('env', 'USER') }} cfprefsd && killall Dock \ No newline at end of file diff --git a/files/.aliases.zsh.j2 b/files/.aliases.zsh.j2 new file mode 100644 index 0000000..cb46085 --- /dev/null +++ b/files/.aliases.zsh.j2 @@ -0,0 +1 @@ +alias zshconfig="code ~/.zshrc" \ No newline at end of file diff --git a/zsh/.zshrc b/files/.zshrc.j2 similarity index 87% rename from zsh/.zshrc rename to files/.zshrc.j2 index c49672f..5f9f9fd 100644 --- a/zsh/.zshrc +++ b/files/.zshrc.j2 @@ -2,7 +2,7 @@ #export PATH=$HOME/bin:/usr/local/bin:~/.composer/vendor/bin:/usr/local/sbin:$PATH # Path to your oh-my-zsh installation. -export ZSH="/Users/kindred/.oh-my-zsh" +export ZSH="$HOME/.oh-my-zsh" # Set name of the theme to load --- if set to "random", it will # load a random theme each time oh-my-zsh is loaded, in which case, @@ -96,18 +96,11 @@ source $ZSH/oh-my-zsh.sh # For a full list of active aliases, run `alias`. # # Example aliases -alias zshconfig="code ~/.zshrc" - export XDEBUG_CONFIG="idekey=VSCODE" -export PATH="/usr/local/sbin:$PATH" -export PATH="$HOME/Code/repos/slic:$PATH" -export NVM_DIR="$HOME/.nvm" - -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion -source ~/.squareone_completion.zsh +# nvm +export NVM_DIR="$HOME/.nvm" +[ -s "$HOMEBREW_PREFIX/opt/nvm/nvm.sh" ] && \. "$HOMEBREW_PREFIX/opt/nvm/nvm.sh" # This loads nvm +[ -s "$HOMEBREW_PREFIX/opt/nvm/etc/bash_completion.d/nvm" ] && \. "$HOMEBREW_PREFIX/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion -alias dokku='ssh -t dokku@moderntribe.qa' -alias dokku-t4='ssh -t dokku@t4.moderntribe.qa' -alias dokku-dev='ssh -t dokku@d1.moderntribe.qa' \ No newline at end of file +source ~/.aliases.zsh diff --git a/files/cobalt2.zsh-theme b/files/cobalt2.zsh-theme new file mode 100644 index 0000000..28f5430 --- /dev/null +++ b/files/cobalt2.zsh-theme @@ -0,0 +1,102 @@ +# +# Cobalt2 Theme - https://github.com/wesbos/Cobalt2-iterm +# +# # README +# +# In order for this theme to render correctly, you will need a +# [Powerline-patched font](https://gist.github.com/1595572). +## +### Segment drawing +# A few utility functions to make it easy and re-usable to draw segmented prompts + +CURRENT_BG='NONE' +SEGMENT_SEPARATOR='' + +# Begin a segment +# Takes two arguments, background and foreground. Both can be omitted, +# rendering default background/foreground. +prompt_segment() { + local bg fg + [[ -n $1 ]] && bg="%K{$1}" || bg="%k" + [[ -n $2 ]] && fg="%F{$2}" || fg="%f" + if [[ $CURRENT_BG != 'NONE' && $1 != $CURRENT_BG ]]; then + echo -n " %{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%} " + else + echo -n "%{$bg%}%{$fg%} " + # echo $(pwd | sed -e "s,^$HOME,~," | sed "s@\(.\)[^/]*/@\1/@g") + # echo $(pwd | sed -e "s,^$HOME,~,") + fi + CURRENT_BG=$1 + [[ -n $3 ]] && echo -n $3 +} + +# End the prompt, closing any open segments +prompt_end() { + if [[ -n $CURRENT_BG ]]; then + echo -n " %{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR" + else + echo -n "%{%k%}" + fi + echo -n "%{%f%}" + CURRENT_BG='' +} + +### Prompt components +# Each component will draw itself, and hide itself if no information needs to be shown + +# Context: user@hostname (who am I and where am I) +prompt_context() { + local user=`whoami` + + if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then + prompt_segment black default "%(!.%{%F{yellow}%}.)✝" + fi +} + +# Git: branch/detached head, dirty status +prompt_git() { + local ref dirty + if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then + ZSH_THEME_GIT_PROMPT_DIRTY='±' + dirty=$(parse_git_dirty) + ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)" + if [[ -n $dirty ]]; then + prompt_segment yellow black + else + prompt_segment green black + fi + echo -n "${ref/refs\/heads\// }$dirty" + fi +} + +# Dir: current working directory +prompt_dir() { + prompt_segment blue black '%3~' + # prompt_segment blue black "…${PWD: -30}" +} + +# Status: +# - was there an error +# - am I root +# - are there background jobs? +prompt_status() { + local symbols + symbols=() + [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘" + [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡" + [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙" + + [[ -n "$symbols" ]] && prompt_segment black default "$symbols" +} + +## Main prompt +build_prompt() { + RETVAL=$? + prompt_status + prompt_context + prompt_dir + prompt_git + prompt_end +} + +PROMPT='%{%f%b%k%}$(build_prompt) ' diff --git a/vs-code/User/settings.json b/files/vs-code-settings.json similarity index 75% rename from vs-code/User/settings.json rename to files/vs-code-settings.json index a0eb5d8..f3a87bf 100644 --- a/vs-code/User/settings.json +++ b/files/vs-code-settings.json @@ -1,15 +1,15 @@ { "editor.lineHeight": 22, "editor.fontFamily": "Fira Code", - "editor.fontLigatures": true, - "editor.fontSize": 11, + "editor.fontLigatures": false, + "editor.fontSize": 13, "editor.rulers": [80], "editor.insertSpaces": false, "editor.tabSize": 4, "debug.allowBreakpointsEverywhere": true, "terminal.external.osxExec": "iterm.app", - "terminal.integrated.fontFamily": "Fira Code", - "terminal.integrated.fontSize": 11, + "terminal.integrated.fontFamily": "Inconsolata for Powerline", + "terminal.integrated.fontSize": 12, "terminal.integrated.lineHeight": 1.5, "workbench.startupEditor": "newUntitledFile", "workbench.fontAliasing": "antialiased", @@ -21,13 +21,8 @@ }, "workbench.iconTheme": "material-icon-theme", "workbench.sideBar.location": "right", - "explorer.openEditors.visible": 0, + "explorer.openEditors.visible": 1, "workbench.settings.editor": "json", - "breadcrumbs.enabled": false, - "workbench.activityBar.visible": true, - "files.exclude": { - "**/.git": false - }, "launch": { "configurations": [ { @@ -93,10 +88,8 @@ ], "compounds": [] }, - "svgviewer.showzoominout": true, "security.workspace.trust.untrustedFiles": "open", - "workbench.editor.untitled.hint": "hidden", - "intelephense.environment.phpVersion": "7.4.22", + "intelephense.environment.phpVersion": "8.0", "editor.inlineSuggest.enabled": true, "github.copilot.enable": { "*": true, @@ -107,19 +100,37 @@ "intelephense.environment.shortOpenTag": false, "intelephense.format.braces": "k&r", "editor.renderWhitespace": "none", - "php.validate.executablePath": "/usr/local/bin/php", + "php.validate.executablePath": "/opt/homebrew/bin/php", "json.maxItemsComputed": 15000, "intelephense.phpdoc.returnVoid": false, "php-docblocker.returnVoid": false, "php-docblocker.useShortNames": true, "workbench.colorTheme": "Night Owl", "editor.minimap.enabled": false, - "[php]": { - "editor.defaultFormatter": "valeryanm.vscode-phpsab" + "redhat.telemetry.enabled": false, + "phpstan.autoloadFile": "", + "phpstan.configuration": "", + "phpstan.level": "config", + "phpstan.memoryLimit": "-1M", + "phpstan.noProgress": false, + "[html]": { + "editor.defaultFormatter": "mohd-akram.vscode-html-format" }, + "intelephense.telemetry.enabled": false, + "editor.unicodeHighlight.ambiguousCharacters": false, + "workbench.editor.empty.hint": "hidden", + "cSpell.enableFiletypes": [ + "md" + ], "cSpell.userWords": [ - "kwcusgs", - "Shortcode", - "USGS" + "Dokku", + "Lando", + "lighthouserc", + "lndo", + "Slic" ], + "diffEditor.ignoreTrimWhitespace": false, + "phpsab.snifferShowSources": true, + "security.promptForLocalFileProtocolHandling": false, + "playwright.reuseBrowser": false, } \ No newline at end of file diff --git a/files/vs-code-snippets.code-snippets b/files/vs-code-snippets.code-snippets new file mode 100644 index 0000000..f74c4d4 --- /dev/null +++ b/files/vs-code-snippets.code-snippets @@ -0,0 +1,10 @@ +{ + "WP-Debug-Log": { + "scope": "php", + "prefix": "wp_error_log", + "body": [ + "error_log( print_r( $1, true ) );" + ], + "description": "Write to the WordPress Error Log." + } +} \ No newline at end of file diff --git a/homebrew.yml b/homebrew.yml new file mode 100644 index 0000000..bcf4cdc --- /dev/null +++ b/homebrew.yml @@ -0,0 +1,65 @@ +--- +- hosts: localhost + connection: local + + tasks: + - name: Ensure Homebrew is installed + shell: NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + args: + creates: /opt/homebrew/bin/brew + + - name: Updating Homebrew + homebrew: + update_homebrew: true + upgrade: true + + # Required by Lando + - name: Ensure Rosetta 2 is installed + shell: | + /usr/sbin/softwareupdate --install-rosetta --agree-to-license + args: + creates: /Library/Apple/usr/share/rosetta + + - name: Install core packages via brew casks + community.general.homebrew_cask: + name: + - 1password + - alfred + - appcleaner + - arc + - droplr + - font-fira-code-nerd-font + - font-hack-nerd-font + - font-inconsolata-for-powerline + - google-chrome + - imageOptim + - iterm2 + - lando + - local + - orbstack + - postman + - prismlauncher + - screenflow + - slack + - tableplus + - transmit + - visual-studio-code + - zoom + state: present + accept_external_apps: true + + - name: Install core packages via brew + community.general.homebrew: + name: + - awscli + - composer + - ffmpeg + - jq + - mas + - nvm + - php + - python3 + - terraform + - tmux + - wp-cli + state: present diff --git a/local.yml b/local.yml new file mode 100644 index 0000000..de73291 --- /dev/null +++ b/local.yml @@ -0,0 +1,10 @@ +--- +- import_playbook: homebrew.yml +- import_playbook: command_line.yml +- import_playbook: vs_code.yml +- import_playbook: mac_os_apps.yml +- import_playbook: zsh.yml +- import_playbook: dock.yml + + + diff --git a/mac_os_apps.yml b/mac_os_apps.yml new file mode 100644 index 0000000..4e480ad --- /dev/null +++ b/mac_os_apps.yml @@ -0,0 +1,11 @@ +--- +- hosts: localhost + connection: local + become: false + + tasks: + - name: Install Mac App Store Apps + community.general.mas: + id: # Use `mas search 'APP_NAME'` to find id. + - 1569813296 # 1Password for Safari + - 904280696 # Things 3 \ No newline at end of file diff --git a/old/readme.md b/old/readme.md new file mode 100644 index 0000000..c5896d3 --- /dev/null +++ b/old/readme.md @@ -0,0 +1,39 @@ +# Summary + +This repo documents the current setup that I am using. The goal is to setup a +single script to install everything in the case of needing to wipe a computer +but just documenting the process is good too. + +## OS Settings + +- Set the Dock to `Automatically hide and show the dock`. +- Set the icons to be smallest possible size. +- Don't `Animate opening applications` + +## Remove Dock Show Delay. + +One of the issues with hiding the dock is the delay that it has when showing. The below command removes that delay. + +``` sh +defaults write com.apple.Dock autohide-delay -float 0; killall Dock + +defaults write com.apple.dock autohide-time-modifier -float .5; killall Dock +defaults write com.apple.dock tilesize -integer 8; killall Dock +defaults write com.apple.dock largesize -integer 128; killall Dock + +defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder + +``` + +## Hold Down key for repeat + +``` sh +defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false +``` + +## Custom screenshot path + +``` sh +mkdir ~/Pictures/screenshots +defaults write com.apple.screencapture location ~/Pictures/screenshots && killall SystemUIServer +``` diff --git a/readme.md b/readme.md index 105f9d8..41e4aec 100644 --- a/readme.md +++ b/readme.md @@ -1,73 +1,23 @@ -# Summary +# Mac OS setup via Ansible -This repo documents the current setup that I am using. The goal is to setup a -single script to install everything in the case of needing to wipe a computer -but just documenting the process is good too. +This repo is the setup process for my MacOS systems using ansible-pull. It will change over time. -## Applications +## Getting Started -- [1password7](https://1password.com/) * -- [Alphed 4](https://www.alfredapp.com/) -- [Brave Browser](https://brave.com) -- [Google Chrome](https://www.google.com/chrome/) -- [ImageOptim](https://imageoptim.com/mac) -- [iTerm](https://iterm2.com/) -- [Local by Flywheel](https://localbyflywheel.com/) -- [Postman](https://www.getpostman.com/) -- [Slack](https://slack.com/) -- [Things](https://culturedcode.com/things/) * -- [Transmit](https://panic.com/transmit/) -- [VS Code](vs-code/readme.md) -- [Docker](https://docs.docker.com/desktop/mac/apple-silicon/) -- [Lando]() -- [ScreenFlow]() +Install Homebrew -*Available through the App Store - -## Development Environment Items - -- Brew -- [Fira-Code Font](https://github.com/tonsky/FiraCode) -- Composer -- zsh & oh-my-zsh -- Git -- NPM -- homestead -- PHPCS -- WPCS - -## OS Settings - -- Set the Dock to `Automatically hide and show the dock`. -- Set the icons to be smallest possible size. -- Don't `Animate opening applications` - -#### Remove Dock Show Delay - -One of the issues with hiding the dock is the delay that it has when showing. The below command removes that delay. - -``` sh -defaults write com.apple.Dock autohide-delay -float 0; killall Dock +``` bash +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -#### Hold Down key for repeat +Install Ansible with Homebrew -``` sh -defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false +``` bash +brew install ansible ``` -#### Custom screenshot path +Run ansible-pull -``` sh -mkdir ~/Pictures/screenshots -defaults write com.apple.screencapture location ~/Pictures/screenshots && killall SystemUIServer +``` bash +ansible-pull -U URL_TO_GIT_REPO [-C BRANCH] [PLAYBOOK] ``` - -### Brew Install a few things - -``` sh -brew tap homebrew/cask-fonts -brew install --cask iterm2 alfred slack visual-studio-code 1password droplr zoom brave-browser tableplus transmit font-fira-code-nerd-font tinkerwell postman google-chrome imageoptim postman spaceship php composer nvm local -``` - -Some depending on the chipset (Apple/Intel) some of these apps might need to be reinstalled through their websites. diff --git a/vs-code/User/snippets/css.json b/vs-code/User/snippets/css.json deleted file mode 100644 index c6b1fce..0000000 --- a/vs-code/User/snippets/css.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - // Place your snippets for css here. Each snippet is defined under a snippet name and has a prefix, body and - // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: - // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the - // same ids are connected. - // Example: - // "Print to console": { - // "prefix": "log", - // "body": [ - // "console.log('$1');", - // "$2" - // ], - // "description": "Log output to console" - // } -} \ No newline at end of file diff --git a/vs-code/User/snippets/myGlobal.code-snippets b/vs-code/User/snippets/myGlobal.code-snippets deleted file mode 100644 index 9f4fab3..0000000 --- a/vs-code/User/snippets/myGlobal.code-snippets +++ /dev/null @@ -1,20 +0,0 @@ -{ - "WP-Debug-Log": { - "scope": "php", - "prefix": "wp_error_log", - "body": [ - "error_log( print_r( $1, true ) );" - ], - "description": "Write to the WordPress Error Log." - }, - "box-sizing": { - "scope": "css,scss", - "prefix": "d-box-sizing", - "body": [ - "* {", - "\tbox-sizing: border-box;", - "}" - ], - "description": "The first line for all css." - } -} \ No newline at end of file diff --git a/vs-code/readme.md b/vs-code/readme.md deleted file mode 100644 index 4eb820f..0000000 --- a/vs-code/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# [VS Code](https://code.visualstudio.com/) - -```sh -brew cask install visual-studio-code -``` - -## Settings - -The settings for vs code are located in `~/Library/Application Support/Code/User/`. Copy the User folder from this repo there. - -## Extensions - -``` sh -code --install-extension bierner.markdown-mermaid -code --install-extension bmewburn.vscode-intelephense-client -code --install-extension bradlc.vscode-tailwindcss -code --install-extension breezelin.phpstan -code --install-extension cssho.vscode-svgviewer -code --install-extension DavidAnson.vscode-markdownlint -code --install-extension DotJoshJohnson.xml -code --install-extension eamodio.gitlens -code --install-extension EditorConfig.EditorConfig -code --install-extension formulahendry.auto-close-tag -code --install-extension formulahendry.auto-rename-tag -code --install-extension GitHub.codespaces -code --install-extension GitHub.github-vscode-theme -code --install-extension jebbs.plantuml -code --install-extension johnbillion.vscode-wordpress-hooks -code --install-extension ms-vscode-remote.remote-containers -code --install-extension ms-vsliveshare.vsliveshare -code --install-extension naumovs.color-highlight -code --install-extension neilbrayfield.php-docblocker -code --install-extension PKief.material-icon-theme -code --install-extension redhat.vscode-yaml -code --install-extension sdras.night-owl -code --install-extension SimplyDanny.modelica -code --install-extension streetsidesoftware.code-spell-checker -code --install-extension Tyriar.sort-lines -code --install-extension valeryanm.vscode-phpsab -code --install-extension vincaslt.highlight-matching-tag -code --install-extension Vue.volar -code --install-extension wayou.vscode-todo-highlight -code --install-extension whatwedo.twig -code --install-extension wwm.better-align -code --install-extension xdebug.php-debug -``` diff --git a/vs_code.yml b/vs_code.yml new file mode 100644 index 0000000..b0b2d01 --- /dev/null +++ b/vs_code.yml @@ -0,0 +1,89 @@ +--- +- hosts: localhost + connection: local + become: false + + tasks: + - name: Ensure Homebrew is installed + shell: NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + args: + creates: /opt/homebrew/bin/brew + + - name: Updating Homebrew + homebrew: + update_homebrew: true + upgrade: true + + - name: Install core packages via brew casks + community.general.homebrew_cask: + name: visual-studio-code + state: present + accept_external_apps: true + + - name: Install Extensions + shell: code --install-extension {{ item }} + register: code_extension + changed_when: "'was successfully installed' in code_extension.stdout" + with_items: + - bierner.markdown-mermaid + - bmewburn.vscode-intelephense-client + - bradlc.vscode-tailwindcss + - breezelin.phpstan + - chouzz.vscode-better-align + - davidanson.vscode-markdownlint + - dotjoshjohnson.xml + - eamodio.gitlens + - editorconfig.editorconfig + - formulahendry.auto-close-tag + - formulahendry.auto-rename-tag + - github.codespaces + - github.copilot + - github.copilot-chat + - github.github-vscode-theme + - hashicorp.terraform + - jebbs.plantuml + - johnbillion.vscode-wordpress-hooks + - mohd-akram.vscode-html-format + - ms-azuretools.vscode-docker + - ms-playwright.playwright + - ms-python.debugpy + - ms-python.python + - ms-python.vscode-pylance + - ms-vscode-remote.remote-containers + - ms-vsliveshare.vsliveshare + - naumovs.color-highlight + - neilbrayfield.php-docblocker + - phproberto.vscode-php-getters-setters + - pkief.material-icon-theme + - redhat.vscode-yaml + - sdras.night-owl + - simonsiefke.svg-preview + - simplydanny.modelica + - streetsidesoftware.code-spell-checker + - tyriar.sort-lines + - valeryanm.vscode-phpsab + - vincaslt.highlight-matching-tag + - vue.volar + - wayou.vscode-todo-highlight + - whatwedo.twig + - xdebug.php-debug + + - name: Move VS Code Config + copy: + src: ./files/vs-code-settings.json + dest: /Users/{{ lookup('env', 'USER') }}/Library/Application Support/Code/User/settings.json + owner: "{{ lookup('env', 'USER') }}" + force: yes + + - name: Ensure target directory exists + file: + path: /Users/{{ lookup('env', 'USER') }}/Library/Application Support/Code/User/snippets/ + state: directory + mode: '0755' + + - name: Move VS Code Snippets + copy: + src: ./files/vs-code-snippets.code-snippets + dest: /Users/{{ lookup('env', 'USER') }}/Library/Application Support/Code/User/snippets/myGlobal.code-snippets + owner: "{{ lookup('env', 'USER') }}" + force: yes diff --git a/zsh.yml b/zsh.yml new file mode 100644 index 0000000..8e30eae --- /dev/null +++ b/zsh.yml @@ -0,0 +1,31 @@ +--- +- hosts: localhost + connection: local + become: false + + tasks: + - name: Install Oh My ZSH + shell: sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" + args: + creates: "/Users/{{ lookup('env', 'USER') }}/.oh-my-zsh" + + - name: "Create a default ZSH configuration" + template: + src: files/.zshrc.j2 + dest: /Users/{{ lookup('env', 'USER') }}/.zshrc + owner: "{{ lookup('env', 'USER') }}" + force: yes + + - name: "Copy Aliases File" + template: + src: files/.aliases.zsh.j2 + dest: /Users/{{ lookup('env', 'USER') }}/.aliases.zsh + owner: "{{ lookup('env', 'USER') }}" + force: yes + + - name: "Setup Cobalt2 theme" + copy: + src: files/cobalt2.zsh-theme + dest: /Users/{{ lookup('env', 'USER') }}/.oh-my-zsh/themes/ + owner: "{{ lookup('env', 'USER') }}" + force: yes diff --git a/zsh/readme.md b/zsh/readme.md deleted file mode 100644 index b0067b2..0000000 --- a/zsh/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -# ZSH Setup - -``` sh -sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" - -wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -sh install.sh -``` - -Copy the `.zshrc` file into the home root directory and then source the file.