Skip to content

feat: support 'Hidden' and 'NoDisplay' keys#133

Open
kyriemeows wants to merge 1 commit into
javalsai:masterfrom
kyriemeows:hidden-session-entries
Open

feat: support 'Hidden' and 'NoDisplay' keys#133
kyriemeows wants to merge 1 commit into
javalsai:masterfrom
kyriemeows:hidden-session-entries

Conversation

@kyriemeows

Copy link
Copy Markdown

.desktop entries with Hidden=true and NoDisplay=true should not appear in the selector.

@javalsai

Copy link
Copy Markdown
Owner

Looks good! Will properly review, test and merge when I get a proper break from final exams.

Comment thread src/sessions.c
char* NULLABLE name;
char* NULLABLE exec;
char* NULLABLE tryexec;
char* NULLABLE nodisplay;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

If these are supposed to be booleans shouldn't we make this a boolean and parse the value with its key? We avoid heap overuse by copying "true"s around, and can forget about freeing it later.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sounds good, I'll revise this in a bit.

Comment thread src/sessions.c

if (ctx->name != NULL && ctx->exec != NULL && ctx->tryexec != NULL) {
if (ctx->name != NULL && ctx->exec != NULL && ctx->tryexec != NULL &&
ctx->nodisplay != NULL && ctx->hidden != NULL) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

If we use booleans instead, could make this something analogous to a rust's Option<bool> and just finish once its something. Otherwise it's just gonna close the file before reaching such keys if they are after the rest.

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