Closed cmorgan closed 5 years ago
Yes... I would like to know the answer to this as well
Can anyone give any guidance on this issue? I have trawled through the documentation but it is a little over my head.
@hughwilliams94 do you mean what is the problem we are trying to solve ?
No sorry I am requesting the same information. Just in case it helps I was able to add the following code to my .spacemacs file to partially fix my issue:
(remove-hook 'focus-out-hook 'powerline-unset-selected-window)
At the moment I am struggling to get this to evaluate on startup but if I reload my config when I have started it works. Essentially it tells emacs not to change the window/modeline setup when it loses focus so my pomodoro clock remains active when I am in another window e.g. browser.
You can remove :when active
in your mode line configuration for the segments you want to display unconditionally.
See here for example: https://github.com/TheBB/spaceline/blob/master/spaceline-config.el#L44
@TheBB that's great, thanks. How would I go about altering that :when
in my .spacemacs?
@cmorgan How I solved this
Close the issue if this solution worked for you
@cmorgan The best solution you have for doing this from your .spacemcacs
is to copy the mode-line configuration from spaceline-config.el
, modify it to your needs and spaceline-compile
it.
This is the default configuration for Spacemacs, I simplified the code a little bit so that it fits better in a .spacemacs
:
(spaceline-compile
'(((persp-name
workspace-number
window-number)
:fallback evil-state
:face highlight-face
:priority 100)
(anzu :priority 95)
auto-compile
((buffer-modified buffer-size buffer-id remote-host)
:priority 98)
(major-mode :priority 79)
(process :when active)
((flycheck-error flycheck-warning flycheck-info)
:when active
:priority 89)
(minor-modes :when active
:priority 9)
(mu4e-alert-segment :when active)
(erc-track :when active)
(version-control :when active
:priority 78)
(org-pomodoro :when active)
(org-clock :when active)
nyan-cat)
'(which-function
(python-pyvenv :fallback python-pyenv)
(purpose :priority 94)
(battery :when active)
(selection-info :priority 95)
input-method
((buffer-encoding-abbrev
point-position
line-column)
:separator " | "
:priority 96)
(global :when active)
; add here whatever your 'additional-segments were if you had any
(buffer-position :priority 99)
(hud :priority 99)))
I guess this was somewhat documented here but not in a very clear way. I will try to rework the readme a little bit if I have time today; this is not the first time that this question is asked.
Readme updated 👍✨
specifically i'd like to always display the org-pomodoro timer, when window is both active and inactive thanks!