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

grimshot: init at 2020-05-08 #87831

Closed
wants to merge 1 commit into from
Closed

grimshot: init at 2020-05-08 #87831

wants to merge 1 commit into from

Conversation

@evils
Copy link
Contributor

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

Copy link
Member

primeos left a comment

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).

pkgs/tools/graphics/grimshot/default.nix Outdated Show resolved Hide resolved
# after sway-1.5 this may be switched to sway-unwrapped.src
src = fetchFromGitHub {
owner = "swaywm";
repo = "sway";
# latest change to contrib/grimshot*
rev = "b1d08db5f5112ab562f89564825e3e791b0682c4";
sha256 = "1j9wk2m79grhjxyx8fzgcza0virlkansl2fvlvjszk526i0igri6";
};
Comment on lines 15 to 23

This comment has been minimized.

Copy link
@primeos

primeos May 15, 2020

Member

Are there major issues with grimshot from Sway 1.4?

This comment has been minimized.

Copy link
@evils

evils May 15, 2020

Author Contributor

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

This comment has been minimized.

Copy link
@primeos

primeos May 15, 2020

Member

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.

This comment has been minimized.

Copy link
@evils

evils May 15, 2020

Author Contributor

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

This comment has been minimized.

Copy link
@evils

evils May 15, 2020

Author Contributor

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

This comment has been minimized.

Copy link
@evils

evils May 15, 2020

Author Contributor

done

@evils
Copy link
Contributor 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 evils force-pushed the evils:grimshot branch from 543f362 to 3eb3964 May 15, 2020
@evils
Copy link
Contributor 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

@evils evils force-pushed the evils:grimshot branch from 3eb3964 to ddb3f86 May 15, 2020
@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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.