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

Allow Opening File Folder When Clicking Notification #126

Merged
merged 4 commits into from
Jan 29, 2025

Conversation

PacificViking
Copy link
Contributor

Description of changes

Things done

  • For new programs

    • Add the program to the README table, with yourself as the
      maintainer
    • Add a README for the program itself
    • Add Makefile (and Nix derivation optionally, otherwise @fufexan will do
      it)
    • If the program is a script, add it to the
      CI checks matrix
  • For changes

@fufexan
Copy link
Member

fufexan commented Jan 21, 2025

I myself don't have a FileManager1 interface active in D-Bus. Probably because I only have xdp-gtk and xdp-hyprland. This makes the dbus-send call fail.

I propose opening the folder with xdg-open instead. I have my mimeapps.list configured properly, and use portal activation for xdg-open. Using xdg-open also bypasses the comma limitation.

@PacificViking
Copy link
Contributor Author

I used dbus because xdg-open doesn't select the newly created file within the window opened. I store my screenshots in the same folder.

Afaik, dbus is the only way to select a file within a file manager semi-platform-independently:
https://unix.stackexchange.com/questions/364997/open-a-directory-in-the-default-file-manager-and-select-a-file

@fufexan
Copy link
Member

fufexan commented Jan 25, 2025

That makes sense. Then we'll want to warn users if they don't have the required portal.

Copy link
Member

@fufexan fufexan left a comment

Choose a reason for hiding this comment

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

Looks good, but --openfile should be documented in the man page as well.

Also, you may want to rebase this, as there's a conflict on the Changelog.

Copy link
Member

@fufexan fufexan left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@fufexan fufexan merged commit f4bea56 into hyprwm:main Jan 29, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants