Aylur / dotfiles

My personal config files
Other
2.44k stars 127 forks source link

eww widget got deallocated #27

Closed fr13ndxd closed 1 year ago

fr13ndxd commented 1 year ago

my eww logs get spammed with

Caused by: Couldn't upgrade reference, widget got deallocated 2023-06-08T12:25:30.373Z ERROR eww::error_handling_ctx > Error while updating UI after state change

& media player doesnt work

when i run the init:

sh $HOME/.config/eww/scripts/init           1 ✘
 2023-06-08T12:36:56.273Z INFO  eww > Initializing Eww server. (/run/user/1000/eww-server_a998a4d5bb250fd2)
Run `eww logs` to see any errors while editing your configuration.
 2023-06-08T12:36:56.275Z INFO  eww::server > Loading paths: config-dir: /home/fr13nd/.config/eww, ipc-socket: /run/user/1000/eww-server_a998a4d5bb250fd2, log-file: /home/fr13nd/.cache/eww_a998a4d5bb250fd2.log

error: referenced unknown widget `desktop`
   ┌─ ./setups/leftbar.yuck:17:49
   │
17 │                         :anchor "bottom right")(desktop))
   │                                                 ─────── Used here

Cache directory: /home/fr13nd/.cache/aylur/

(myshell:465330): Gjs-CRITICAL **: 14:36:56.886: JS ERROR: GLib.SpawnError: Failed to execute child process “eww” (Argument list too long)
_output@file:///home/fr13nd/.config/eww/scripts/myshell/main.js:98:50
vfunc_activate/<@file:///home/fr13nd/.config/eww/scripts/myshell/main.js:71:28
vfunc_activate@file:///home/fr13nd/.config/eww/scripts/myshell/main.js:71:10
App@file:///home/fr13nd/.config/eww/scripts/myshell/main.js:61:14
main@file:///home/fr13nd/.config/eww/scripts/myshell/main.js:133:5
@file:///home/fr13nd/.config/eww/scripts/myshell/myshell:46:5
thyeun commented 1 year ago

@FR13NXD Sometime i also need to relogin one or two times, for seeing the notification icon appear, but this might because of my lousy laptop. Than only manually trigger work.

fr13ndxd commented 1 year ago

is there a way to trigger the notification icon?

thyeun commented 1 year ago

@FR13NXD Not sure for this, but what i know is, it is a one cycle check, if one of it missing, no matter how many time you manually trigger the media player, it wont show out, have to all the icon show up, than manually trigger only the media player appear.

fr13ndxd commented 1 year ago

couldnt even manually trigger the media player

thyeun commented 1 year ago

Do you start the spotify before you trigger?

fr13ndxd commented 1 year ago

btw do you know any similar dotfiles that i can use? as i dont think i am able to fix this

thyeun commented 1 year ago

For hyprland-eww, from what i see on reddit, only @Aylur one is the best, others only OK. i mean easy setup and configuration, others abit hard and some are separated.

fr13ndxd commented 1 year ago

i mean i only care about the bar

fr13ndxd commented 1 year ago

do you know any similar eww bars like this?

thyeun commented 1 year ago

dharma

Alot you can find there, but it is separated, you have to combine it, if you want beside the bar

fr13ndxd commented 1 year ago

oh alright

thyeun commented 1 year ago

@FR13NXD Sorry for cant supported you. =.=

fr13ndxd commented 1 year ago

@thyeun do you know this eww config? https://youtu.be/3P2iqjs0gt4

fr13ndxd commented 1 year ago

@Aylur and also you said that you will make tutorial how to setup the dotfiles in one of your youtube comments, can i just make sure i didnt do anything wrong?

thyeun commented 1 year ago

@FR13NXD Dont know =.= you have to ask the owner.

fr13ndxd commented 1 year ago

i have now your dotfiles, so you are the owner

thyeun commented 1 year ago

@FR13NXD i mean the youtube you ask me, i dont know where to find him.

fr13ndxd commented 1 year ago

what

thyeun commented 1 year ago

https://youtu.be/3P2iqjs0gt4 this one

fr13ndxd commented 1 year ago

oh

fr13ndxd commented 1 year ago

@thyeun do you have any nice waybars?

thyeun commented 1 year ago

No, my waybar ugly. waybar alot you can find it at reddit. =.=

Aylur commented 1 year ago

Your issue is probably with something in .config/eww/scripts/myshell, try commenting out stuff you don't need. This is just how using others dotfiles are, you kind have to figure it out yourself.

