stumpwm / stumpwm

The Stump Window Manager
GNU General Public License v2.0
1.91k stars 266 forks source link

`*screen-mode-line-format*` not working according to documentation #308

Closed dhamidi closed 7 years ago

dhamidi commented 7 years ago

Given the following in ~/.stumpwmrc:

(setf *screen-mode-line-format*
      (list "[%w] " '(:eval (stumpwm:run-shell-command "bash -c \"~/local/bin/mode-line\"" t))))

Everything works as expected: [%w] is respected and the shell command is run.

However, the following does not work:

(setf *screen-mode-line-format*
      (list  '(:eval (stumpwm:run-shell-command "bash -c \"~/local/bin/mode-line\"" t)) "[%w] "))

Only the result of run-shell-command is visible in the modeline.

I'm running stumpwm at commit 37a0ae9 (tagged v1.0.0).

Reading the documentation for `screen-mode-line-format gives the impression that the latter is supposed to render the output of the given shell command followed by whatever %w expands to.

PuercoPop commented 7 years ago

I can't reproduce. Both mode line formats work. Even tested the case where the program exits with a failure code.

dhamidi commented 7 years ago

Thanks for double-checking! Must be an issue with my setup then — I'll try again with a fresh install of StumpWM, maybe this time from a release, not from a version I compiled myself.