Skip to content

zSuperx/muffin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Muffin

A simple TUI for managing tmux sessions.

This project is heavily inspired by muxie, borrowing many functional and design decisions from it. Go check it out and show your support!

Usage

Usage: muffin [OPTIONS]

OPTIONS:
    -s, --start-preset <NAME>   Start preset
    -l, --list-presets          List presets information
    -p, --presets <FILE>        Path to presets file [default: ~/.config/muffin/presets.kdl]
    -e, --exit-on-switch        Close muffin after switching to a session/preset
    -h, --help                  Print help

While muffin can be run from the command line, it's power is best utilized when bound to a key within tmux.

For example, my tmux.conf includes the following:

# Override tmux's builtin session manager with muffin
unbind s
bind s popup -EB /path/to/muffin
bind -n M-s popup -EB /path/to/muffin # `Alt + s` as a nice shortcut

(Hint: if you generate your tmux config file with Nix, you can replace /path/to/muffin with ${lib.getExe muffin}, where muffin points to this flake's package derivation)

The following demo runs with presets.kdl:

muffin-demo.mp4

Building

The release profile is currently designed to optimize for a minimal binary size. My reasons for this are simple:

  1. The actual TUI application is snappy enough and bound via I/O blocking, so speed optimizations are really a fool's errand.
  2. It's funny.

Cargo

To build muffin, simply run:

cargo build --release

and you should be good to go!

Nix

A simple flake.nix is also provided with muffin exposed as a package. This means you can run with nix run github:zSuperx/muffin.

To properly add muffin to your $PATH, first add it to your flake inputs:

{
  inputs.muffin.url = "github:zSuperx/muffin";
  # ...
}

then add the following to your configuration.nix or adjacent:

{ inputs, ... }:
let
  system = "x86_64-linux"; # or your system
in
{
  environment.systemPkgs = [
    inputs.muffin.packages.${system}.muffin
  ];
}

About

tmux session manager

Resources

Stars

22 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors