Skip to content

Commit 0c8a75c

Browse files
committed
restructure of files
1 parent 088e46f commit 0c8a75c

File tree

10 files changed

+76
-75
lines changed

10 files changed

+76
-75
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
install:
1+
full-install:
22
@bash ./install-scripts/01-install-packages.sh
33
@bash ./install-scripts/02-move-files.sh
44
@fish ./install-scripts/03-fisher-install.fish
55
@fish ./install-scripts/04-fish-plugins.fish
66
@fish ./install-scripts/05-tmux-plugins.fish
77
@fish ./install-scripts/06-vim-setup.fish
88
@bash ./install-scripts/07-last-touches.sh
9+
@exec fish
910

10-
.PHONY: install
11+
refresh:
12+
@bash ./install-scripts/02-move-files.sh
13+
@exec fish
14+
15+
.PHONY: full-install

config.fish

Lines changed: 0 additions & 56 deletions
This file was deleted.

config/fish/aliases.fish

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# aliases
2+
3+
# Package manager aliases
4+
if [ uname = "Darwin" ]
5+
alias get="brew install"
6+
alias search="brew search"
7+
else if [ -f /etc/arch-release ]
8+
alias get="sudo pacman -S"
9+
alias search="pacman -Ss"
10+
else if [ -f /etc/lsb-release ]
11+
alias get="sudo apt install"
12+
alias search="apt search"
13+
else if [ -f /etc/alpine-release ]
14+
alias get="apk add"
15+
alias search="apk search"
16+
else if [ uname = "FreeBSD" ]
17+
alias get="sudo pkg install -y"
18+
alias search="pkg search"
19+
end
20+
21+
alias vim=nvim
22+
alias cat="bat -Pp"
23+
24+
alias k="kubectl"
25+
alias kp="kubectl get pods -A"
26+
alias gswitch="gcloud config configurations activate"
27+
alias kc="kubectx"

config/fish/config.fish

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export fish_greeting="" # Silence welcome message
2+
export EDITOR=nvim
File renamed without changes.

config/fish/functions.fish

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Replicate the behavior of `!!` in bash
2+
function last_history_item
3+
echo $history[1]
4+
end
5+
abbr -a !! --position anywhere --function last_history_item
6+
7+
# lookup various commands/syntax in a pinch
8+
function cheat --description "help <field> <topic>"
9+
set args (echo $argv[2..-1] | tr ' ' '+')
10+
curl "cht.sh/$argv[1]/$args"
11+
end
12+
13+
# update master and create a branch with value: $1
14+
function gitissue
15+
git reset --hard
16+
git checkout master
17+
git pull origin master
18+
git branch $argv[1]
19+
git checkout $argv[1]
20+
end

tmux.conf renamed to config/tmux/tmux.conf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ set -g prefix C-a
22
unbind-key C-b
33
bind-key C-a send-prefix
44

5-
set-option -g default-terminal "screen-256color"
6-
75
bind -n M-_ split-window -h -c "#{pane_current_path}"
86
bind -n M-- split-window -v -c "#{pane_current_path}"
97
unbind '"'
@@ -86,5 +84,5 @@ setw -g window-status-format ' #I #W ' # Window ID, Window Name
8684
setw -g window-status-bell-style 'fg=colour234 bg=colour0 bold'
8785

8886
# plugins runs
89-
set-option -g status-interval 1
87+
set-option -g status-interval 5
9088
run -b '~/.tmux/plugins/tpm/tpm'

init.lua renamed to config/vim/init.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ require('mason-lspconfig').setup({
180180
'jsonls',
181181
'yamlls',
182182
'pyright',
183-
'terraformls'
184183
},
185184
handlers = {
186185
lsp_zero.default_setup,
@@ -267,4 +266,4 @@ vim.diagnostic.config {
267266
underline = true
268267
}
269268

270-
vim.cmd('colorscheme carbonfox')
269+
vim.cmd('colorscheme murphy')

install-scripts/01-install-packages.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ PACKAGES=(
1111
"go"
1212
"npm"
1313
"ripgrep"
14+
"exa"
1415
)
1516

1617
# if MacOS install Homebrew
@@ -25,19 +26,21 @@ fi
2526
# if Arch install
2627
if [ -f /etc/arch-release ]; then
2728
# install yay
28-
sudo pacman -S --noconfirm base-devel
29-
git clone https://aur.archlinux.org/yay.git
30-
cd yay
31-
makepkg -si --noconfirm
32-
cd ..
33-
rm -rf yay
29+
if [ -z $(which yay) ]; then
30+
sudo pacman -S --noconfirm base-devel
31+
git clone https://aur.archlinux.org/yay.git
32+
cd yay
33+
makepkg -si --noconfirm
34+
cd ..
35+
rm -rf yay
36+
fi
3437

3538
# install packages
3639
sudo pacman -S --noconfirm "${PACKAGES[@]}"
3740
fi
3841

3942
# if debian or ubuntu install
40-
if [ -f /etc/lsb-release ] || [ -f /etc/debian_version ]; then
43+
if [ -f /etc/debian_version ]; then
4144
# replace "go" with "golang" for debian
4245
PACKAGES=("${PACKAGES[@]/go/golang}")
4346

install-scripts/02-move-files.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@ mkdir -p ~/.config/fish
77
mkdir -p ~/.config/fish/conf.d
88

99
# vim
10-
cp init.lua ~/.config/nvim/
10+
cp config/vim/init.lua ~/.config/nvim/
1111

1212
# fish
13-
cp config.fish ~/.config/fish/
13+
cp config/fish/config.fish ~/.config/fish/
14+
cp config/fish/aliases.fish ~/.config/fish/conf.d/
15+
cp config/fish/functions.fish ~/.config/fish/conf.d/
1416

15-
# if envvars doesn't exist, copy it
17+
# Only copy envvars.fish if it doesn't exist.
18+
# This way we can override it with our own configs.
1619
if [ ! -f ~/.config/fish/conf.d/envvars.fish ]; then
17-
cp envvars.fish ~/.config/fish/conf.d/
20+
cp config/fish/envvars.fish ~/.config/fish/conf.d/
1821
fi
1922

2023
# tmux
21-
cp tmux.conf ~/.tmux.conf
24+
cp config/tmux/tmux.conf ~/.tmux.conf

0 commit comments

Comments
 (0)