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

Make icon display predicate customizeable #442

Merged
merged 3 commits into from
Mar 12, 2023

Conversation

mohkale
Copy link
Contributor

@mohkale mohkale commented Mar 11, 2023

Closes #333.

Adds a customizeable function to restrict icon insertion and default it to display-graphic-p to retain legacy behavior. This will let terminal users who have icons properly configured use dashboard with icons without needing local modifications.

Copy link
Member

@jcs090218 jcs090218 left a comment

Choose a reason for hiding this comment

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

Some nits.

LGTM, thanks for taking care of this!

:type '(choice (function :tag "Predicate function")
(boolean :tag "Predicate value")))

(defun dashboard-display-icons-p ()
Copy link
Member

Choose a reason for hiding this comment

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

Can you document this function? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, just added a simple docstring.

to a function the result of the function will be interpreted as the
predicate value."
:type '(choice (function :tag "Predicate function")
(boolean :tag "Predicate value")))
Copy link
Member

Choose a reason for hiding this comment

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

We're getting warning:

dashboard-widgets.el:198:1:Warning: defcustom for ‘dashboard-display-icons-p’
    fails to specify containing group
dashboard-widgets.el:198:1:Warning: defcustom for ‘dashboard-display-icons-p’
    fails to specify containing group

Can you add the group for it? :)

@mohkale mohkale requested a review from jcs090218 March 12, 2023 01:24
Copy link
Member

@jcs090218 jcs090218 left a comment

Choose a reason for hiding this comment

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

LGTM, Thank you so much! :D

@jcs090218 jcs090218 merged commit 5ec8038 into emacs-dashboard:master Mar 12, 2023
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.

Remove (display-graphic-p) checks from icon insertion
2 participants