Closed jwintz closed 7 years ago
Hi @jwintz, thanks! Good news, I can reproduce this myself 😅
w.r.t. the segment colours, yes, they use specific faces for each segment, these include
(funcall spaceline-highlight-face-func)
most likely spaceline-highlight-face
powerline-active1
powelrine-active2
mode-line
powerline-inactive1
powerline-inactive2
And since the wave separator is basically an icon, it calculates it's foreground and background colours from the two faces its transitioning between, e.g. from spaceline-highlight-face
to powerline-active-1
... The problem here, is that spaceline-highlight-face
doesn't have a background
property set on it, so when you call
(face-background 'spaceline-highlight-face)
It returns nil
rather than the inherited background colour and so then defaults to inheriting the foreground colour, which is wrong!
w.r.t. the projectile/file-name segments, they're still separate segments 😃 they're just very coupled to try and produce a "smart" behaviour, that is,
projectile
is disabled or outside a project or no project is set, file path will show _relative to (getenv "HOME")
And these are controlled by all-the-icons-projectile
, all-the-icons-buffer-path
and all-the-icons-buffer-id
- You should be able to toggle these on and off independently to suit your taste and if you have any suggestions for the behaviour, I'm more than happy to hear them 😃
Lastly, I'm not sure why the Clock Icon isn't showing?
Do you have weather-icons
installed?
What happens if you call all-the-icons-insert-icons-for-wicon
inside a *scratch*
buffer?
tl;dr
Yep, from what I can tell from your set up, you will need to set spaceline-highlight-face
& powerline-active2
to have background colours.
Try toggling spaceline-toggle-all-the-icons-projetcile
, spaceline-toggle-all-the-icons-buffer-path
and spaceline-toggle-all-the-icons-buffer-id
on and off to see how the file path works
Please try calling all-the-icons-insert-icons-for-wicon
inside a *scratch*
buffer and screenshot the results?
Also, I forgot to mention about anzu-mode
... Do you have global-anzu-mode
enabled? And what's the value of anzu-mode-line-update-function
after your init? It could be that anzu
is loading after spaceline-all-the-icons
and therefore overwriting back to default...?
@domtronn, many thanks for your prompt and very detailed answer. Also, sorry to bring so many different questions in a single ticket, that is no good usage :-(. Don't want to be itchy, but I feel this package is gonna grow in popularity and I want to stick with it and maybe help with some PR. I have not yet read all the code.
So let me address things point by point:
the clock icon: I used to use your fonts, with the awesome all-the-icons
in my previous setup in various places but since I didn't plan on getting weather forecast in my editor, I skipped the weather once. Now it is fixed, and I have my beautiful clock, however, I think this segment should only be display when the current frame is fullscreen.
spaceline segment faces: what is, according to you, the best place to have them declared (and optionally overriden) ? The theme package ? Your spaceline package ? The user init file ? I used to declare many additional segments without having to care about their backround color. See https://github.com/jwintz/prolusion/commit/84d80f17cfc37dd722666a1cff06f78cb51ad6a7#diff-c924d4a72c2aa8a2b67300e06ef9485b, which were added tp space line's default config as such:
(spaceline-spacemacs-theme 'prolusion-mode-icon 'prolusion-narrow 'prolusion-conda-environment 'prolusion-upgrades-count)
Could it still be done with ?
(spaceline-all-the-icons-theme <ADDITIONAL SEGMENTS>)
Using doom-theme-one
now anyway, I have set up the power line separator to (quote none)
, and I like it. Will investigate though.
Also, If I ike your HUD segment, I would like to customise it to be on the right-most place, as it is done in spaceline
default setup (I do not use Spacemacs, which is however awesome).
spaceline-toggle-all-the-icons-<SEGMENT>-on/off
work, except some I would very much like to have .e.g. (was a lot of code deletion from my previous setup, which is good :-))spaceline-toggle-all-the-icons-package-update-on
As for anzu, I have it globally enabled, and included before my ui config, but I found the fix: because of default spaceline's displaying twice, I had:
(setq anzu-cons-mode-line-p nil)
(global-anzu-mode +1)
which I changed to
(setq anzu-cons-mode-line-p t)
(global-anzu-mode +1)
And now this problem is fixed, no matter the require
order.
Another remark: I'm using persp-mode
for perspectives, and seems not to be handled by spaceline-all-the-icons, but is in space line, so I am confused. And in order for it not to mess up the modeline, it needs to be require
'd before the ui stuff (which is where I have the spaceline-all-the-icons) setup. Window numbering however forks just fine ;-)
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Worspaces requirements
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(prolusion/require-package 'persp-mode)
(prolusion/require-package 'window-numbering)
(prolusion/require-package 'all-the-icons)
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Workspaces setup
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(when (display-graphic-p)
(window-numbering-mode +1))
(when (display-graphic-p)
(setq persp-auto-save-fname (expand-file-name "prolusion-perspective" prolusion-save-dir))
(setq persp-save-dir prolusion-save-dir)
(setq persp-nil-name (all-the-icons-octicon "dash" :height 0.9 :v-adjust 0.0))
(custom-set-variables
'(persp-auto-resume-time -1)
'(persp-auto-save-opt 0)
'(persp-keymap-prefix (kbd "C-c w")))
(persp-mode +1))
And as a last point, M-x space line-toggle-major-mode-on
does have any effect whatsoever. Miss it.
Could it also be possible to have buffer current position (line and column segment) on the right ?
Just FYI information, here's my all setup: https://github.com/jwintz/prolusion/tree/develop.
Best,
Hi,
Sorry for the noise, but I just remembered there use to be a segment for the text-increase
count in the default spaceline setup. Is there any way to get it back ?
Many thanks !
Will dig into segment faces soon. There was another point I wanted to bring up: with spaceline-helm-mode
and spaceline-info-mode
, using spaceline-all-the-icons
, the modelling lowers in height as shown in the screenshot.
Is there a specific scale factor to set up ?
Cheers,
Hi there,
Some answers to my own questions.
Here's my current config:
(use-package spaceline-all-the-icons
:after spaceline
:config
(setq spaceline-all-the-icons-icon-set-flycheck-slim (quote dots))
(setq spaceline-all-the-icons-icon-set-git-ahead (quote commit))
;; (setq spaceline-all-the-icons-icon-set-window-numbering (quote square))
(setq spaceline-all-the-icons-flycheck-alternate t)
(setq spaceline-all-the-icons-highlight-file-name t)
(setq spaceline-all-the-icons-separator-type (quote none))
(spaceline-all-the-icons-theme)
(spaceline-all-the-icons--setup-anzu)
(spaceline-all-the-icons--setup-package-updates)
(spaceline-all-the-icons--setup-paradox)
(spaceline-all-the-icons--setup-neotree)
(spaceline-toggle-all-the-icons-vc-icon-on)
(spaceline-toggle-all-the-icons-fullscreen-on)
(spaceline-toggle-all-the-icons-flycheck-status-on)
(spaceline-toggle-all-the-icons-git-status-on)
(spaceline-toggle-all-the-icons-vc-icon-on)
(spaceline-toggle-all-the-icons-mode-icon-on)
(spaceline-toggle-all-the-icons-package-updates-on)
(spaceline-toggle-all-the-icons-text-scale-on)
(spaceline-toggle-all-the-icons-region-info-on))
M-x package-refresh-contents
, which makes sense, otherwise it would slow down the startup processError during redisplay: (eval (spaceline-ml-all-the-icons)) signaled (void-variable text-scale-mode-lighter) [36 times]
(setq spaceline-all-the-icons-icon-set-window-numbering (quote square))
, breaks the modeline rendering when window number exceeds one: Invalid face attribute :background nil Invalid face attribute :foreground nil Error during redisplay: (eval (spaceline-ml-all-the-icons)) signaled (wrong-type-argument listp (:height 1.2 :inherit)) [24 times]
(spaceline-toggle-all-the-icons-vc-icon-on)
has no effect, would love to see on what branch I amTo be continued, love spaceline-all-the-icons
!
Hey @jwintz, thanks for all the useful information! I genuinely don't mind you asking lots of questions so please keep going.
I hope you don't mind, but I was going to split this into separate issues - just to help me compartmentalise the information and focus on an answer to each one individually. This should hopefully help other users who have similar problems as it should remove noise.
I'll quote the segments of this issue and link them back to this 👍
Thanks for being so kind. I am slowly getting familiar with to code, so I'll hope to contribute soon.
@jwintz Is there any chance that you will show us your .spacemacs
file? You configuration is pretty amazing. Could you gist your config please?
Sure. I'm not using spacemacs. Here my config: https://github.com/jwintz/prolusion/tree/develop.
Hello,
Great package ! Was waiting for it to get rid of my custom spaceline config ;-)
I've been giving a shot at your package, together with doom-theme-one.
They do not fit well, in that sense that segments are not coloured. Is there a specific face to set up ?
Also, I am quite surprised that projectile, and file name come as a single segment.
Finally, using doom-theme, the wave segment is not rendered correctly. I do not see anzu working whatsoever, and the clock icon is wrong. Here's the setup:
Cheers,