Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
19e930ea1f
commit
1b1e03619a
2 changed files with 29 additions and 0 deletions
28
modules/dmenu-tmux.nix
Normal file
28
modules/dmenu-tmux.nix
Normal 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
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue