This commit is contained in:
albert 2024-03-18 15:04:52 +09:00
parent d7098786dc
commit 914d9d1bed
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A
2 changed files with 25 additions and 18 deletions

View file

@ -36,6 +36,7 @@
initExtra = '' initExtra = ''
GPG_TTY=$(tty) GPG_TTY=$(tty)
ssh-add > /dev/null &> /dev/null ssh-add > /dev/null &> /dev/null
[ -z "$TMUX" ] && { tmux attach || exec tmux new-session && exit;}
''; '';
sessionVariables = { sessionVariables = {
# Set the GTK Theme # Set the GTK Theme

View file

@ -1,32 +1,38 @@
{ pkgs, ... }: { { config, pkgs, ... }: {
programs.tmux = { programs.tmux = {
enable = true; enable = true;
clock24 = true;
keyMode = "vi"; keyMode = "vi";
mouse = true;
terminal = "xterm-256color"; terminal = "xterm-256color";
plugins = with pkgs.tmuxPlugins; [ plugins = with pkgs.tmuxPlugins; [
better-mouse-mode
sensible
sidebar
{ {
plugin = sysstat; plugin = power-theme;
extraConfig = '' extraConfig = ''
set -g status-right "#{sysstat_cpu} | #{sysstat_mem} | #{sysstat_swap} | #{sysstat_loadavg} | #[fg=cyan]#(echo $USER)#[default]@#H" set -g @tmux_power_theme '#${config.lib.stylix.colors.base09}'
set -g @tmux_power_right_arrow_icon ' '
set -g @tmux_power_left_arrow_icon ' '
set -g @tmux_power_prefix_highlight_pos 'R'
set -g @tmux_power_show_upload_speed false
set -g @tmux_power_show_download_speed false
set -g @tmux_power_show_web_reachable false
''; '';
} }
{ {
plugin = battery; plugin = better-mouse-mode;
extraConfig = '' extraConfig = ''
set-option -g status-right "#{battery}" set -g @scroll-in-moused-over-pane "on"
set -g @scroll-speed-num-lines-per-scroll "3"
''; '';
} }
{ prefix-highlight
plugin = weather;
extraConfig = ''
set-option -g @tmux-weather-location "Kyoto"
set-option -g status-right "#{weather}"
'';
}
]; ];
extraConfig = ''
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
bind | split-window -h
bind - split-window -v
'';
}; };
} }