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

Package request: mouse-actions #264904

Closed
waldman opened this issue Nov 1, 2023 · 8 comments
Closed

Package request: mouse-actions #264904

waldman opened this issue Nov 1, 2023 · 8 comments
Labels
0.kind: packaging request Request for a new package to be added

Comments

@waldman
Copy link

waldman commented Nov 1, 2023

Project description

mouse-actions allows to execute some commands from mouse events such as:

  • Clicks / wheel on the side / corners of the screen,
  • Or drawing shapes.

Metadata

@waldman waldman added the 0.kind: packaging request Request for a new package to be added label Nov 1, 2023
@rgri
Copy link
Contributor

rgri commented Nov 2, 2023

Hi, I don't know how to contribute to nixpkgs yet so I made a flake with a working default.nix. For anyone who is curious while I read up on submitting a package, here is what I'm doing:

{ lib, fetchFromGitHub, rustPlatform, pkg-config, virtualgl, xorg, libevdev }:
rustPlatform.buildRustPackage rec {
  pname = "mouse-actions";
  version = "v0.4.4";

  src = fetchFromGitHub {
    owner = "jersou";
    repo = pname;
    rev = version;
    hash = "sha256-02E4HrKIoBV3qZPVH6Tjz9Bv/mh5C8amO1Ilmd+YO5g=";
  };
  cargoHash = "sha256-GRClGC6+3J/YW5jVh7iAb2idD6/PycG854XbBIkfB/c=";
  buildInputs = [ xorg.libX11 xorg.libXi xorg.libXtst libevdev ];
  nativeBuildInputs = [ pkg-config virtualgl ];
  meta = with lib; {
    # TODO: better description
    description =
      "A way to execute some commands from mouse events, a mix between Easystroke and Comiz edge commands";
    homepage = "https://github.com/BurntSushi/ripgrep";
    # TODO: license
    license = licenses.unlicense;
    # TODO: how to add myself as a maintainer? (rgri)
    maintainers = [ ];
  };
}

Criticism is of course welcome.

@jfvillablanca
Copy link
Member

Hi, I don't know how to contribute to nixpkgs yet so I made a flake with a working default.nix. For anyone who is curious while I read up on submitting a package, here is what I'm doing:

{ lib, fetchFromGitHub, rustPlatform, pkg-config, virtualgl, xorg, libevdev }:
rustPlatform.buildRustPackage rec {
  pname = "mouse-actions";
  version = "v0.4.4";

  src = fetchFromGitHub {
    owner = "jersou";
    repo = pname;
    rev = version;
    hash = "sha256-02E4HrKIoBV3qZPVH6Tjz9Bv/mh5C8amO1Ilmd+YO5g=";
  };
  cargoHash = "sha256-GRClGC6+3J/YW5jVh7iAb2idD6/PycG854XbBIkfB/c=";
  buildInputs = [ xorg.libX11 xorg.libXi xorg.libXtst libevdev ];
  nativeBuildInputs = [ pkg-config virtualgl ];
  meta = with lib; {
    # TODO: better description
    description =
      "A way to execute some commands from mouse events, a mix between Easystroke and Comiz edge commands";
    homepage = "https://github.com/BurntSushi/ripgrep";
    # TODO: license
    license = licenses.unlicense;
    # TODO: how to add myself as a maintainer? (rgri)
    maintainers = [ ];
  };
}

Criticism is of course welcome.

Use repo = "mouse-actions" since pname and repo are semantically different.

with regards to the meta info, you can use the upstream's meta info

and add yourself to the maintainer list and make a separate commit for that
here are the docs
then put your name on the meta.maintainers of that package.
you should be able to build the package if you added your name to the maintainer list

then on your pull request, the commits would include you adding yourself to the maintainers and the nix expression for the package

check the docs for more info and feel free to ask more questions

@rgri
Copy link
Contributor

rgri commented Nov 2, 2023

Thanks for the advice! I've tried to follow all of it- I've opened #265056.

@waldman
Copy link
Author

waldman commented Nov 6, 2023

Guys, question... in order to request the mouse-actions-gui should I create a new request?

@rgri
Copy link
Contributor

rgri commented Nov 7, 2023

I don't have the answer to that, maybe someone else can comment on the precedent. Besides that, @waldman do you have a workflow/config using mouse-actions that can be used to test functionality? I had to write some udev rules to make it work (it is almost ready for merge).

@waldman
Copy link
Author

waldman commented Nov 7, 2023

I use the "Mouse Gestures" functionality A LOT for tab management on my browsers:

  • Press 2 Button+Drag to the right => Next Tab (Ctrl+Tab)
  • Press 2 Button+Drag to the left => Previous Tab (Shift+Ctrl+Tab)
  • Press 2 Button+Drag down => Close Tab (Ctrl+w)
  • Press 2 Button+Drag up => Reload Tab (Ctrl+r)

Problem is that I believe on this app is almost impossible to craft the settings above on the configuration file without the GUI.

I used easystroke - https://github.com/thjaeger/easystroke - for this for almost 10 years but now it's deprecated in favor of mouse-actions, so I don't have a working config... =(

@teto
Copy link
Member

teto commented Nov 7, 2023

can anyone comment about mouse-action and waylant compatibility ? the readme says it works in degraded mode but not sure how what that means

@rgri
Copy link
Contributor

rgri commented Jan 27, 2024

Closing with the merge of #265056.

@rgri rgri closed this as completed Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: packaging request Request for a new package to be added
Projects
None yet
Development

No branches or pull requests

4 participants