Skip to content

Added system actions: exit menu etc.#2102

Open
Enyium wants to merge 6 commits intotalonhub:mainfrom
Enyium:pr-system-actions
Open

Added system actions: exit menu etc.#2102
Enyium wants to merge 6 commits intotalonhub:mainfrom
Enyium:pr-system-actions

Conversation

@Enyium
Copy link
Copy Markdown
Contributor

@Enyium Enyium commented Jan 2, 2026

  • Implemented them for Windows.
  • Transferred one action for Linux from an existing .talon file.

See the new file core/system/system.talon first for a quick overview.

Enyium and others added 2 commits January 2, 2026 22:04
- Implemented them for Windows.
- Transferred one action for Linux from an existing .talon file.
Comment on lines +20 to +22
def system_lock():
# Adapt key configuration as needed.
actions.key("super-shift-x")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this is very problematic: it moves a setting that is neither a default nor really a widely adopted convention to a file that has nothing to do with i3wm. Thus, this would become very hard to discover. I am not even entirely convinced that there is any configuration for these commands that would work reliably across desktop environments. I'm not aware of any general configuration for the major environments like Gnome and KDE in community. Of course, the major desktop environments have recently dropped support for X11 and, by extension, Talon. But that's a different can of worms.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

a setting that is neither a default nor really a widely adopted convention

I needed to abstract the existing voice command lock screen, because it semantically belongs to what the new core/system/system.py declares. I can't see how it should just continue to exist in parallel, if the platform-independent abstraction is accepted.

this would become very hard to discover.

i3wm.talon could refer to this code in a comment. Do you think the implementation in core/system should be moved?!

I am not even entirely convinced that there is any configuration for these commands that would work reliably across desktop environments.

That's why I defined the i3wm_ctx with the respective constraint. The new core/system/system_linux.py was intended to be augmented with different Talon Contexts for different desktop environments.

AI generated code for me for the class I3wmUserActions that it thought would implement the actions (same for Mac). I just didn't accept it, because I can't test it, because I'm neither a Linux user nor knowledgable in Linux. (Disclaimer: I wrote the Windows code diligently myself.)

Comment thread core/system/system_win.py Outdated
@Enyium
Copy link
Copy Markdown
Contributor Author

Enyium commented Jan 3, 2026

Maybe I should move system_switch_screen_power() into the core/screens directory?

Enyium added 3 commits January 5, 2026 05:28
…reens on.

Also made use of the `win32con` module more.
The "system" prefix is required, because the user is normally in the mindset of working with specific apps, and some widely used apps like Chrome and Firefox have their own task managers.
@Enyium Enyium force-pushed the pr-system-actions branch from eb41146 to 096a3e0 Compare January 5, 2026 04:32
@AndreasArvidsson
Copy link
Copy Markdown
Collaborator

Feedback from community session:

We're not in love with adding a lot of "to do"s and half implemented actions. We would suggest creating a separate pull request with the windows only features like opening task manager. Having that voice commands for the other platforms doesn't really make that much sense. In this pull request the things that should be left is things that are actually supported and implemented for all three platforms. A reason why all of these actions are not added already is because there isn't a platform agnostic implementation or support for all of these features. In the future you are welcome to attend one of our backlog sessions or write to us on slack we can have a discussion about large changes beforehand.

Please have a look at the contribution guidelines

- P06 - Communicate with maintainers before submitting a large pull request. Not everything that is useful for a specific user belongs in community itself. To avoid wasting your time, it is recommended to file an issue to give a chance for maintainers to respond before doing a lot of work on a feature that may or may not get accepted. Maintainers may additionally have useful suggestions on how to implement your desired changes that can save you considerable work and reduce the amount of changes requested in peer review.

Copy link
Copy Markdown
Collaborator

@AndreasArvidsson AndreasArvidsson left a comment

Choose a reason for hiding this comment

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

See above

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.

3 participants