diff --git a/bin/bin/cs b/bin/bin/cs index 0be3ccf..6da48e4 100755 --- a/bin/bin/cs +++ b/bin/bin/cs @@ -17,11 +17,15 @@ cat $alacritty/alacritty-base.yml $alacritty/themes/$new_color.yml >> $alacritty echo $new_color > $color_file -for pane_info in $(tmux list-panes -a -F '#{pane_id}-#{pane_current_command}'); do - IFS=- read pane cmd <<< "$pane_info" +if [[ $TMUX ]]; then + for pane_info in $(tmux list-panes -a -F '#{pane_id}-#{pane_current_command}'); do + IFS=- read pane cmd <<< "$pane_info" - if [[ $cmd == "vim" ]]; then - echo "sending to $pane" - tmux send-keys -t $pane ":call ChangeBackground()" ENTER - fi -done + if [[ $cmd == "vim" ]]; then + echo "sending to $pane" + tmux send-keys -t $pane ":call ChangeBackground()" ENTER + fi + done + + tmux source-file $HOME/.tmux/${new_color}.conf +fi diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index da55bb0..697b5b6 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -20,7 +20,6 @@ bind q confirm kill-window # clear history bind -n C-g clear-history - # 0 is way over there set-option -g base-index 1 setw -g pane-base-index 1 @@ -64,5 +63,6 @@ set-option -g status-right '%Y-%m-%d @ %k:%M' unbind c; bind c new-window -c "#{pane_current_path}" bind s split-window -v -c "#{pane_current_path}" bind v split-window -h -c "#{pane_current_path}" -set -g window-status-current-style bg=white,fg=black -set -g status-style fg=white,bg=colour236 + +# load current scheme +run-shell "bash ~/.tmux/startup" diff --git a/tmux/.tmux/dark.conf b/tmux/.tmux/dark.conf new file mode 100644 index 0000000..294b012 --- /dev/null +++ b/tmux/.tmux/dark.conf @@ -0,0 +1,29 @@ +#### COLOUR (Solarized dark) + +# default statusbar colors +set-option -g status-style fg=yellow,bg=black #yellow and base02 + +# default window title colors +set-window-option -g window-status-style fg=brightblue,bg=default #base0 and default +#set-window-option -g window-status-style dim + +# active window title colors +set-window-option -g window-status-current-style fg=brightred,bg=default #orange and default +#set-window-option -g window-status-current-style bright + +# pane border +set-option -g pane-border-style fg=black #base02 +set-option -g pane-active-border-style fg=brightgreen #base01 + +# message text +set-option -g message-style fg=brightred,bg=black #orange and base01 + +# pane number display +set-option -g display-panes-active-colour blue #blue +set-option -g display-panes-colour brightred #orange + +# clock +set-window-option -g clock-mode-colour green #green + +# bell +set-window-option -g window-status-bell-style fg=black,bg=red #base02, red diff --git a/tmux/.tmux/light.conf b/tmux/.tmux/light.conf new file mode 100644 index 0000000..7e710e7 --- /dev/null +++ b/tmux/.tmux/light.conf @@ -0,0 +1,29 @@ +#### COLOUR (Solarized light) + +# default statusbar colors +set-option -g status-style fg=yellow,bg=white #yellow and base2 + +# default window title colors +set-window-option -g window-status-style fg=brightyellow,bg=default #base0 and default +#set-window-option -g window-status-style dim + +# active window title colors +set-window-option -g window-status-current-style fg=brightred,bg=default #orange and default +#set-window-option -g window-status-current-style bright + +# pane border +set-option -g pane-border-style fg=white #base2 +set-option -g pane-active-border-style fg=brightcyan #base1 + +# message text +set-option -g message-style fg=brightred,bg=white #orange and base2 + +# pane number display +set-option -g display-panes-active-colour blue #blue +set-option -g display-panes-colour brightred #orange + +# clock +set-window-option -g clock-mode-colour green #green + +# bell +set-window-option -g window-status-bell-style fg=white,bg=red #base2, red diff --git a/tmux/.tmux/startup b/tmux/.tmux/startup new file mode 100755 index 0000000..ddeaa8f --- /dev/null +++ b/tmux/.tmux/startup @@ -0,0 +1,5 @@ +#!/bin/bash + +startup_color=$(cat $HOME/.config/atomaka/color.yml) + +tmux source-file $HOME/.tmux/$startup_color.conf