this post was submitted on 27 Oct 2023
1 points (100.0% liked)

Emacs

314 readers
2 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

I'm using the adwaita-dark theme but the mode-line is too wide for my liking. In the theme code there's a variable (mode-line-padding 10) which I assume sets the width of the mode line. Is there a way for me to reset this value in my init file, either before or after loading the theme code, to make it narrower? I'm using the code below to load it.

(use-package adwaita-dark-theme
  :ensure t
  :config
  (load-theme 'adwaita-dark t))

top 3 comments
sorted by: hot top controversial new old
[–] github-alphapapa@alien.top 1 points 1 year ago (1 children)

You can do M-x customize-option RET mode-line-padding RET, or if you want to do it only for that theme, see https://github.com/alphapapa/unpackaged.el#customize-theme-faces for code that does that for faces; you could adapt it to do the same for an option.

[–] taeknibunadur@alien.top 1 points 1 year ago (1 children)

Many thanks for your suggestions. When I tried the first one however, the variable wasn't recognised (I wonder if that's because it's internal to the theme code?). I'll investigate your second suggestion.

[–] github-alphapapa@alien.top 1 points 1 year ago

Must be a variable then, not an option. Just use setq on it. If you want to automate it, you could advise load-theme similarly to how the function I linked does.