mio-ops/profiles/tmux.nix

93 lines
3.6 KiB
Nix
Raw Normal View History

2020-01-07 01:00:06 +00:00
# Common configuration for Tmux users
{ config, pkgs, ... }:
{
programs = {
tmux = { # Terminal multiplexer required by byobu
enable = true;
aggressiveResize = true;
clock24 = true;
2020-04-21 08:23:43 +00:00
extraConfig = ''
2020-01-07 01:00:06 +00:00
POWERLINE_COMMAND="/run/current-system/sw/bin/powerline"
POWERLINE_CONFIG_COMMAND="/run/current-system/sw/bin/powerline-config"
run-shell "/run/current-system/sw/bin/powerline-daemon -q"
source /run/current-system/sw/share/tmux/powerline.conf
2020-12-31 02:07:53 +00:00
# Plugins
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
2020-06-04 07:23:10 +00:00
# Bind home and end keys:
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"
2020-05-28 04:22:32 +00:00
## COLORSCHEME: gruvbox dark
set-option -g status "on"
2020-01-07 01:00:06 +00:00
2020-05-28 04:22:32 +00:00
# default statusbar color
set-option -g status-style bg=colour237,fg=colour223 # bg=bg1, fg=fg1
2020-01-07 01:00:06 +00:00
# default window title colors
2020-05-28 04:22:32 +00:00
set-window-option -g window-status-style bg=colour214,fg=colour237 # bg=yellow, fg=bg1
# default window with an activity alert
set-window-option -g window-status-activity-style bg=colour237,fg=colour248 # bg=bg1, fg=fg3
2020-01-07 01:00:06 +00:00
# active window title colors
2020-05-28 04:22:32 +00:00
set-window-option -g window-status-current-style bg=red,fg=colour237 # fg=bg1
2020-01-07 01:00:06 +00:00
# pane border
2020-05-28 04:22:32 +00:00
set-option -g pane-active-border-style fg=colour250 #fg2
set-option -g pane-border-style fg=colour237 #bg1
# message infos
set-option -g message-style bg=colour239,fg=colour223 # bg=bg2, fg=fg1
2020-01-07 01:00:06 +00:00
2020-05-28 04:22:32 +00:00
# writing commands inactive
set-option -g message-command-style bg=colour239,fg=colour223 # bg=fg3, fg=bg1
2020-01-07 01:00:06 +00:00
# pane number display
2020-05-28 04:22:32 +00:00
set-option -g display-panes-active-colour colour250 #fg2
set-option -g display-panes-colour colour237 #bg1
2020-01-07 01:00:06 +00:00
# clock
2020-05-28 04:22:32 +00:00
set-window-option -g clock-mode-colour colour109 #blue
2020-01-07 01:00:06 +00:00
# bell
2020-05-28 04:22:32 +00:00
set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # bg=red, fg=bg
2021-03-26 23:16:39 +00:00
# focus
set-option -g focus-events on
2020-05-28 04:22:32 +00:00
## Theme settings mixed with colors (unfortunately, but there is no cleaner way)
set-option -g status-justify "left"
set-option -g status-left-style none
set-option -g status-left-length "80"
set-option -g status-right-style none
set-option -g status-right-length "80"
set-window-option -g window-status-separator ""
set-option -g status-left "#[fg=colour248, bg=colour241] #S #[fg=colour241, bg=colour237, nobold, noitalics, nounderscore]"
set-option -g status-right "#[fg=colour239, bg=colour237, nobold, nounderscore, noitalics]#[fg=colour246,bg=colour239] %Y-%m-%d %H:%M #[fg=colour248, bg=colour239, nobold, noitalics, nounderscore]#[fg=colour237, bg=colour248] #h "
set-window-option -g window-status-current-format "#[fg=colour237, bg=colour214, nobold, noitalics, nounderscore]#[fg=colour239, bg=colour214] #I #[fg=colour239, bg=colour214, bold] #W #[fg=colour214, bg=colour237, nobold, noitalics, nounderscore]"
set-window-option -g window-status-format "#[fg=colour237,bg=colour239,noitalics]#[fg=colour223,bg=colour239] #I #[fg=colour223, bg=colour239] #W #[fg=colour239, bg=colour237, noitalics]"
2020-01-07 01:00:06 +00:00
'';
2020-12-31 02:07:53 +00:00
keyMode = "vi";
newSession = true;
shortcut = "a";
terminal = "screen-256color";
2020-01-07 01:00:06 +00:00
};
};
environment.systemPackages = with pkgs; [
2020-03-06 04:58:18 +00:00
python36Packages.powerline # Prompt enhancer
2020-12-31 02:07:53 +00:00
tmuxPlugins.resurrect
tmuxPlugins.continuum
2020-01-07 01:00:06 +00:00
];
}