2022-12-31 12:07:15 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2023-01-09 15:03:01 +00:00
|
|
|
let cfg = config.features.cli.tmux;
|
2022-12-31 12:07:15 +00:00
|
|
|
|
|
|
|
in {
|
|
|
|
|
2023-01-09 15:03:01 +00:00
|
|
|
options.features.cli.tmux.enable = mkEnableOption "enable tmux";
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
programs.tmux = {
|
|
|
|
enable = true;
|
|
|
|
shortcut = "a";
|
|
|
|
keyMode = "vi";
|
|
|
|
clock24 = true;
|
2023-04-26 04:43:46 +00:00
|
|
|
plugins = with pkgs.tmuxPlugins; [ sensible yank ];
|
2023-01-09 15:03:01 +00:00
|
|
|
extraConfig = ''
|
2023-04-26 04:43:46 +00:00
|
|
|
|
|
|
|
set-option -sa terminal-overrides ",xterm*:Tc"
|
|
|
|
# Enable mouse mode (tmux 2.1 and above)
|
|
|
|
set -g mouse on
|
|
|
|
|
|
|
|
# split panes using | and -
|
|
|
|
bind | split-window -h
|
|
|
|
bind - split-window -v
|
|
|
|
unbind '"'
|
|
|
|
unbind %
|
|
|
|
|
|
|
|
bind-key r source-file ~/.tmux.conf \; display-message "Konfiguration neu geladen"
|
2023-04-29 04:47:39 +00:00
|
|
|
set -g @plugin 'sainnhe/tmux-fzf'
|
2023-04-26 04:43:46 +00:00
|
|
|
# status bar theme
|
|
|
|
set -g status-bg 'colour235'
|
|
|
|
#set -g message-command-fg 'colour222'
|
|
|
|
set -g status-justify 'centre'
|
|
|
|
set -g status-left-length '100'
|
|
|
|
set -g status 'on'
|
|
|
|
#set -g pane-active-border-fg 'colour154'
|
|
|
|
#set -g message-bg 'colour238'
|
|
|
|
set -g status-right-length '100'
|
|
|
|
#set -g status-right-attr 'none'
|
|
|
|
#set -g message-fg 'colour222'
|
|
|
|
#set -g message-command-bg 'colour238'
|
|
|
|
#set -g status-attr 'none'
|
|
|
|
#set -g status-utf8 'on'
|
|
|
|
#set -g pane-border-fg 'colour238'
|
|
|
|
#set -g status-left-attr 'none'
|
|
|
|
#setw -g window-status-fg 'colour121'
|
|
|
|
#setw -g window-status-attr 'none'
|
|
|
|
#setw -g window-status-activity-bg 'colour235'
|
|
|
|
#setw -g window-status-activity-attr 'none'
|
|
|
|
#setw -g window-status-activity-fg 'colour154'
|
|
|
|
setw -g window-status-separator ' '
|
|
|
|
#setw -g window-status-bg 'colour235'
|
|
|
|
set -g status-left '#[fg=colour232,bg=colour154] #S #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #W #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] #(whoami) #(uptime | cut -d " " -f 1,2,3) #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
|
|
|
|
set -g status-right '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] %r %a %Y #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #H #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour232,bg=colour154] #(rainbarf --battery --remaining --no-rgb) '
|
|
|
|
setw -g window-status-format '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[default] #I #W #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
|
|
|
|
setw -g window-status-current-format '#[fg=colour235,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #I #W #F #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]'
|
2023-01-09 15:03:01 +00:00
|
|
|
'';
|
|
|
|
};
|
2022-12-30 12:05:46 +00:00
|
|
|
};
|
|
|
|
}
|