michaelforney / dmenu

MIT License
22 stars 8 forks source link

dmenu is not displayed #6

Open FallingSnow opened 6 years ago

FallingSnow commented 6 years ago

Running dmenu results in the below output but no menu is actually displayed. I have tried alt-tabbing and it is not listed.

$ dmenu
# find_driver: Trying DRM driver `intel'
# wld_font_open_name: Opening font with name: monospace:size=10
# wld_font_open_pattern: Loading font file: /usr/share/fonts/TTF/DejaVuSansMono.ttf

Just installed for Arch Linux via dmenu-wayland-git and wld-git. I'm on Gnome Wayland.

Turgon-Aran-Gondolin commented 5 years ago

@FallingSnow Do you have a solution for Fedora?

michaelforney commented 5 years ago

dmenu reads all its stdin before displaying a window. This is how it works on X11 too. Please try

printf '%s\n' foo bar | dmenu

If that doesn't work, a log with WAYLAND_DEBUG=1 would be appreciated.

KubqoA commented 5 years ago

I have the same problem as well. The output for printf '%s\n' foo bar | dmenu is:

# find_driver: Trying DRM driver `intel'
# wld_font_open_name: Opening font with name: monospace:size=10
# wld_font_open_pattern: Loading font file: /usr/share/fonts/TTF/DejaVuSansMono.ttf

When running the command with WAYLAND_DEBUG=1 the output remains the same.

michaelforney commented 5 years ago

WAYLAND_DEBUG=1 should definitely produce some extra output. Are you sure it is exported in your shell?

KubqoA commented 5 years ago

Sorry, you are right my mistake. Here is the output with WAYLAND_DEBUG=1

