dbordak / telephone-line

A new implementation of Powerline for Emacs
GNU General Public License v3.0
553 stars 50 forks source link

ryo modal mode #39

Closed thorstengrothe closed 7 years ago

thorstengrothe commented 7 years ago

I switched from xah-fly-keys to ryo modal mode. I like telephone line very much, would it be much work to make it compatible with ryo modal mode?

Regards Thorsten

dbordak commented 7 years ago

I've just added support for this with the latest commit, however there are two considerations due to the way this package works (that is, only being enabled while in "normal" mode, whereas the other packages are always enabled). First, you need to make sure the package is actually loaded (otherwise the segment will show up blank until you've enabled the mode, not a big deal I guess). Second, it has its own colorsym, ryo. Here's an example:

  (setq telephone-line-lhs
        '((ryo    . (telephone-line-ryo-modal-segment))
          (...)))
thorstengrothe commented 7 years ago

Thank you, I will test and report...

thorstengrothe commented 7 years ago

It works fine :-) The only thing is, that the right side is gray and not red like in your screenshots, I use Spacemacs theme and Doom Theme. This is my config with use-package:

(use-package telephone-line
  :ensure t
  :config
  (use-package telephone-line-separators)
  (setq telephone-line-lhs
        '((ryo    . (telephone-line-ryo-modal-segment))
          (accent . (telephone-line-vc-segment
                     telephone-line-erc-modified-channels-segment
                     telephone-line-process-segment))
          (nil    . (telephone-line-minor-mode-segment
                     telephone-line-buffer-segment))))
  (setq telephone-line-rhs
        '((nil    . (telephone-line-misc-info-segment))
          (accent . (telephone-line-major-mode-segment))
          (evil   . (telephone-line-airline-position-segment))))

  ;; ABS
  (setq telephone-line-primary-right-separator 'telephone-line-abs-left
        telephone-line-secondary-right-separator 'telephone-line-abs-hollow-left)
  (setq telephone-line-height 24
        telephone-line-evil-use-short-tag t)
  (telephone-line-mode 1)
  )

With Spacemacs theme it looks like this (see the right side): bildschirmfoto_2017-05-29_21-07-23

Doom theme seems to break the separators and the right side is not red too, see here: bildschirmfoto_2017-05-29_21-17-31

No big deal, thanks for the fast support! Thorsten

ogdenwebb commented 7 years ago

@thorstengrothe you have the different color "mode", i.e. your right side uses evil color instead of ryo. You could use the following:

(ryo   . (telephone-line-airline-position-segment)

Or set both segment to evil if you want the same color.