-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathset_theme.sh
More file actions
executable file
·32 lines (22 loc) · 921 Bytes
/
set_theme.sh
File metadata and controls
executable file
·32 lines (22 loc) · 921 Bytes
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
#!/usr/bin/env bash
DIR=$HOME/code/machine-config/.config
if [ $# -eq 0 ]; then
echo "Usage: $0 <theme>"
exit 1
fi
theme=$1
cp "${DIR}/ghostty/theme_config/${theme}" "${DIR}/ghostty/theme_config/current"
touch "${DIR}/ghostty/config"
cp "${DIR}/wezterm/themes/${theme}.lua" "${DIR}/wezterm/themes/current.lua"
touch "${DIR}/wezterm/wezterm.lua"
cp "${DIR}/alacritty/themes/${theme}.toml" "${DIR}/alacritty/themes/current.toml"
touch "${DIR}/alacritty/alacritty.toml"
tmux list-panes -a -F '#{pane_id} #{pane_current_command}' |
grep vim |
cut -d ' ' -f 1 |
xargs -I PANE tmux send-keys -t PANE ESCAPE ":colorscheme ${theme}" ENTER
echo "vim.cmd(\"colorscheme ${theme}\")" > "${DIR}/nvim/lua/kronning6/current-theme.lua"
cp "${DIR}/tmux/themes/${theme}.conf" "${DIR}/tmux/themes/current.conf"
tmux source-file "${DIR}/tmux/tmux.conf"
# TODO: Figure out how to set fzf theme
# $(fzf_${theme})