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

update state syntax #46

Merged
merged 1 commit into from
Jan 29, 2024
Merged

update state syntax #46

merged 1 commit into from
Jan 29, 2024

Conversation

tsl0922
Copy link
Owner

@tsl0922 tsl0922 commented Jan 28, 2024

Syntax:

#@state=<expr> is an improved version of #@prop:check to extend support for other state like disabled.

<expr> is like the profile-cond option in Conditional auto profiles, but it should return valid state string seprated by , (checked/disabled/hidden).

The code for other keywords is refactored to reuse the watch logic of <expr>.

#@prop:check is not suppored anymore.

Usage

_           ignore                                 #menu: Disabled #@state='disabled'
_           ignore                                 #menu: Checked #@state='checked,disabled'

Ctrl+s      stop                                   #menu: Stop #@state=playlist_playing_pos==-1 and 'disabled'
m           cycle mute                             #menu: Mute #@state=(mute and 'checked')

@tsl0922
Copy link
Owner Author

tsl0922 commented Jan 28, 2024

ping @zhongfly @hooke007 @verygoodlee

@tsl0922 tsl0922 marked this pull request as ready for review January 28, 2024 03:09
@tsl0922 tsl0922 force-pushed the state-v2 branch 5 times, most recently from 82d574b to 2401fc3 Compare January 29, 2024 02:27
@tsl0922 tsl0922 changed the title add new state syntax (v2) update state syntax Jan 29, 2024
@tsl0922 tsl0922 merged commit 9d95340 into main Jan 29, 2024
2 checks passed
@tsl0922 tsl0922 deleted the state-v2 branch January 29, 2024 02:47
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.

1 participant