ADD scripts for changing light and dark themes
This commit is contained in:
parent
b0d2df87da
commit
975bff000f
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
config=$XDG_CONFIG_HOME/alacritty/alacritty.toml
|
||||||
|
light=$config.light
|
||||||
|
dark=$config.dark
|
||||||
|
|
||||||
|
if [[ "$1" == "toggle" ]]; then
|
||||||
|
current=$(readlink $config)
|
||||||
|
if [ $current == $light ]; then
|
||||||
|
ln -sf $dark $config
|
||||||
|
elif [ $current == $dark ]; then
|
||||||
|
ln -sf $light $config
|
||||||
|
else
|
||||||
|
echo 'Invalid link'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
elif [[ "$1" == "dark" ]]; then
|
||||||
|
ln -sf $dark $config
|
||||||
|
elif [[ "$1" == "light" ]]; then
|
||||||
|
ln -sf $light $config
|
||||||
|
else
|
||||||
|
echo 'Invalid command'
|
||||||
|
exit 1
|
||||||
|
fi
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ "$1" == "toggle" ]]; then
|
||||||
|
emacs_ctl theme toggle
|
||||||
|
tmuxctl toggle-theme
|
||||||
|
alacritty_theme toggle
|
||||||
|
elif [[ "$1" == "dark" ]]; then
|
||||||
|
emacs_ctl theme dark
|
||||||
|
tmuxctl dark-theme
|
||||||
|
alacritty_theme dark
|
||||||
|
elif [[ "$1" == "light" ]]; then
|
||||||
|
emacs_ctl theme light
|
||||||
|
tmuxctl light-theme
|
||||||
|
alacritty_theme light
|
||||||
|
else
|
||||||
|
echo 'Invalid command'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$2" == "force" ]]; then
|
||||||
|
emacs_ctl restart
|
||||||
|
fi
|
|
@ -33,7 +33,7 @@ greenclip daemon &
|
||||||
redshift > /dev/null 2>&1 &
|
redshift > /dev/null 2>&1 &
|
||||||
dunst &
|
dunst &
|
||||||
{{ if .development.emacs -}}
|
{{ if .development.emacs -}}
|
||||||
emacs-start &
|
emacs_ctl start &
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ if .features.seafile -}}
|
{{ if .features.seafile -}}
|
||||||
seafile-applet > /dev/null 2>&1 &
|
seafile-applet > /dev/null 2>&1 &
|
||||||
|
|
|
@ -11,20 +11,20 @@ draw_bold_text_with_bright_colors = true
|
||||||
|
|
||||||
[colors.normal]
|
[colors.normal]
|
||||||
black = "#000000"
|
black = "#000000"
|
||||||
red = "#a00606"
|
red = "#cc0606"
|
||||||
green = "#007700"
|
green = "#008000"
|
||||||
yellow = "#969600"
|
yellow = "#969600"
|
||||||
blue = "#0020aa"
|
blue = "#0020aa"
|
||||||
magenta = "#cc20cc"
|
magenta = "#cc20cc"
|
||||||
cyan = "#20cccc"
|
cyan = "#20cccc"
|
||||||
white = "#ffffff"
|
white = "#fcfcfc"
|
||||||
|
|
||||||
[colors.bright]
|
[colors.bright]
|
||||||
black = "#333333"
|
black = "#333333"
|
||||||
red = "#dd3030"
|
red = "#dd1010"
|
||||||
green = "#08aa08"
|
green = "#08a008"
|
||||||
yellow = "#aaaa10"
|
yellow = "#baba00"
|
||||||
blue = "#0040bb"
|
blue = "#0040bb"
|
||||||
magenta = "#ff60ff"
|
magenta = "#ff60ff"
|
||||||
cyan = "#1ebbbb"
|
cyan = "#00b1b1"
|
||||||
white = "#ffffff"
|
white = "#ffffff"
|
||||||
|
|
|
@ -9,8 +9,15 @@ elif [[ "$1" == "start" ]]; then
|
||||||
tmux new-session -s "$session_name" -d
|
tmux new-session -s "$session_name" -d
|
||||||
elif [[ "$1" == "stop" ]]; then
|
elif [[ "$1" == "stop" ]]; then
|
||||||
tmux kill-session -t "$session_name"
|
tmux kill-session -t "$session_name"
|
||||||
|
elif [[ "$1" == "toggle-theme" ]]; then
|
||||||
|
[ $(tmux show -v @dark-theme) == 0 ] && theme=1 || theme=0
|
||||||
|
tmux set @dark-theme $theme
|
||||||
|
elif [[ "$1" == "dark-theme" ]]; then
|
||||||
|
tmux set @dark-theme 1
|
||||||
|
elif [[ "$1" == "light-theme" ]]; then
|
||||||
|
tmux set @dark-theme 0
|
||||||
else
|
else
|
||||||
echo 'Command must be either "start" or "stop"'
|
echo 'Invalid command'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
run-shell 'tmux setenv -g TMUX_VERSION $(tmux -V | \
|
run-shell 'tmux setenv -g TMUX_VERSION $(tmux -V | \
|
||||||
sed -En "s/^tmux[^0-9]*([.0-9]+).*/\1/p")'
|
sed -En "s/^tmux[^0-9]*([.0-9]+).*/\1/p")'
|
||||||
|
|
||||||
|
set -g @dark-theme 0
|
||||||
|
|
||||||
# use vi bindings
|
# use vi bindings
|
||||||
set -g status-keys vi
|
set -g status-keys vi
|
||||||
set -g mode-keys vi
|
set -g mode-keys vi
|
||||||
|
@ -77,15 +79,17 @@ bind C-c copy-mode
|
||||||
|
|
||||||
# theme
|
# theme
|
||||||
|
|
||||||
|
# TODO this feel sloppy (don't use an ENVVAR)
|
||||||
status_sep="#[fg=#888888]|#[default]"
|
status_sep="#[fg=#888888]|#[default]"
|
||||||
|
|
||||||
set -g status-interval 1
|
set -g status-interval 1
|
||||||
set -g status-left "#h:#S $status_sep "
|
set -g status-left "#h:#S $status_sep "
|
||||||
set -g status-left-length 32
|
set -g status-left-length 32
|
||||||
set -g status-style "fg=#cccccc,bg=#444444"
|
|
||||||
set -g window-status-style "fg=#9f9f9f"
|
set -g status-style "#{?@dark-theme,fg=##cccccc#,bg=##444444,fg=##2c2c2c#,bg=##d6d6d6}"
|
||||||
set -g window-status-activity-style "fg=#9f9f9f"
|
set -g window-status-style "#{?@dark-theme,fg=##9f9f9f,fg=##909090}"
|
||||||
set -g window-status-current-style "fg=#000000 bold,bg=#00ff00"
|
set -g window-status-activity-style "#{?@dark-theme,fg=##9f9f9f,fg=##808080}"
|
||||||
|
set -g window-status-current-style "#{?@dark-theme,fg=##000000 bold#,bg=##00ff00,fg=##000000 bold#,bg=##00dd00}"
|
||||||
set -g window-status-separator ""
|
set -g window-status-separator ""
|
||||||
|
|
||||||
set -g window-status-format " #{?window_activity_flag,##,}#I-#W "
|
set -g window-status-format " #{?window_activity_flag,##,}#I-#W "
|
||||||
|
@ -94,13 +98,13 @@ set -g window-status-current-format " #I-#W "
|
||||||
set -g visual-activity off
|
set -g visual-activity off
|
||||||
set -g monitor-activity on
|
set -g monitor-activity on
|
||||||
|
|
||||||
set -g pane-border-style "fg=#444444"
|
set -g pane-border-style "#{?@dark-theme,fg=##444444,fg=##d6d6d6}"
|
||||||
set -g pane-active-border-style "fg=#aaaaaa"
|
set -g pane-active-border-style "fg=#aaaaaa"
|
||||||
|
|
||||||
if-shell -b '[ "$(echo "$TMUX_VERSION >= 3.2" | bc)" = 1 ]' \
|
if-shell -b '[ "$(echo "$TMUX_VERSION >= 3.2" | bc)" = 1 ]' \
|
||||||
"set -g pane-border-lines heavy"
|
"set -g pane-border-lines heavy"
|
||||||
|
|
||||||
set -g message-style "fg=#ffffaa,bg=#666600"
|
set -g message-style "#{?@dark-theme,fg=##ffffaa#,bg=##666600,fg=##333300#,bg=##dddd66}"
|
||||||
|
|
||||||
set -g pane-border-status off
|
set -g pane-border-status off
|
||||||
|
|
||||||
|
@ -112,9 +116,9 @@ if-shell -b '[ "$(echo "$TMUX_VERSION >= 3.2" | bc)" = 1 ]' \
|
||||||
bind -T root F12 \
|
bind -T root F12 \
|
||||||
set prefix None \;\
|
set prefix None \;\
|
||||||
set key-table off \;\
|
set key-table off \;\
|
||||||
set status-style "fg=#aaaaaa,bg=#666666" \;\
|
set status-style "#{?@dark-mode,fg=##aaaaaa#,bg=##666666,fg=##1c1c1c#,bg=##787878}" \;\
|
||||||
set window-status-style "fg=#777777" \;\
|
set window-status-style "#{?@dark-mode,fg=##777777,fg=##2c2c2c}" \;\
|
||||||
set window-status-current-style "fg=#666666 bold,bg=#999999" \;\
|
set window-status-current-style "#{?@dark-mode,fg=##666666 bold#,bg=##999999,fg=##444444 bold#,bg=##999999}" \;\
|
||||||
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
|
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
|
||||||
refresh-client -S \;\
|
refresh-client -S \;\
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue