Add dmenu_tmux
All checks were successful
/ check (push) Successful in 44s

Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
Oliver Davies 2025-11-02 01:49:48 +00:00
parent 19e930ea1f
commit 1b1e03619a
2 changed files with 29 additions and 0 deletions

28
modules/dmenu-tmux.nix Normal file
View file

@ -0,0 +1,28 @@
{ inputs, ... }:
{
flake.modules.homeManager.gui =
{ pkgs, ... }:
{
home.packages = [
(pkgs.writeShellApplication {
name = "dmenu_tmux";
text = ''
selected="$(z tmux list | dmenu -l 20)"
if [[ -n "$selected" ]]; then
echo "$selected"
# TODO: open a terminal with the selected session.
fi
'';
runtimeInputs = with pkgs; [
dmenu
inputs.z.packages.${pkgs.stdenv.hostPlatform.system}.default
];
})
];
};
}