summaryrefslogtreecommitdiff
path: root/Rexfile
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-09 18:43:10 +0300
committerPaul Buetow <paul@buetow.org>2026-06-09 18:43:10 +0300
commit62fde28b96f65e8c4a31116c8184662c74c3507c (patch)
tree8ec01d44b21e9c56cd87d0dc666467d446301ab7 /Rexfile
parent165aa7c36f8480918d120a7874d41a4ca6fcdede (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--Rexfile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Rexfile b/Rexfile
index e9e1114..04e019a 100644
--- a/Rexfile
+++ b/Rexfile
@@ -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/";