diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-09 18:43:10 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-09 18:43:10 +0300 |
| commit | 62fde28b96f65e8c4a31116c8184662c74c3507c (patch) | |
| tree | 8ec01d44b21e9c56cd87d0dc666467d446301ab7 /Rexfile | |
| parent | 165aa7c36f8480918d120a7874d41a4ca6fcdede (diff) | |
tmux: add rocky overrides (C-g prefix for nested tmux), remove extended-keys-format for tmux 3.2 compat
Diffstat (limited to 'Rexfile')
| -rw-r--r-- | Rexfile | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -293,6 +293,30 @@ task 'home_tmux', sub { ensure "$DOT/tmux/*" => "$HOME/.config/tmux/"; }; +desc 'Install tmux rocky overrides (C-g prefix for nested tmux)'; +task 'home_tmux_rocky', sub { + if ( $^O eq 'linux' && (hostname() // '') =~ /rocky/ ) { + my $conf = "$HOME/.config/tmux/tmux.local.conf"; + my $line = "source-file ~/.config/tmux/tmux.rocky.conf"; + + if ( -f $conf ) { + my $content = do { local $/; open my $fh, '<', $conf or die $!; <$fh> }; + if ( $content !~ /\Q$line\E/ ) { + Rex::Logger::info("Appending tmux.rocky.conf source to $conf"); + open my $fh, '>>', $conf or die $!; + print $fh "\n$line\n"; + close $fh; + } + else { + Rex::Logger::info("tmux.rocky.conf already sourced in $conf"); + } + } + } + else { + Rex::Logger::info( 'Skipping tmux rocky overrides (not on rocky)', 'warn' ); + } +}; + desc 'Install Sway configuration'; task 'home_sway', sub { ensure "$DOT/sway/config.d/*" => "$HOME/.config/sway/config.d/"; |
