-
Notifications
You must be signed in to change notification settings - Fork 18
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
Using an MacOS and Chrome (Gmail) doesn't attach the file #19
Comments
Yes, I am aware of this. Unfortunately, I confirmed that this is an issue with gtk4 iteself in both MacOS and Windows systems. As soon as the gtk fixes it, it should work automatically on ripdrag. |
Ah, that's too bad. Do you know if it's on their roadmap? Any issue I can track? |
I didn't see one open unfortunately, plese open one here https://gitlab.gnome.org/GNOME/gtk/-/issues if you feel like it. |
Is there an open issue GTK4 issue to follow? |
I don't think there is one. I don't have a working macos install to reproduce, but you should be able to repro and report the bug by compiling gtk4 demos and testing drag and drop there. |
I ended up using https://eternalstorms.at/yoink/mac/ for now. It's a little too elaborate for my liking, is not open-source, and has a nag screen until you pay, but works. See "Tip number 5" in https://eternalstorms.at/yoink/mac/tips/. |
@ilyagr that "Tip number 5", i.e. copying a file to clipboard in the terminal, can be achieved with a free script, e.g.
|
Actually, I think I've seen the light. You don't need any app on a Mac to have basic All you need is: open -e anyfile # Or, equivalently, `open -a TextEdit anyfile`. Update: The Then, you can use the proxy icon at the top of the screen to drag the file. By default, you need to click on the filename in the title for the icon to show up (but see below!). I know it works since this is how the image above was attached to this issue :) Hopefully unnecessary safety tip: don't save the file. If you make any edits, don't try to undo or fix them, just quit without saving. Obviously, TextEdit is not the only app that can do this, many sufficiently Apple-y apps support proxy icons. It has two good properties: it's always installed and, unlike many Apple apps, it seems to be willing to open any file. TextEdit's one downside is that it requires the safety tip above; it'd be cool if there was an equally effective read-only app (e.g. if there was a way to open Finder's "Get Info" view from the command-line) or if there was a way to tell TextEdit to treat the file as read-only. You can ask MacOS to show the proxy icons without requiring a click on the title by using the "Show window title icons" setting in the Settings app. This is on Mac OS Sonoma 14.7. |
Thanks, this does a slightly different thing (of course, pasting does not fully replace drag-n-drop in every application), but works for me so far as well. For example, I checked and copying a JPG file with this script and pasting into a GitHub issue in Firefox works. By the way, on recent versions of Mac OS (I'm on Sonoma, but I think this has been the case for some time), #!/bin/sh
osascript -e{'on run{a}','set the clipboard to posix file a',end} "$(readlink -f -- "$1")" (I put it into a separate file, but a shell function works too) |
@ilyagr, thank you very much for the window title icon idea! At first, I could not get it to work, but I think I have figured out the trick: Two more notes:
|
Nice! I updated my original comment with this suggestion.
Nice idea! For Vim fans, you can install https://github.com/macvim-dev/macvim, set up the Footnotes
|
I have encountered a situation where opening with the TextEdit does not work: zip archives. |
Do you have a suggestion for doing this with many files? For example, if I have many zip archives to drag onto a webpage, might it be possible to have fewer than one drag per file? macvim does not actually open multiple files when given multiple command line filename arguments, although "2 files to edit" is printed to terminal. I use this bash function now:
|
Hi there,
This project is really what I needed on my Mac, and I was super excited about it, and I installed it immediately.
Tried to test it to attach a file in browser's Gmail (using Chrome), and when I drag the file, it basically pastes the path to the file, instead of attaching it to the email.
If I do the same using Finder (MacOS's file manager), it properly attaches the file.
I was wondering if this is something that is a known issue/can be fixed.
Thank you
The text was updated successfully, but these errors were encountered: