-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy
More file actions
executable file
·37 lines (28 loc) · 1.23 KB
/
deploy
File metadata and controls
executable file
·37 lines (28 loc) · 1.23 KB
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
#!/bin/bash
set -xe
mkdir -p ~/projects/scripts
echo Cloning git@github.com:staernid/.scripts.git to ~/projects/scripts ...
git clone git@github.com:staernid/.scripts.git "$HOME"/projects/scripts 2>/dev/null || true
ln -s -T ~/projects/scripts ~/.scripts
echo Checking if dotfile-config present ...
[ -f dotfile.conf ] ||
(echo Missing dotfile-config file, please make one first && exit 1)
echo Sourcing that config ...
. "$PWD"/dotfile.conf
echo Running stow on "$TO_DEPLOY" ...
stow $TO_DEPLOY
if [[ "$TO_DEPLOY" == *"sway"* ]]; then
# TODO: add function "relink"
echo Unlinking and linking sway themes ...
mkdir -p "$XDG_CONFIG_HOME"/sway/theme
unlink "$XDG_CONFIG_HOME"/sway/theme/theme.link || true
ln -s "$XDG_CONFIG_HOME"/sway/theme/"$SWAY_THEME" "$XDG_CONFIG_HOME"/sway/theme/theme.link
echo Unlinking and linking kitty themes ...
mkdir -p "$XDG_CONFIG_HOME"/kitty
unlink "$XDG_CONFIG_HOME"/kitty/theme.link || true
ln -s "$XDG_CONFIG_HOME"/kitty/"$SWAY_THEME"".conf" "$XDG_CONFIG_HOME"/kitty/theme.link
echo Unlinking and linking waybar themes ...
mkdir -p "$XDG_CONFIG_HOME"/waybar
unlink "$XDG_CONFIG_HOME"/waybar/style.css || true
ln -s "$XDG_CONFIG_HOME"/waybar/"$SWAY_THEME"".css" "$XDG_CONFIG_HOME"/waybar/style.css
fi