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

Add overview search actions #115

Open
JosiahFu opened this issue Nov 20, 2023 · 6 comments
Open

Add overview search actions #115

JosiahFu opened this issue Nov 20, 2023 · 6 comments

Comments

@JosiahFu
Copy link

I tend to use the overview search to suspend/shutdown more often than the quick settings menu, so it would be nice to have the hibernate options there as well.

Suspend action in overview search

No hibernate action in overview search

@ViBE-HU
Copy link
Contributor

ViBE-HU commented Nov 20, 2023

this would be great. like shutdown, restart, logout.

@slaclau
Copy link
Collaborator

slaclau commented Jan 8, 2024

This is out of scope of the extension but can be achieved easily by adding files like this to /usr/share/applications or ~/.local/share/applications

[Desktop Entry]
Type=Application
Name=hibernate
Icon=application-exit-symbolic
Exec=systemctl hibernate

@slaclau slaclau closed this as completed Jan 8, 2024
@julienfalque
Copy link

I think the extension can be relevant for implementing this feature for two reasons:

  • it would integrate with the confirm dialog option;
  • the action would be available only if hibernation is actually enabled on the system.

Would you consider reopening this issue?

@JosiahFu
Copy link
Author

JosiahFu commented Nov 26, 2024

My current workaround for the confirm dialog is

Exec=bash -c 'zenity --question --title "Hibernate" --text "Do you really want to hibernate the system?" --icon "dialog-error-symbolic" --ok-label "Hibernate" --cancel-label "Cancel" --default-cancel && systemctl hibernate'

It's not modal like the system dialogue but it's close enough for me

@julienfalque
Copy link

Nice workaround. This feels a bit hacky though, and it needs to be implemented on every system where this is wanted.

@slaclau
Copy link
Collaborator

slaclau commented Nov 27, 2024

I think the extension can be relevant for implementing this feature for two reasons:

  • it would integrate with the confirm dialog option;
  • the action would be available only if hibernation is actually enabled on the system.

Would you consider reopening this issue?

You’ve made a good case for it, I guess we just need to implement a search provider - feel free to have a go: https://gjs.guide/extensions/topics/search-provider.html

I can have a try when I get a bit of time

@slaclau slaclau reopened this Nov 27, 2024
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

No branches or pull requests

4 participants