fr13ndxd commented 1 year ago

@Aylur .config/eww/scripts/myshell is a directory

fr13ndxd commented 1 year ago

image i commented battery and bluetooth as i dont need them, is this what you meant? in main.js

fr13ndxd commented 1 year ago

well i reinstalled my operating system, now it works, except battery of cource because i have desktop. i dont know what the problem was but reinstalling my operating system worked for me, means reinstalling all the packages etc, maybe i had wrong version of eww? i dont know

fr13ndxd commented 1 year ago

This seems to be so weird

fr13ndxd commented 1 year ago

well before it was the same story, installed arch, tried it, it worked, after some time it just broke. ill keep this issue updated if it breaks.

D3vil0p3r commented 1 year ago

I have the same issues:

Selected workspace icon is not filled by white color (not sure if it is expected). Weather data is unavailable. The last two icons at the bottom of the vertical bar report "null" and power buttons icons missing: image

Furthermore, when clicked on Fedora icon, and the search bar appears, not all applications have their icons despite they should have: image

For example PowerShell is specified by $HOME/.local.share/applications/powershell.desktop:

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=PowerShell
Comment=PowerShell
Icon=/usr/share/icons/hicolor/scalable/apps/powershell.svg
Exec=gnome-terminal -- /usr/bin/bash -c 'pwsh'
Terminal=false
Categories=Tags;Describing;Application

and the icon path specified is correct.

Another "issue" is that, when I open a terminal app, like kitty or wezterm, by the application search accessible by Fedora icon, the terminal opens always at .config/eww folder instead of HOME.

The last issue I see is that the key combination on my keyboard for decreasing and increasing the volume (Fn + LeftArrow and Fn + RightArrow) are not caught well by the environment, because, when I press them, the Volume icon appears on the right but the volume level does not change. Instead, if I use the key combination Fn + UpArrow and Fn + DownArrow for increasing and decreasing screen luminosity, it works well.

thyeun commented 1 year ago

@D3vil0p3r

  1. For filled up icon, first time using it, it will response slow.
  2. For weather, you have to fill up your current location in the weather file. ~/.config/eww/scripts/weather
  3. For apps icon, it will cache into your .cache/aylur/apps directory, if you didn see it for the first time, meaning that, it still not in that cache directory. After a few time using your apps from the launcher, you will see it.
  4. For the terminal open in directory ~/.config/eww, i have the same too. =.=
  5. For the volume key, you have to change according to what your need from your hyprland.conf. Due to that this is dotfiles, each of us have our own fav key-bind.
Aylur commented 1 year ago

The script I wrote for the workspaces just isn't very good. For the weather you need an OpenWeather api key. If something is null it means the eww variable wasn't set or updated yet, which can be caused by missing dependency or some issue on your specific usecase/setup. I have no idea why the powermenu icons are missing, you can swap them out for nerd fonts if that works. The applauncher only loads icons that Gtk.IconTheme can lookup from an icon name and not custom paths to files. For opening apps I use gtk-launch which for some reason I don't know opens the terminal at .config/eww. As for the volume/brightness popup, you should checkout the scripts and figure it out yourself.

D3vil0p3r commented 1 year ago

Meanwhile, I fixed

3- As @Aylur suggested, I removed direct icon path from the .desktop files then I run gtk-update-icon-cache and gtk4-update-icon-cache (not sure if useful or not) and then reboot. 5- Audio issue fixed by installing pipewire-pulse that will remove pulseaudio and then:

systemctl --user enable wireplumber
systemctl --user enable pipewire
systemctl --user enable pipewire-pulse
systemctl --user start wireplumber
systemctl --user start pipewire
systemctl --user start pipewire-pulse

then reboot.

I will investigate on the remaining issues.

UPDATE 4.: the problem is that when gtk-launch is launched on a specific directory, after the command is run, it returns in the directory where gtk-launch has been launched. In our EWW case, gtk-launch is run in .config/eww folder. Could be inserting a cd $HOME before gtk-launch a good idea?

About the icons null, when I reboot they appear correctly, so I don't think it is a missing deps. Furthermore I didn't do any tweaks. I'm using your original repo: image

Then, when I open a terminal and I run eww reload, the null strings are back: image

I see they are managed in ~/.config/eww/yuck/widgets/bar_widgets.yuck and they are {bluetooth.icon}, {bluetooth.connected_devices[0].icon}, {battery.icon} and {notifications.icon}. Where their source is specifically defined?

D3vil0p3r commented 1 year ago

