Open JimitSoni18 opened 1 year ago
I cloned it again and build it again, and this time it takes defined space but now there are other problems. The exclusive true is not assigning space to the bar, and it is rendered over the window...
I'm having the same issue on Hyprland. It sometimes works, sometimes doesn't. I checked the logs and found some clues about what could be the issue.
** (eww:1221551): CRITICAL **: 20:32:17.895: gtk_wayland_init_if_needed: assertion 'GDK_IS_WAYLAND_DISPLAY (gdk_display)' failed
** (eww:1221551): CRITICAL **: 20:32:17.895: layer_surface_new: assertion 'gtk_wayland_get_layer_shell_global ()' failed
** (eww:1221551): WARNING **: 20:32:17.895: Falling back to XDG shell instead of Layer Shell (surface should appear but layer features will not work)
** (eww:1221551): CRITICAL **: 20:32:17.895: xdg_toplevel_surface_new: assertion 'gtk_wayland_get_xdg_wm_base_global ()' failed
** (eww:1221551): WARNING **: 20:32:17.895: Shell does not support XDG shell stable. Falling back to default GTK behavior
** (eww:1221551): CRITICAL **: 20:32:17.895: GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
** (eww:1221551): CRITICAL **: 20:32:17.896: GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
** (eww:1221551): CRITICAL **: 20:32:17.896: GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
** (eww:1221551): CRITICAL **: 20:32:17.896: GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
** (eww:1221551): CRITICAL **: 20:32:17.896: GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
It somehow fails to create the layer surface, causing the widget to behave like a normal window. It will show up in hyprctl clients
and there will be no gtk-layer-shell in hyprctl layers
.
My window code is like this:
(defwindow controlcenter
:stacking "fg"
:windowtype "normal"
:wm-ignore true
:monitor 0
:namespace "controlcenter"
:geometry (geometry
:width "20%"
:anchor "top right"
:y "10px"
:x "10px"
)
(layout)
)
Running Hyprland on integrated graphics. (CoffeeLake-H GT2 UHD Graphics 630) System: ROG Strix G731GW_G731GW 1.0 16GB RAM Geforce RTX 2070 Intel i7-9750H OS: Arch Linux (kernel: linux-6.3.5-arch1-1) Mesa 23.1.1-1 wayland 1.22.0-1
Eww compiled on commit: e762068 (latest as of writing)
@astudentinearth you may want to try replacting :wm-ignore with :exclusive... i don't think :wm-ignore is for wayland.
Look here for more info https://elkowar.github.io/eww/configuration.html
Anyways, I was also having similar issues (I run Hyprland on NixOS). Everything works fine until I change the :orientation to "v" instead of "h" and switching the anchor location from "top center" to "top left". Then, like @JimitSoni18, the bar is rendered over the windows instead of assigning space. When I switched to "center left" this fixed the issue for me.
@sylk0s My widget doesn't require reserved space, since it behaves more like a popup. I just recompiled eww and sometimes the window gets tiled. The moment I'm typing this, it behaves correctly. 2 minutes ago, I got it working normally after killing and restarting eww a couple times.
What are the chances this could be a Hyprland specific issue? Maybe Hyprland sometimes fails to answer calls from eww, causing it to fall back? That may be causing your bar not getting reserved space as well.
I think that issue isn't very common, considering the amount of Hyprland+eww configurations on r/unixporn. Not really sure if maintainers could reproduce it.
I've been using eww on hyprland myself for a bit now, and haven't seen this issue come up... although it's definitely weird to see eww fail at GDK_IS_WAYLAND_DISPLAY... If anyone who can reproduce this could give more insight i'd love to investigate
I'm having the same issue. I'm running on Hyprland (hyprland-nvidia-git@0.28.0.r8.ga077b7a9-1). Everything was working fine yesterday and then it just stopped working. When eww
is started by Hyprland in exec-once
on login, my bars render as layers. After killing eww
and opening the bars again, they register under hyprctl clients
instead of hytprctl layers
. Not sure what happened. I compiled eww
manually with Wayland feature flag at dc3129aee2806823bdad87785f7ef80651d5245c. Just gonna dump any and all info down here.
(defwindow topbar-left
:monitor 0
:exclusive true
:focusable false
:stacking "fg"
:namespace "topbar"
:geometry (geometry
:x "0%"
:y "20px"
:width "98%"
:height "40px"
:anchor "top center"
)
(topbar)
)
Full eww
config: https://github.com/Xenfo/dotfiles/blob/main/eww/eww.yuck
rustc
:
rustc 1.73.0-nightly (7bd81ee19 2023-07-13)
binary: rustc
commit-hash: 7bd81ee1902c049691d0a1f03be5558bee51d100
commit-date: 2023-07-13
host: x86_64-unknown-linux-gnu
release: 1.73.0-nightly
LLVM version: 16.0.5
cargo
:
cargo 1.73.0-nightly (694a57956 2023-07-11)
release: 1.73.0-nightly
commit-hash: 694a579566a9a1482b20aff8a68f0e4edd99bd28
commit-date: 2023-07-11
host: x86_64-unknown-linux-gnu
libgit2: 1.6.4 (sys:0.17.2 vendored)
libcurl: 8.1.2-DEV (sys:0.4.63+curl-8.1.2 vendored ssl:OpenSSL/1.1.1u)
ssl: OpenSSL 1.1.1u 30 May 2023
os: Arch Linux Rolling Release [64-bit]
pacman -Qi gtk3 gtk-layer-shell pango gdk-pixbuf2 cairo glib2 gcc-libs glibc
:
Name : gtk3
Version : 1:3.24.38-1
Description : GObject-based multi-platform GUI toolkit
Architecture : x86_64
URL : https://www.gtk.org/
Licenses : LGPL
Groups : None
Provides : gtk3-print-backends libgailutil-3.so=0-64 libgdk-3.so=0-64 libgtk-3.so=0-64
Depends On : adwaita-icon-theme atk cairo cantarell-fonts dconf desktop-file-utils fontconfig fribidi gdk-pixbuf2 glib2 harfbuzz
iso-codes libcloudproviders libcolord libcups libegl libepoxy libgl librsvg libxcomposite libx11 libxcursor libxdamage
libxext libxfixes libxi libxinerama libxkbcommon libxrandr libxrender pango shared-mime-info tracker3 wayland
gtk-update-icon-cache
Optional Deps : evince: Default print preview command
Required By : discord electron25 firefox gcr gtk-layer-shell libdbusmenu-gtk3 polkit-gnome slack-desktop-wayland
visual-studio-code-insiders-bin xdg-desktop-portal-gtk zenity
Optional For : avahi libcanberra qt5-base qt6-base vlc
Conflicts With : gtk3-print-backends
Replaces : gtk3-print-backends<=3.22.26-1
Installed Size : 48.92 MiB
Packager : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date : Sun 21 May 2023 10:48:52 PM EDT
Install Date : Sun 06 Aug 2023 07:17:06 AM EDT
Install Reason : Installed as a dependency for another package
Install Script : Yes
Validated By : Signature
Name : gtk-layer-shell
Version : 0.8.1-1
Description : Library to create Wayland desktop components using the Layer Shell protocol
Architecture : x86_64
URL : https://github.com/wmww/gtk-layer-shell
Licenses : LGPL3
Groups : None
Provides : None
Depends On : gtk3 wayland
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 363.78 KiB
Packager : Brett Cornwall <ainola@archlinux.org>
Build Date : Sat 22 Apr 2023 11:40:17 AM EDT
Install Date : Sun 06 Aug 2023 07:17:06 AM EDT
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
Name : pango
Version : 1:1.50.14-1
Description : A library for layout and rendering of text
Architecture : x86_64
URL : https://www.pango.org/
Licenses : LGPL
Groups : None
Provides : libpango-1.0.so=0-64 libpangocairo-1.0.so=0-64 libpangoft2-1.0.so=0-64 libpangoxft-1.0.so=0-64
Depends On : cairo fribidi harfbuzz libthai libxft
Optional Deps : None
Required By : dunst gst-plugins-base gtk3 hyprland-nvidia-git hyprpaper libdecor librsvg
Optional For : imagemagick
Conflicts With : None
Replaces : None
Installed Size : 2.26 MiB
Packager : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date : Thu 02 Mar 2023 11:05:52 AM EST
Install Date : Sun 06 Aug 2023 07:17:06 AM EDT
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
Name : gdk-pixbuf2
Version : 2.42.10-2
Description : An image loading library
Architecture : x86_64
URL : https://wiki.gnome.org/Projects/GdkPixbuf
Licenses : LGPL
Groups : None
Provides : libgdk_pixbuf-2.0.so=0-64
Depends On : glib2 libpng libtiff libjpeg shared-mime-info
Optional Deps : libwmf: Load .wmf and .apm
libopenraw: Load .dng, .cr2, .crw, .nef, .orf, .pef, .arw, .erf, .mrw, and .raf
libavif: Load .avif
libheif: Load .heif, .heic, and .avif
libjxl: Load .jxl [installed]
librsvg: Load .svg, .svgz, and .svg.gz [installed]
webp-pixbuf-loader: Load .webp
Required By : dunst gtk-update-icon-cache gtk3 libnotify librsvg steam swaylock-effects-improved-git xdg-desktop-portal
Optional For : libjxl
Conflicts With : None
Replaces : None
Installed Size : 2.96 MiB
Packager : Felix Yan <felixonmars@archlinux.org>
Build Date : Mon 02 Jan 2023 05:22:28 PM EST
Install Date : Sun 06 Aug 2023 07:17:06 AM EDT
Install Reason : Installed as a dependency for another package
Install Script : Yes
Validated By : Signature
Name : cairo
Version : 1.17.8-2
Description : 2D graphics library with support for multiple output devices
Architecture : x86_64
URL : https://cairographics.org/
Licenses : LGPL MPL
Groups : None
Provides : libcairo-gobject.so=2-64 libcairo-script-interpreter.so=2-64 libcairo.so=2-64
Depends On : fontconfig freetype2 glib2 libpng libx11 libxcb libxext libxrender lzo pixman zlib
Optional Deps : None
Required By : grim gtk3 hyprland-nvidia-git hyprpaper hyprpicker-git librsvg pango poppler slurp swaylock-effects-improved-git
Optional For : hwloc
Conflicts With : None
Replaces : None
Installed Size : 1691.63 KiB
Packager : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date : Wed 08 Feb 2023 06:13:25 PM EST
Install Date : Sun 06 Aug 2023 07:17:06 AM EDT
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
Name : glib2
Version : 2.76.4-1
Description : Low level core library
Architecture : x86_64
URL : https://wiki.gnome.org/Projects/GLib
Licenses : LGPL
Groups : None
Provides : libglib-2.0.so=0-64 libgio-2.0.so=0-64 libgmodule-2.0.so=0-64 libgobject-2.0.so=0-64 libgthread-2.0.so=0-64
Depends On : libffi libsysprof-capture pcre2 util-linux-libs zlib libffi.so=8-64 libmount.so=1-64
Optional Deps : gvfs: most gio functionality
libelf: gresource inspection tool [installed]
python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report [installed]
Required By : at-spi2-core avahi bluez bluez-utils cairo dbus-glib dconf desktop-file-utils dunst gcr-4 gdk-pixbuf2 glib-networking
graphene gsettings-desktop-schemas gssdp gstreamer gtk3 gupnp gupnp-igd harfbuzz json-glib libass libblockdev
libcloudproviders libcolord libdbusmenu-glib libgudev libical liblqr libmm-glib libnice libnotify libproxy librsvg
libsecret libsoup3 libwacom libwireplumber pinentry pipewire pipewire-audio polkit shared-mime-info tracker3 udisks2
upower volume_key xdg-desktop-portal
Optional For : libpulse visual-studio-code-insiders-bin
Conflicts With : None
Replaces : None
Installed Size : 23.92 MiB
Packager : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date : Thu 06 Jul 2023 03:48:57 PM EDT
Install Date : Sun 06 Aug 2023 07:17:06 AM EDT
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
Name : gcc-libs
Version : 13.2.1-3
Description : Runtime libraries shipped by GCC
Architecture : x86_64
URL : https://gcc.gnu.org
Licenses : GPL3 LGPL FDL custom
Groups : None
Provides : gcc-libs-multilib libgo.so=22-64 libgfortran.so=5-64 libgphobos.so=4-64 libubsan.so=1-64 libasan.so=8-64 libtsan.so=2-64
liblsan.so=0-64
Depends On : glibc>=2.27
Optional Deps : None
Required By : aom base btop cppdap db db5.3 double-conversion ell exiv2 fftw flac gc gcc gdb gettext glslang gmp gnutls
gperftools gptfdisk graphite groff highway hyprland-nvidia-git hyprpicker-git icu imath iwd jsoncpp libb2 libblockdev
libbs2b libcamera libcamera-ipa libcap libebml libelf libinih libmfx libmodplug libnl libopenmpt libpipewire libplacebo
libplist libsoxr libusbmuxd libvpx llvm-libs ncurses ninja openal openmpi pcre pipewire pipewire-audio poppler
poppler-qt5 portaudio rav1e re2 shaderc snappy speex speexdsp spirv-tools srt systemd-libs taglib udisks2 v4l-utils
vid.stab visual-studio-code-insiders-bin vmaf vulkan-validation-layers webrtc-audio-processing x265
xwaylandvideobridge-cursor-mode-2-git zimg zstd
Optional For : None
Conflicts With : None
Replaces : gcc-libs-multilib libgphobos
Installed Size : 143.93 MiB
Packager : Frederik Schwan <freswa@archlinux.org>
Build Date : Wed 02 Aug 2023 03:06:38 AM EDT
Install Date : Sun 06 Aug 2023 07:17:06 AM EDT
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
Name : glibc
Version : 2.38-2
Description : GNU C Library
Architecture : x86_64
URL : https://www.gnu.org/software/libc
Licenses : GPL LGPL
Groups : None
Provides : None
Depends On : linux-api-headers>=4.10 tzdata filesystem
Optional Deps : gd: for memusagestat
perl: for mtrace [installed]
Required By : a52dec alsa-lib alsa-plugins argon2 attr audit base bash binutils bison bluez-libs bridge-utils brotli bzip2 c-ares
cdparanoia coreutils cpio dav1d dbus-glib debugedit device-mapper diffutils docker duktape efibootmgr efivar expat
faad2 fakeroot fftw file findutils flex fribidi fuse2 fuse3 gawk gcc-libs gcc12-libs gdb gdbm giflib github-cli
gnupg gperftools grep gsm gzip hwloc hyprland-nvidia-git hyprpicker-git icu iproute2 iwd jansson jq json-c kbd
keyutils kmod krb5 l-smash less lib32-glibc libass libassuan libasyncns libatasmart libavc1394 libblockdev libbpf
libbsd libcamera libcamera-ipa libcap libcap-ng libcups libdatrie libdca libdisplay-info libdvbpsi libedit libelf
libepoxy libevdev libffi libfreeaptx libgpg-error libical libice libidn libimobiledevice libinih libjpeg-turbo libksba
liblc3 libldac libliftoff libmad libmd libmnl libmpcdec libmpeg2 libnfnetlink libnghttp2 libnl libnsl libogg
libomxil-bellagio libopenmpt libp11-kit libpcap libpciaccess libpipeline libpipewire libplacebo libplist libraw1394
libsasl libseccomp libsndfile libstemmer libtasn1 libthai libtheora libtiff libtommath libtool libunistring libupnp
libusb libusbmuxd libutempter libuv libverto libx11 libxau libxcrypt libxcvt libxdg-basedir libxdmcp libxshmfence
libyaml lilv lmdb lsof lz4 lzo m4 make md4c mdadm mkinitcpio-busybox mpfr mtdev ncurses nettle npth nspr ocl-icd
opencore-amr openmpi openpmix openssh openssl opus orc pacman pam patch pciutils perl pinentry pipewire pipewire-audio
pipewire-jack pixman pkgconf poppler poppler-qt5 popt portaudio procps-ng rav1e readline rhash sbc sdl2 sed serd
shaderc shadow snappy socat sord sratom startup-notification sudo svt-av1 systemd-libs talloc tar tdb tslib udisks2
usbutils util-linux-libs vid.stab visual-studio-code-insiders-bin volume_key vulkan-icd-loader wayland which xorg-xwayland
xvidcore xwaylandvideobridge-cursor-mode-2-git zimg zlib zstd
Optional For : tzdata
Conflicts With : None
Replaces : None
Installed Size : 49.05 MiB
Packager : Frederik Schwan <freswa@archlinux.org>
Build Date : Fri 04 Aug 2023 10:23:55 AM EDT
Install Date : Sun 06 Aug 2023 07:17:05 AM EDT
Install Reason : Installed as a dependency for another package
Install Script : Yes
Validated By : Signature
System:
-` sam@arch
.o+` --------
`ooo/ OS: Arch Linux x86_64
`+oooo: Host: MS-7D43 1.0
`+oooooo: Kernel: 6.4.8-arch1-1
-+oooooo+: Uptime: 1 hour, 43 mins
`/:-:++oooo+: Packages: 708 (pacman)
`/++++/+++++++: Shell: zsh 5.9
`/++++++++++++++: Resolution: 2560x1440
`/+++ooooooooooooo/` DE: Hyprland
./ooosssso++osssssso+` Theme: Adwaita [GTK3]
.oossssso-````/ossssss+` Icons: Adwaita [GTK3]
-osssssso. :ssssssso. Terminal: Tabby
:osssssss/ osssso+++. CPU: 12th Gen Intel i7-12700F (20) @ 4.800GHz
/ossssssss/ +ssssooo/- GPU: NVIDIA GeForce RTX 3090
`/ossssso+/:- -:/+osssso+- Memory: 4687MiB / 31954MiB
`+sso+:-` `.-/+oso:
`++:. `-/+/
.` `/
eww
2023-08-06T11:49:54.233Z INFO eww::server > main application thread finished
┏━━━━━━━━━━━━━━━━━━━━━━━┓
┃Initializing eww daemon┃
┗━━━━━━━━━━━━━━━━━━━━━━━┛
2023-08-06T12:01:24.111Z WARN eww::config::system_stats > Failed to get/calculate uWh: the total_avg value of the battery magic var will probably be a garbage value that can not be trusted.
2023-08-06T12:01:24.117Z INFO eww::ipc_server > IPC server initialized
2023-08-06T12:01:24.134Z INFO eww::app > Opening window topbar-left
2023-08-06T12:01:24.155Z INFO eww::app > Opening window topbar-right
hyprctl layers
:
Monitor DP-1:
Layer level 0 (background):
Layer 55affa1b2ce0: xywh: 0 0 2560 1440, namespace: hyprpaper
Layer level 1 (bottom):
Layer level 2 (top):
Layer 55affa1bf090: xywh: 26 20 2508 40, namespace: topbar
Layer level 3 (overlay):
Monitor DP-2:
Layer level 0 (background):
Layer 55affa1b3b20: xywh: 2560 0 2560 1440, namespace: hyprpaper
Layer level 1 (bottom):
Layer level 2 (top):
Layer 55affa1c0ed0: xywh: 2586 20 2508 40, namespace: topbar
Layer level 3 (overlay):
** (eww:105900): CRITICAL **: 07:48:55.928: GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
** (eww:105900): CRITICAL **: 07:48:55.928: GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
** (eww:105900): CRITICAL **: 07:48:55.928: GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
** (eww:105900): CRITICAL **: 07:48:55.928: GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
** (eww:105900): CRITICAL **: 07:48:55.928: GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
hyprctl clients
:
Window 557e4b5cee60 -> Eww - topbar-left:
mapped: 1
hidden: 0
at: 645,725
size: 630,695
workspace: 1 (1)
floating: 0
monitor: 0
class: Eww
title: Eww - topbar-left
initialClass: Eww
initialTitle: Eww - topbar-left
pid: 104773
xwayland: 1
pinned: 0
fullscreen: 0
fullscreenmode: 0
fakefullscreen: 0
grouped: 0
swallowing: 0
Window 557e4b5d0300 -> Eww - topbar-right:
mapped: 1
hidden: 0
at: 20,725
size: 615,695
workspace: 1 (1)
floating: 0
monitor: 0
class: Eww
title: Eww - topbar-right
initialClass: Eww
initialTitle: Eww - topbar-right
pid: 104773
xwayland: 1
pinned: 0
fullscreen: 0
fullscreenmode: 0
fakefullscreen: 0
grouped: 0
swallowing: 0
hyprctl layers
:
Monitor DP-1:
Layer level 0 (background):
Layer 557e496ef780: xywh: 0 0 2560 1440, namespace: hyprpaper
Layer level 1 (bottom):
Layer level 2 (top):
Layer level 3 (overlay):
Monitor DP-2:
Layer level 0 (background):
Layer 557e496df910: xywh: 2560 0 2560 1440, namespace: hyprpaper
Layer level 1 (bottom):
Layer level 2 (top):
Layer level 3 (overlay):
Just tested with Waybar and it refuses to launch because it has to be launched under Wayland. I think this is actually an issue with Hyprland or XWayland.
i had this issue before and tested it out with xeyes. the solution for me was to ensure i ran it in a wayland terminal rather than vscodium
i had this issue before and tested it out with xeyes. the solution for me was to ensure i ran it in a wayland terminal rather than vscodium
This was the solution.
Checklist before submitting an issue
Description of the bug
I have installed rust from rustup.rs used the nightly toolchain and compiled from github, and as I tried to run my first example window, it got tiled beside my code editor instead of getting anchored at the top. I tried changing different properties of defwindow like exclusive, stacking, etc but nothing changed. I also removed rust cargo and eww and installed and compiled it again. I thought that I was doing something wrong, so I decided to copy tokyo's dotfiles and saw that the issue still persisted.
Wayland WM - Hyprland compiled from source used nightly toolchain
Reproducing the issue
install rustc from rustup.rs clone eww from github compile for wayland copy example window from docs run eww open example
Expected behaviour
should show a bar anchored to defined position, but instead gets tiled
Additional context
No response