[2692914.752]  -> wl_display@1.get_registry(new id wl_registry@2)
[2692914.780]  -> wl_display@1.sync(new id wl_callback@3)
[2692914.859] wl_display@1.delete_id(3)
[2692914.879] wl_registry@2.global(1, "wl_shm", 1)
[2692914.892] wl_registry@2.global(2, "zwp_linux_dmabuf_v1", 3)
[2692914.904] wl_registry@2.global(3, "wl_drm", 2)
[2692914.920] wl_registry@2.global(4, "wl_compositor", 4)
[2692914.940]  -> wl_registry@2.bind(4, "wl_compositor", 1, new id [unknown]@4)
[2692914.960] wl_registry@2.global(5, "wl_subcompositor", 1)
[2692914.973] wl_registry@2.global(6, "wl_data_device_manager", 3)
[2692914.990]  -> wl_registry@2.bind(6, "wl_data_device_manager", 1, new id [unknown]@5)
[2692915.008] wl_registry@2.global(7, "gamma_control_manager", 1)
[2692915.024] wl_registry@2.global(8, "zwlr_gamma_control_manager_v1", 1)
[2692915.039] wl_registry@2.global(9, "gtk_primary_selection_device_manager", 1)
[2692915.053] wl_registry@2.global(10, "zxdg_output_manager_v1", 2)
[2692915.066] wl_registry@2.global(11, "org_kde_kwin_idle", 1)
[2692915.080] wl_registry@2.global(12, "zwp_idle_inhibit_manager_v1", 1)
[2692915.093] wl_registry@2.global(13, "zwlr_layer_shell_v1", 1)
[2692915.111] wl_registry@2.global(14, "zxdg_shell_v6", 1)
[2692915.128] wl_registry@2.global(15, "xdg_wm_base", 2)
[2692915.150] wl_registry@2.global(16, "org_kde_kwin_server_decoration_manager", 1)
[2692915.169] wl_registry@2.global(17, "zxdg_decoration_manager_v1", 1)
[2692915.188] wl_registry@2.global(18, "zwlr_export_dmabuf_manager_v1", 1)
[2692915.205] wl_registry@2.global(19, "zwlr_screencopy_manager_v1", 1)
[2692915.220] wl_registry@2.global(20, "zwp_virtual_keyboard_manager_v1", 1)
[2692915.235] wl_registry@2.global(21, "zwlr_input_inhibit_manager_v1", 1)
[2692915.248] wl_registry@2.global(22, "wl_seat", 6)
[2692915.263]  -> wl_registry@2.bind(22, "wl_seat", 1, new id [unknown]@6)
[2692915.284] wl_registry@2.global(23, "wl_output", 3)
[2692915.298] wl_registry@2.global(24, "wl_output", 3)
[2692915.310] wl_callback@3.done(19137)
[2692915.324]  -> wl_display@1.get_registry(new id wl_registry@3)
[2692915.338]  -> wl_display@1.sync(new id wl_callback@7)
[2692915.389] wl_display@1.delete_id(7)
[2692915.400] wl_registry@3.global(1, "wl_shm", 1)
[2692915.417] wl_registry@3.global(2, "zwp_linux_dmabuf_v1", 3)
[2692915.431] wl_registry@3.global(3, "wl_drm", 2)
[2692915.448]  -> wl_registry@3.bind(3, "wl_drm", 2, new id [unknown]@8)
[2692915.475] wl_registry@3.global(4, "wl_compositor", 4)
[2692915.494] wl_registry@3.global(5, "wl_subcompositor", 1)
[2692915.513] wl_registry@3.global(6, "wl_data_device_manager", 3)
[2692915.533] wl_registry@3.global(7, "gamma_control_manager", 1)
[2692915.553] wl_registry@3.global(8, "zwlr_gamma_control_manager_v1", 1)
[2692915.573] wl_registry@3.global(9, "gtk_primary_selection_device_manager", 1)
[2692915.592] wl_registry@3.global(10, "zxdg_output_manager_v1", 2)
[2692915.612] wl_registry@3.global(11, "org_kde_kwin_idle", 1)
[2692915.631] wl_registry@3.global(12, "zwp_idle_inhibit_manager_v1", 1)
[2692915.651] wl_registry@3.global(13, "zwlr_layer_shell_v1", 1)
[2692915.672] wl_registry@3.global(14, "zxdg_shell_v6", 1)
[2692915.693] wl_registry@3.global(15, "xdg_wm_base", 2)
[2692915.712] wl_registry@3.global(16, "org_kde_kwin_server_decoration_manager", 1)
[2692915.732] wl_registry@3.global(17, "zxdg_decoration_manager_v1", 1)
[2692915.751] wl_registry@3.global(18, "zwlr_export_dmabuf_manager_v1", 1)
[2692915.770] wl_registry@3.global(19, "zwlr_screencopy_manager_v1", 1)
[2692915.790] wl_registry@3.global(20, "zwp_virtual_keyboard_manager_v1", 1)
[2692915.811] wl_registry@3.global(21, "zwlr_input_inhibit_manager_v1", 1)
[2692915.831] wl_registry@3.global(22, "wl_seat", 6)
[2692915.853] wl_registry@3.global(23, "wl_output", 3)
[2692915.873] wl_registry@3.global(24, "wl_output", 3)
[2692915.892] wl_callback@7.done(19137)
[2692915.903]  -> wl_display@1.sync(new id wl_callback@7)
[2692915.941] wl_display@1.delete_id(7)
[2692915.950] wl_drm@8.device("/dev/dri/card0")
[2692915.980]  -> wl_drm@8.authenticate(4)
[2692915.990] wl_drm@8.format(808669761)
[2692916.000] wl_drm@8.format(808669784)
[2692916.010] wl_drm@8.format(875713089)
[2692916.020] wl_drm@8.format(875713112)
[2692916.029] wl_drm@8.format(909199186)
[2692916.039] wl_drm@8.format(961959257)
[2692916.049] wl_drm@8.format(825316697)
[2692916.059] wl_drm@8.format(842093913)
[2692916.068] wl_drm@8.format(909202777)
[2692916.078] wl_drm@8.format(875713881)
[2692916.088] wl_drm@8.format(842094158)
[2692916.097] wl_drm@8.format(909203022)
[2692916.106] wl_drm@8.format(1448695129)
[2692916.116] wl_drm@8.capabilities(1)
[2692916.125] wl_callback@7.done(19137)
[2692916.136]  -> wl_display@1.sync(new id wl_callback@7)
[2692916.168] wl_display@1.delete_id(7)
[2692916.177] wl_drm@8.authenticated()
[2692916.184] wl_callback@7.done(19137)
# find_driver: Trying DRM driver `intel'
# wld_font_open_name: Opening font with name: monospace:size=10
# wld_font_open_pattern: Loading font file: /usr/share/fonts/TTF/DejaVuSansMono.ttf

I am using sway as my wayland compositor if that helps.

michaelforney commented 5 years ago

Oh, I see. As far as I know, there is no standard wayland protocol for displaying surfaces that need to be docked on the edge of the screen. This version of dmenu uses the swc_panel_manager protocol I wrote for swc (https://github.com/michaelforney/swc/blob/master/protocol/swc.xml). If the compositor doesn't support that protocol, it just exits with status 1 (it should probably print an error message though, to avoid confusion).

To make this work with sway/wlroots, you will need to change it to use the wlr_layer_shell protocol: https://github.com/swaywm/wlroots/blob/master/protocol/wlr-layer-shell-unstable-v1.xml

KubqoA commented 5 years ago

I assume that means I would have to modify the source of this project?

michaelforney commented 5 years ago

Yes.