pjones / exwm-nw

Named Workspaces for EXWM
MIT License
3 stars 0 forks source link

show name of workspace in modeline or bar? #1

Closed rdiaz02 closed 5 years ago

rdiaz02 commented 6 years ago

Thanks for exwm-nw! Is it possible to show the name of the workspace in the modeline or in a bar? (e.g., lemonbar, xmobar, etc)? The names are shown when I use exwm-workspace-switch (s-w), so they are obviously there. But (elisp ignorant here) I do not see how to have them displayed in the visible workspaces.

pjones commented 6 years ago

That's a great idea.

Right now the closest you can get is calling the exwm-nw-get-name function. However, the way it is written right now requires that you tell it which workspace you want the name of. So the complete function call would be:

(exwm-nw-get-name (exwm-nw--current))

I'll work on making that a bit easier so you can call that function from your mode line format and from emacsclient.

rdiaz02 commented 6 years ago

Thanks a lot! That would be great.

pjones commented 5 years ago

I just release version 0.2.0 which fixes this. The exwm-nw-get-name function can now be called without arguments, in which case it will return the name of the current workspace. That makes it really easy to get this information from outside of Emacs:

$ emacsclient --eval '(exwm-nw-get-name)'
"emacs"