-
Notifications
You must be signed in to change notification settings - Fork 0
/
magic
executable file
·91 lines (72 loc) · 1.9 KB
/
magic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/usr/bin/env bash
set -euo pipefail
# Specs:
# ./magic
# - puts all the files in place
# Helper to make things pretty
function log_msg() {
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
NORMAL=$(tput sgr0)
MSG="$1"
let COL=$(tput cols)-${#MSG}+${#GREEN}+${#NORMAL}
printf "%s%${COL}s" "$MSG" "[$GREEN OK $NORMAL]"
}
# Main
log_msg "Starting up!"
# Neovim
mkdir -p ~/.config/nvim
cp init.lua ~/.config/nvim/
curl -sSLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
log_msg "Neovim initiated"
# Helix
mkdir -p ~/.config/helix
cp helix.toml ~/.config/helix/config.toml
log_msg "Helix initiated"
# i3 window manager
mkdir -p ~/.i3/
cp i3.conf ~/.i3/config
cp statusbar ~/.i3/statusbar
curl -sSLo ~/.i3alternate.py --create-dirs \
https://raw.githubusercontent.com/olemartinorg/i3-alternating-layout/master/alternating_layouts.py
log_msg "Tossed around i3 window manager configurations"
# Terminal
mkdir -p ~/.config/alacritty/
cp alacritty.yml ~/.config/alacritty/
mkdir -p ~/.config/kitty/
cp kitty.conf ~/.config/kitty/
log_msg "Alacritty and Kitty served, bon appetit"
# Shell
cp zshrc ~/.zshrc
cp promptline.sh ~/.promptline.sh
log_msg "Boosted your shell efficiency"
# Git
cp gitconfig ~/.gitconfig
log_msg "Tweaked Git powers"
# Xresources
cp Xresources ~/.Xresources
log_msg "Extracted Xresources serum"
# Tmux
cp tmux.conf ~/.tmux.conf
log_msg "Multiplexed multiplexers"
# npmrc
cp npmrc ~/.npmrc
log_msg "Put npmrc in place"
# muttrc
cp muttrc ~/.muttrc
log_msg "Put muttrc in place"
# scripts
mkdir -p ~/.bin/
cp upload ~/.bin/
log_msg "Copied some handy scripts"
# k9s
mkdir -p ~/.config/k9s/
cp k9s-skin.yml ~/.config/k9s/skin.yml
log_msg "Prettified k9s"
# topgrade
cp topgrade.toml ~/.config/topgrade.toml
log_msg "Put topgrade.toml in place"
# Cleanup
rm -rf ~/dotfiletemp
log_msg "Took out the trash"