Compare commits

...

3 Commits

Author SHA1 Message Date
chatton 5fabe2f985 chore: adding some additional configs 2 years ago
chatton 2c54e1ffab adding vim role 2 years ago
chatton 6808f7a62d adding tmux config 2 years ago

@ -1,7 +1,14 @@
--- ---
- name: Setup Dev Environment - name: Setup Dev Environment
hosts: localhost hosts: localhost
become: yes connection: local
become_user: cianhatton gather_facts: yes
# become: yes
# become_user: root
roles: roles:
- configure_git # TODO make this optional
# - update_packages
- git
- bash_profile
- tmux
- vim

@ -0,0 +1,26 @@
#!/usr/bin/env bash
# https://github.com/chatton/dotfiles/blob/master/.bash_profile
# enable fzf with reverse search
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
function _setup_go() {
source /home/cianhatton/.gvm/scripts/gvm
gvm use go1.21
}
# gh pr list | fzf | awk '{print $1}' | gh pr view --web
function _parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# display git branch in the terminal prompt
export PS1='\[\e[1;91m\][\w]\[\e[0m\]\[\e[32m\]$(_parse_git_branch)\[\e[00m\]$ '
function setup() {
ansible-playbook /home/cianhatton/checkouts/ansible-dev-environment/main.yml
}
_setup_go

@ -0,0 +1,6 @@
---
- name: Copy tmux conf.
ansible.builtin.copy:
src: bash_profile
dest: /home/cianhatton/.bash_profile
mode: '0644'

@ -33,4 +33,3 @@
block: | block: |
[url "ssh://git@github.com/"] [url "ssh://git@github.com/"]
insteadOf = https://github.com/ insteadOf = https://github.com/

@ -1,6 +0,0 @@
---
packages:
- sudo
- tmux
- vim
- npm

@ -1,11 +0,0 @@
---
- name: Update Packages
ansible.builtin.apt:
upgrade: dist
update_cache: true
- name: Install desired packages
ansible.builtin.apt:
pkg:
- foo
- foo-tools

@ -0,0 +1,29 @@
# Send prefix
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
# Use Alt-arrow keys to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Mouse mode
setw -g mouse on
# Set easier window split keys
bind-key v split-window -h
bind-key h split-window -v
# Easy config reload
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded."
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"

@ -0,0 +1,11 @@
---
- name: Install tmux packages
ansible.builtin.apt:
pkg:
- tmux
- name: Copy tmux conf.
ansible.builtin.copy:
src: tmux.conf
dest: /home/cianhatton/.tmux.conf
mode: '0644'

@ -0,0 +1,5 @@
---
- name: Update Packages
ansible.builtin.apt:
upgrade: dist
cache_valid_time: 3600

@ -0,0 +1,2 @@
" Turn on syntax highlighting
syntax on

@ -0,0 +1,11 @@
---
- name: Install vim package.
ansible.builtin.apt:
pkg:
- vim
- name: Copy vimrc.
ansible.builtin.copy:
src: vimrc
dest: /home/cianhatton/.vimrc
mode: '0644'
Loading…
Cancel
Save