Comments (14)
No problem! And thank you for writing this amazingly nicely documented tool haha, it's been really fun to explore the tool and how it was structured, and the way it works is really nice to me. Thank you for your response!
from menyoki.
Moving on...
[...] one of the things I kind of dislike is that menyoki doesn't implicitly set the
q
flag when it detects being piped to something, sort of like Bat(1), a Cat(1) clone in Rust.
Now it does 🥳 (ced887b)
from menyoki.
Can you try it again and report what you got?
It seems to successfully work, capturing my entire desktop.
from menyoki.
You can give slop a shot maybe. e.g. menyoki cap --root --size $(slop -k)
Yes, that does exactly what I hoped for!
from menyoki.
I don't think so! I believe the only things left are the "raw" X/Rust errors, which you already made an issue for, so I believe about most of the stuff I've asked for is done for now! Thank you for such a quick answer and the cooperation. You can close the issue if you want, I'm completely pleased with the solutions we came across on this haha.
from menyoki.
Thank you for the detailed report! I'll try to look into the things that I can implement/fix out of this. As far as I can tell there are some missing features and unexpected issues with the collective use of some command-line options. I'll keep this issue updated as I proceed with the attempt of reproducing/taking an implementation into consideration. Just a side note, we might have to break this issue down to separate issues to discuss them separately in the future.
Thank you again for taking your time for this review :)
from menyoki.
Okay, let's start with this:
I'd also suggest making mouse-clicks work to select windows by default? It's really annoying to have to press Alt+S+Enter, it doesn't feel exactly like a sane default, IMHO.
Although it's possible to use mouse interaction to select windows with a 3rd party tool (as explained here), I guess it doesn't hurt to have this feature built-in. So I made this possible via --mouse
flag for record/capture subcommands: f338a69
-m, --mouse Select the window with mouse click
It's a very simple implementation and it doesn't have a complex logic for now. Thus I didn't make it as the default behavior for selecting windows. It can be set to default easily with a configuration file entry or environment variables, though.
I'm still trying out this feature so discussing this on another issue would be good if you came across any problems or if you have further ideas about it.
from menyoki.
Alright! I've tried it out and I've gotten into a couple problems with it. I'll create an issue real quick
from menyoki.
One more thing, it for some reason looks like --with-alpha is completely useless, I'm not sure what the use for it is.
Line 66 in ced887b
--with-alpha
basically tells image encoder to use the actual alpha value that is taken from window instead of plain 255. So if you have grabbed a transparent image, it won't be encoded as transparent as long as you don't provide --with-alpha
flag. Of course, it depends on the image format. Needles to say: you can't encode transparent JPEGs.
Say that you have a compositor that sets your windows' transparency by default, if you use something like:
menyoki -q cap --focus --with-alpha png save - | xclip -selection clipboard -t image/png
You will not get what was behind the window, because of it's transparency level, but you'll just get the window in normal transparency. What I thought I'd try to do that might incorporate my wallpaper, since that was what my goal was to include in my screenshot, was use theroot
option, but it cannot be used with focus , so I can't really get what the window actually looks like.
That's the expected behaviour. You can't capture couple of windows together with --focus
. If you focus on a transparent window, it will only capture that window. Your wallpaper is a part of your root window in this case. But, indeed, you can use --root
as following:
menyoki -q cap --select --root png save - | xclip -selection clipboard -t image/png
Then you will have to resize the capture area for capturing the window you want. It's expected to include transparency because you're basically capturing what you see on your entire screen.
There's actually a raw X error that I recieve when I try:
menyoki -q cap --parent --root png save - | xclip -selection clipboard -t image/png
That might be about the use of --parent
. It seems redundant because you're already using --root
. I'll look into this in #21.
Can you try it again and report what you got?
from menyoki.
I dislike is how long and sort of convoluted it makes your entire command to be, can you add in some ways to shorten more options, flags, and commands, maybe add in ways to do stuff easier than they can be done right now? I'd like if I just had to do:
menyoki cap -fa - | xclip -selection clipboard -t image/png
, or maybe just try to make the copying part easier:
menyoki cap -Cfa
, I believe this might be of very big help.
Sure, that'd be good. But in this specific case I'm not sure if I want to add -C
for copying the output. I feel like this should be done by the user. And one can always use shell aliases. e.g. I have this in my .bash_aliases
:
alias c='xclip -selection clipboard'
alias cap='menyoki -q cap --root --size $(slop -k) png save - | 0x0 - 2>/dev/null | c'
But I can add some shortcuts/extra flags for other usages. Do you have any other suggestions?
What do you think?
from menyoki.
About the copying part, I completely understand and agree with you on that one. I just had the idea back then to maybe make it "easier" to use, but it just seems like something that the user should do, I agree. About the transparency part, the reason I tried to use the focus flag with the root flag is to provide me a faster method to just capture an entire window with transparency, but maybe there might be a way to use a different tool to sort of "pipe" the window's position to the selection flag, so that it just selects the window using sort of "automatic" selection, but I feel like I might be asking too much haha, so it is fine if this wasn't implemented, I'm just saying a few ideas. Unfortunately, I'm not at my home, so I can't really re-run it, I'll be able to by tomorrow, though.
from menyoki.
About the transparency part, the reason I tried to use the focus flag with the root flag is to provide me a faster method to just capture an entire window with transparency, but maybe there might be a way to use a different tool to sort of "pipe" the window's position to the selection flag, so that it just selects the window using sort of "automatic" selection, but I feel like I might be asking too much haha, so it is fine if this wasn't implemented, I'm just saying a few ideas.
Yeah, something like that is not implemented (yet?).
You can give slop a shot maybe. e.g. menyoki cap --root --size $(slop -k)
Unfortunately, I'm not at my home, so I can't really re-run it, I'll be able to by tomorrow, though.
👍🏼
from menyoki.
Awesome to hear!
I wonder if there's anything I missed / not covered in this issue. Anything else?
from menyoki.
Nice! Feel free to submit other issues/ideas if you come across any other problems, thank you!
from menyoki.
Related Issues (20)
- RUSTSEC-2020-0071: Potential segfault in the time crate
- RUSTSEC-2022-0013: Regexes with large repetitions on empty sub-expressions take a very long time to parse HOT 1
- RUSTSEC-2022-0006: Data race in `Iter` and `IterMut` HOT 1
- RUSTSEC-2020-0163: `term_size` is unmaintained; use `terminal_size` instead
- RUSTSEC-2021-0139: ansi_term is Unmaintained HOT 2
- webp recording throwing an error HOT 1
- Support recording WebP
- Support pause during recording
- Expand shell expressions for files HOT 2
- Recording the mouse pointer HOT 1
- Adaptive framerate
- Support recording WebM
- Include a way to select a capture zone with the cursor
- CLI is awkward to use HOT 1
- Support lodepng for encoding PNGs
- The duration argument (-d <S>) doesn't seem to work HOT 5
- Cancelling action should produce exit status HOT 5
- Ctrl+c does not work to stop during the saving of the gif. HOT 2
- Stop recording throw an error and does not generate any gif HOT 3
- Improve the key bindings documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from menyoki.