ch11ng / exwm

Emacs X Window Manager
2.85k stars 136 forks source link

x-applications is shown in all workspaces on a screen when using several screens. #379

Closed vetegrodd closed 6 years ago

vetegrodd commented 6 years ago

Since exwm-17 I cannot longer use multiple workspaces in combination with multiple screens.

Setup: Two screens with 4 workspaces. WS 0 and 1 on screen 0 and WS 2 and 3 on screen 1. If I open a web browser in workspace 0 it is still visible when I switch to workspace 1, although the focus in the buffer that was associated with ws 1. The same happens on screen 1 if I open or move a window to worskpace 2 and 3.

This is my config:

(require 'exwm)
(require 'exwm-config)
(exwm-config-default)
(require 'exwm-randr)
(exwm-randr-enable)
(exwm-enable)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(exwm-randr-screen-change-hook
   (quote
    ((lambda nil
       (start-process-shell-command "xrandr" nil "xrandr --output HDMI-1 --left-of LVDS-1 --primary --auto --output LVDS-1 --auto")))))
 '(exwm-randr-workspace-output-plist (quote (0 "HDMI-1" 1 "HDMI-1" 2 "LVDS-1" 3 "LVDS-1")))
 '(package-selected-packages
   (quote
    (exwm ## pipenv yaml-mode company company-mode paradox use-package))))
kinleyd commented 6 years ago

@ch11ng xfe is also giving the same problem again, but only on occasion - not on every first run like before.

ch11ng commented 6 years ago

@kinleyd I've just pushed the workspace support in per-application configurations. Here's an example:

(setq exwm-manage-configurations `(((equal exwm-class-name "Chromium")
                                    workspace 2)
                                   ((equal exwm-class-name "Firefox")
                                    workspace 3)))
kinleyd commented 6 years ago

@ch11ng: Thanks for setting up per-application configurations. It works just like how herbstluftwm used to handle designated workspaces ("tags" as it was labelled in hlwm).

It works well for most applications except for the Spicy ones. The two screens that I define for Spicy open up as buffers Spicy<2> and Spicy<3>, in addition to the base buffer Spicy. However, the per-application configuration for the workspaces for Spicy<2> and Spicy<3> don't kick in - would it have anything to do with the angled brackets in the name?

ch11ng commented 6 years ago

Please do not rely on that. The order is not guaranteed. Perhaps the X windows can be distinguished by exwm-title (the _NET_WM_NAME fields reported by xprop, something like spice display 0:0).

kinleyd commented 6 years ago

Yes, exwm-title does give me the properties as you described. However, per-application configuration for "spice display 1:0" and "spice display 2:0" still don't kick in. I'll continue fiddling around and see if I can make any headway. Thanks @ch11ng, I appreciate your time.