Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmuxPlugins.tmux-which-key: init at unstable-2024-06-08 #372455

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NovaViper
Copy link
Contributor

@NovaViper NovaViper commented Jan 9, 2025

Fixes #367462

A plugin for tmux that allows users to select actions from a customizable popup menu. Inspired by the likes of vscode-which-key, emacs-which-key, and which-key.nvim, this plugin aims to make users more effective at using tmux by reducing keyboard shortcut memorization and increasing feature discoverability.
homepage: https://github.com/alexwforsythe/tmux-which-key

Additionally, I add myself as maintainer of the package. I tested basic functionality in my flake (as well built it with nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD") and found that it works correctly.
flake info:

❯ nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.12.8, NixOS, 25.05 (Warbler), 25.05.20250104.8f3e1f8`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.25.3`
 - nixpkgs: `/nix/store/khbvilmsrv4l69nwd52h27j1mp44a0xi-source`

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@NovaViper
Copy link
Contributor Author

Hmm.. currently running into an issue with getting the plugin to recognize the configuration files (upstream issue); whatever the default configuration it uses works fine but any changes made seems to be ignored by the plugin.

alexwforsythe/tmux-which-key#15

@NovaViper NovaViper changed the title tmuxPlugins.which-key: init at unstable-2024-06-08 tmuxPlugins.tmux-which-key: init at unstable-2024-06-08 Jan 14, 2025
@NovaViper
Copy link
Contributor Author

Hmm.. currently running into an issue with getting the plugin to recognize the configuration files (upstream issue); whatever the default configuration it uses works fine but any changes made seems to be ignored by the plugin.

alexwforsythe/tmux-which-key#15

Ah so it turned out a home-manager module is needed in order to make changes via the nix way because the package's python script converts the yaml config file into tmux commands during derivation. See: alexwforsythe/tmux-which-key#15 (comment)

Also I went and renamed it to match the name of the repository.

lib,
check-jsonschema,
python3,
...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
...

mkTmuxPlugin {
pluginName = "tmux-which-key";
rtpFilePath = "plugin.sh.tmux";
version = "unstable-2024-06-08";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version = "unstable-2024-06-08";
version = "0-unstable-2024-06-08";

Version must start with a digit.


meta = {
homepage = "https://github.com/alexwforsythe/tmux-which-key";
description = "A plugin for tmux that allows users to select actions from a customizable popup menu. Inspired by vscode-which-key, emacs-which-key, and which-key.nvim";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description = "A plugin for tmux that allows users to select actions from a customizable popup menu. Inspired by vscode-which-key, emacs-which-key, and which-key.nvim";
description = "Tmux plugin that allows users to select actions from a customizable popup menu";

version = "unstable-2024-06-08";
propagatedBuildInputs = [
check-jsonschema
(python3.withPackages (ps: with ps; [ pyyaml ]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the plugin is a python script it might be better to patch it to use this python instead of propagating it everywhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could try using patchShebangs in postInstall and have the python env in buildInputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package request: tmuxPlugins.which-key
2 participants