Coder Social home page Coder Social logo

Comments (4)

alezost avatar alezost commented on August 17, 2024

Sorry, I don't understand what you are asking about. What bitmap do you mean and how can it replace a minor mode? This sounds mysterious to me 😄

BTW the stable mepla shield in README is broken.

And I don't understand this as well. What "melpa shield" is?

from dim.el.

casouri avatar casouri commented on August 17, 2024

Sorry 😄 I mean bitmap pictures, is that easy to implement?

And by the shield I mean the tags on the first line, the melpa one was broken yesterday.

from dim.el.

alezost avatar alezost commented on August 17, 2024

Sorry 😄 I mean bitmap pictures, is that easy to implement?

There is nothing to implement. I mean, it is a usual emacs
feature and it should work right away. You just need to put
whatever mode-line construct you want instead of a string and
that's it! For example:

(setq my-text-mode-name
      (propertize "text" 'display (create-image "back-arrow.xpm")))
(put 'my-text-mode-name 'risky-local-variable t) ; needed to make images work
(dim-major-name 'text-mode 'my-text-mode-name)

Evaluate the above code and open any buffer in text-mode. You
should see the back-arrow icon (that comes with Emacs).

Or you can make your own icon if you wish, for example:

(defvar my-smile-icon
  `(image :type xpm :ascent center :data "! XPM2
16 14 2 1
# c yellow
. c black
################
################
###..######..###
##....####....##
###..######..###
################
#######..#######
#######..#######
##.##########.##
###..######..###
####...##...####
######....######
################
################
"))

(put 'my-smile-icon 'risky-local-variable t)
(dim-major-name 'emacs-lisp-mode
                (propertize "smile" 'display my-smile-icon))

(this will work only if your X Window System supports XPM2, which is the case if you use GNU/Linux distro)

And by the shield I mean the tags on the first line, the melpa one was broken yesterday.

Ah, apparently, it was some problem on MELPA.

Let me know if you have any problems or questions on what I wrote.

from dim.el.

casouri avatar casouri commented on August 17, 2024

Thanks!

from dim.el.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.