@Aylur I got the souce of the issue of Powermenu not showing icons. The fault is in .config/eww/scss/variables.scss. This file defines a wrong variable for other users different from you, because assets variable is defined as:

$assets: 'home/demeter/.config/eww/assets/';

So, all elements using this variable won't work. I don't know if in a .scss file is possible to access to env variables as $HOME, but it will solve the issue and the icons will appear to the powermenu.

Another issue I found is on .config/eww/assets because here there is a broken symbolic link of wallpaper.png:

lrwxrwxrwx user user  32 B  Sun Jun 11 01:01:22 2023  wallpaper.png@ ⇒ /home/demeter/.config/background

and of course the source of this link does not exist. It is better to replace this broken link with the real wallpaper.png file.

Also .local/bin/hypr has a direct reference to /home/demeter. It could be useful for having all of them more generic for all users.

Could you please fix these things in the repo?

Aylur commented 1 year ago

Could be inserting a cd $HOME before gtk-launch a good idea?

tried PWD=$HOME gtk-launch and cd $HOME && gtk-launch, but they don't seem to work.

Then, when I open a terminal and I run eww reload, the null strings are back:

Because you also need to restart `.config/eww/scripts/myshell/myshell. This is the runtime that updates most eww variables, but it doesn't detect if eww was reloaded.

I see they are managed in ~/.config/eww/yuck/widgets/bar_widgets.yuck and they are {bluetooth.icon}, {bluetooth.connected_devices[0].icon}, {battery.icon} and {notifications.icon}. Where their source is specifically defined?

in .config/eww/scripts/myshell/bluetooth.js

$assets: 'home/demeter/.config/eww/assets/';

Changed it to ./assets.

It is better to replace this broken link with the real wallpaper.png file.

That symlink is part of how I change wallpaper, instead of changing it I will just mention it in the readme.

Also .local/bin/hypr has a direct reference to /home/demeter. It could be useful for having all of them more generic for all users.

I forgot to remove that file, as I have moved it to home-manager.

fr13ndxd commented 1 year ago

@D3vil0p3r just a question, which polkit agent do you use? give me output of sudo pacman -Q | grep polkit

D3vil0p3r commented 1 year ago

@D3vil0p3r just a question, which polkit agent do you use? give me output of sudo pacman -Q | grep polkit

polkit 122-1
polkit-gnome 0.105-10
polkit-qt5 0.114.0-1

Why this question?

fr13ndxd commented 1 year ago

do you have the polkit running? as i think this may be the issue

fr13ndxd commented 1 year ago

systemctl status polkit-gnome

D3vil0p3r commented 1 year ago

Which issue in particular are you referring?

sudo systemctl status polkit.service

● polkit.service - Authorization Manager
     Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
     Active: active (running) since Sun 2023-06-11 17:47:01 CEST; 1h 0min ago
       Docs: man:polkit(8)
   Main PID: 800 (polkitd)
      Tasks: 4 (limit: 18908)
     Memory: 6.1M
        CPU: 282ms
     CGroup: /system.slice/polkit.service
             └─800 /usr/lib/polkit-1/polkitd --no-debug

Jun 11 17:47:00 penthost systemd[1]: Starting Authorization Manager...
Jun 11 17:47:01 penthost polkitd[800]: Started polkitd version 122
<SNIP>
fr13ndxd commented 1 year ago

i was thinking about it couldnt get the variables because of missing permisions, idk if you understand, try kill polkit-gnome and get polkit-kde-agent and run it

D3vil0p3r commented 1 year ago

i was thinking about it couldnt get the variables because of missing permisions, idk if you understand, try kill polkit-gnome and get polkit-kde-agent and run it

Do you mean the issue I have about that icons that sometimes become "null"?

fr13ndxd commented 1 year ago

yes

fr13ndxd commented 1 year ago

like when it fails to get the informations that it should put in there, so it puts null

fr13ndxd commented 1 year ago

because of permisions

fr13ndxd commented 1 year ago

also hyprland (http://wiki.hyprland.org/Useful-Utilities/Must-have/#authentication-agent) recommends polkit-kde-agent, im thinking that they refer to this issue you can try it atleast

D3vil0p3r commented 1 year ago

Y, I will try, even if I was thinking that the explanation of @Aylur is still valid.

fr13ndxd commented 1 year ago

tell me if it worked

fr13ndxd commented 1 year ago

@D3vil0p3r did it work?

D3vil0p3r commented 1 year ago

Gimme some min. I need to end an activity, it will take 30 min

fr13ndxd commented 1 year ago

alright