Skip to content

grimshot: init at 2020-05-08#87831

Closed
evils wants to merge 1 commit intoNixOS:masterfrom
evils:grimshot
Closed

grimshot: init at 2020-05-08#87831
evils wants to merge 1 commit intoNixOS:masterfrom
evils:grimshot

Conversation

@evils
Copy link
Member

@evils evils commented May 14, 2020

Motivation for this change

screenshot tool for sway from sway
this seems like a better solution than copying over snippets to my sway config

Though a different solution was suggested and implemented there, this closes #88577

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
    • 101551232
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Stuff

ping @primeos since i only saw #76787 now
it seems like the dependencies of the other contrib/ stuff are somewhat different
perhaps this could be added as sway.contrib.grimshot with a link to it in all-packages.nix?

having a separate description for this should improve discoverability

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels May 14, 2020
Copy link
Member

@primeos primeos left a comment

Choose a reason for hiding this comment

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

I once looked into this but seem to have forgotten about it or dropped it for some reason. My plan was to add a package sway-contrib with all scripts from the contrib directory. I just pushed the latest version I could find here: primeos@2b079e5
Could you have a look at this and maybe finish it (IIRC I never tested it and some dependencies are most likely still missing)? Feel free to use --reset-author on my existing commit ;)

Edit: Ideally all scripts should work with nix-shell --pure (forgot to mention that :o).

Comment on lines 15 to 23
Copy link
Member

Choose a reason for hiding this comment

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

Are there major issues with grimshot from Sway 1.4?

Copy link
Member Author

Choose a reason for hiding this comment

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

there were a bunch of improvements 2 weeks ago
a man page was also added

Copy link
Member

Choose a reason for hiding this comment

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

That's a bit unfortunate, seems like there are too many commits to cherry-pick them into sway-unwrapped. But ideally we'd still use 1.4 then as long as it works.

Copy link
Member Author

Choose a reason for hiding this comment

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

i'd really miss the "manually select window to screenshot" function
and i think the man page is a really nice thing
ofc, if 1.5 gets released we can switch to that

Copy link
Member Author

Choose a reason for hiding this comment

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

i suppose i could switch to downloading just the 2 files i'm using

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@evils
Copy link
Member Author

evils commented May 15, 2020

i'm not familiar with autoname-workspaces.py and inactive-windows-transparency.py
but they sound unrelated to screenshotting and i don't think it's a bad idea to keep the python stuff separate

@evils
Copy link
Member Author

evils commented May 15, 2020

this still fails in nix-shell --pure due to missing some context

failure output
error: XDG_RUNTIME_DIR not set in the environment.
failed to create display
error: XDG_RUNTIME_DIR not set in the environment.
Failed to connect to a Wayland server
error: XDG_RUNTIME_DIR not set in the environment.
failed to create display
Error: Clipboard error

i'm not sure if this is avoidable though

@primeos
Copy link
Member

primeos commented May 16, 2020

I've just opened #87979 to reach a consensus regarding the packaging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants