-
Notifications
You must be signed in to change notification settings - Fork 4
/
run_once_after_30-plugin-installation.sh.tmpl
83 lines (68 loc) · 2.6 KB
/
run_once_after_30-plugin-installation.sh.tmpl
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
#! /usr/bin/env bash
set -eo pipefail
# bundle zsh plugins
antibody bundle < "$HOME/.zsh_plugins.txt" > "$HOME/.zsh_plugins.zsh"
# change to zsh
if [[ -f /etc/shells ]]; then
if ! grep "$(which zsh)" /etc/shells; then
which zsh | sudo tee -a /etc/shells
fi
fi
if [[ -z "$SHELL" ]]; then
if [[ "$SHELL" != *"zsh" ]]; then
chsh -s $(which zsh) $(whoami)
fi
fi
# install plugins for neovim - not sure best way to do with packer
# nvim -c ":q"
# tmux plugin manager
if [[ ! -d "$HOME/.tmux/plugins/" ]]; then
mkdir -p "$HOME/.tmux/plugins/"
git clone https://github.com/tmux-plugins/tpm "$HOME/.tmux/plugins/tpm"
fi
pip3 config set list.format freeze
poetry config virtualenvs.in-project true
{{ if .work -}}
poetry config certificates.proxied_pypi.cert "$HOME/.certs/full_cert.crt"
{{- end }}
# random scripts i've written
if [[ ! -d "$HOME/.bin" ]]; then
git clone https://github.com/Amar1729/bin.git "$HOME/.bin"
fi
{{ if (eq .chezmoi.os "darwin") -}}
# ubersicht bar
if [[ ! -d "$HOME/.config/ubersicht/widgets/simple-bar" ]]; then
mkdir -p "$HOME/.config/ubersicht/widgets/"
git clone https://github.com/Jean-Tinland/simple-bar.git "$HOME/.config/ubersicht/widgets/simple-bar"
fi
{{ end -}}
# firefox minimal style
{{ if (eq .chezmoi.os "darwin") -}}
(
# most of the following commands are "|| true": assume if they fail then the
# target state is up to date.
# TODO: add --branch "ref" to the git clone commands
mkdir -p ~/.config/mozilla/
git clone https://github.com/Amar1729/minimal-functional-fox \
~/.config/mozilla/chrome || true
if git clone https://github.com/MrOtherGuy/firefox-csshacks \
~/.config/mozilla/firefox-csshacks; then
# if successfully cloned this (i.e. if it wasn't already there) checkout to a known hash
pushd ~/.config/mozilla/firefox-csshacks \
&& git checkout 9276283311f46a146d1ea97a47041f3b3edce0a5 \
&& popd
fi
# no -f: don't bother overwriting if the file's already there
ln -sv ~/.config/mozilla/firefox-csshacks/chrome/autohide_sidebar.css \
~/.config/mozilla/chrome/userChrome-sidebery.css || true
sed -i'' -e "s|:HOME:|$HOME|" ~/.config/mozilla/chrome/userChrome.css
# if Firefox profiles don't exist yet (right after app install), then launch ffox once
if [[ ! -d "$HOME/Library/Application Support/Firefox/Profiles" ]]; then
open -a Firefox
fi
for profile in "$HOME/Library/Application Support/Firefox/Profiles"/*.default-*; do
ln -sfv "$HOME/.config/mozilla/chrome" "$profile"
done
)
# need to add (eq .chezmoi.os "linux")
{{ end -}}