Skip to content

Commit 95982f7

Browse files
committed
Split zsh custom cfg into diff files.
1 parent 862c8c4 commit 95982f7

File tree

5 files changed

+101
-28
lines changed

5 files changed

+101
-28
lines changed

files/dotfiles/zsh/aliases.zsh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# You can put files here to add functionality separated per file, which
2+
# will be ignored by git.
3+
# Files on the custom/ directory will be automatically loaded by the init
4+
# script, in alphabetical order.
5+
6+
alias pcp='rsync -aP'
7+
alias pmv='rsync -aP --remove-source-files'

files/dotfiles/zsh/zshrc-custom.zsh renamed to files/dotfiles/zsh/general.zsh

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# This file overrides any settings in the main ~/.zshrc file.
2-
# - may want to split into different files for plugins,
3-
# aliases, ecports, etc.
1+
# You can put files here to add functionality separated per file, which
2+
# will be ignored by git.
3+
# Files on the custom/ directory will be automatically loaded by the init
4+
# script, in alphabetical order.
45

56
# Set Shell Theme
67
# - Note this is a custom theme
@@ -9,28 +10,6 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
910
# Support additional terminal
1011
export TERM=xterm-256color
1112

12-
# My zsh plugins
13-
plugins=(
14-
git
15-
ansible
16-
aws
17-
colored-man-pages
18-
colorize
19-
common-aliases
20-
docker
21-
docker-compose
22-
github
23-
rsync
24-
systemd
25-
themes
26-
tmux
27-
ubuntu
28-
ufw
29-
vscode
30-
zsh-syntax-highlighting
31-
zsh-autosuggestions
32-
)
33-
3413
# Daily updates - default is every 2 weeks
3514
UPDATE_ZSH_DAYS=1
3615

files/dotfiles/zsh/plugins.zsh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# You can put files here to add functionality separated per file, which
2+
# will be ignored by git.
3+
# Files on the custom/ directory will be automatically loaded by the init
4+
# script, in alphabetical order.
5+
6+
# My zsh plugins
7+
plugins=(
8+
git
9+
ansible
10+
aws
11+
colored-man-pages
12+
colorize
13+
common-aliases
14+
docker
15+
docker-compose
16+
github
17+
rsync
18+
systemd
19+
themes
20+
tmux
21+
ubuntu
22+
ufw
23+
vscode
24+
zsh-syntax-highlighting
25+
zsh-autosuggestions
26+
)

local.deploy.test.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
3+
ANSIBLE=$(which ansible-playbook)
4+
GIT=$(which git)
5+
MYLOCBASE="$HOME/tmp"
6+
MYREPO="$MYLOCBASE/bashfulrobot-ansible"
7+
MYREPORMT="https://github.com/bashfulrobot/bashfulrobot-ansible.git"
8+
MYPPA="ansible"
9+
10+
$GIT config user.name bashfulrobot
11+
$GIT config user.email [email protected]
12+
$GIT config user.editor micro
13+
14+
if [ ! -f "$ANSIBLE" ]; then
15+
echo "Ansible not found; beginning install..."
16+
echo
17+
18+
# Bootstrap Ansible
19+
sudo apt-get install software-properties-common
20+
sudo apt-get update
21+
sudo apt-get install git ansible -y
22+
fi
23+
24+
if [ ! -f $HOME/.ansible.cfg ]; then
25+
touch $HOME/.ansible.cfg
26+
echo '[defaults]' > $HOME/.ansible.cfg
27+
echo 'remote_tmp = /tmp/$USER/ansible' >> $HOME/.ansible.cfg
28+
fi
29+
30+
# Get the repo
31+
32+
if [ ! -f $MYREPO/local-test.yml ]; then
33+
34+
mkdir -p $MYLOCBASE
35+
cd $MYLOCBASE
36+
$GIT clone $MYREPORMT
37+
fi
38+
39+
cd $MYREPO
40+
41+
# Get the latest version.
42+
$GIT pull
43+
44+
# Run ansible-pull no matter what (local dev iteration)
45+
sudo $ANSIBLE $MYREPO/local-test.yml --connection=local
46+
47+
#sudo rm -rf $HOME/.ansible/

tasks/user/shell.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,23 @@
6161
become: no
6262
register: created_zshrc
6363

64-
- name: Placing zshrc-custom.zsh CFG
64+
- name: Placing general.zsh CFG
6565
copy:
66-
src: files/dotfiles/zsh/zshrc-custom.zsh
67-
dest: "/home/{{ myusername }}/.oh-my-zsh/custom/zshrc-custom.zsh"
66+
src: files/dotfiles/zsh/general.zsh
67+
dest: "/home/{{ myusername }}/.oh-my-zsh/custom/general.zsh"
68+
owner: "{{ myusername }}"
69+
group: "{{ myusername }}"
70+
71+
- name: Placing plugins.zsh CFG
72+
copy:
73+
src: files/dotfiles/zsh/plugins.zsh
74+
dest: "/home/{{ myusername }}/.oh-my-zsh/custom/plugins.zsh"
75+
owner: "{{ myusername }}"
76+
group: "{{ myusername }}"
77+
78+
- name: Placing aliases.zsh CFG
79+
copy:
80+
src: files/dotfiles/zsh/aliases.zsh
81+
dest: "/home/{{ myusername }}/.oh-my-zsh/custom/aliases.zsh"
6882
owner: "{{ myusername }}"
6983
group: "{{ myusername }}"

0 commit comments

Comments
 (0)