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
];
})
];
};
}

View file

@ -13,6 +13,7 @@
"super + shift + i" =
"${pkgs.xdotool}/bin/xdotool type $(cat ~/.local/share/snippets.txt | grep -v '^#' | grep -v '^$' | sort | dmenu -i -l 50 | cut -d' ' -f1)";
"super + shift + p" = "${lib.getExe pkgs.passmenu-otp} -i";
"super + shift + t" = "dmenu_tmux";
"super + shift + v" = "dmenu_mpv";
"super + x; {1, 2, 3, 4}" = "st {notes, newsboat, nmtui, bluetuith}";
"{_, shift +, super +}XF86MonBrightness{Down,Up}" =