home
NOTE: Under Construction - I'm in the middle of upgrading my site and lots of stuff is kinda broken. Please forgive the mess.

Try To Set A Tmux Window Name In Rust

I add this to my terminal apps to set the name of tmux windows to make it easier to remember what's what

September 2023

The Code

Code
use std::process::Command;

pub fn try_to_set_tmux_title(title: &str) {
    let args: Vec<&str> = vec!["select-pane", "-T", title];
    let _ = Command::new("tmux").args(args).output().unwrap();
}

Usage

try_to_set_tmux_title("Some App Name");

═══ § ═══