prasanthrangan / hyprdots

// Aesthetic, dynamic and minimal dots for Arch hyprland
GNU General Public License v3.0
7.64k stars 894 forks source link

[performance] reload on exit #1988

Closed keth-real closed 1 week ago

keth-real commented 2 weeks ago

Pull Request

@kRHYME7

closes #2000

kRHYME7 commented 2 weeks ago

@rishav12s @rubiin @mahaveergurjar Can you guys test this. But maybe there's no effect for high end PC but this one fixes issues for me.

Some scripts is using hyprctl command and when the compositor lags due to too much R/W of the hyprland related files, hyprctl fails. This fixes that by reloading just once.

rishav12s commented 1 week ago

could you tell me more about this like does it fixes/optimizes the theme changing and wallpaper changing scripts so there is no lag ?

tried it and works fine no problems faced after reloading the config

kRHYME7 commented 1 week ago

The script populates the files, sometimes causing race conditions when it tries to touch Hyprland files. Reloading Hyprland once and after the files are set should be better for performance and predictability

So I noticed that we are calling parallel shells so using a trap cmd EXIT is useless here. Will try to see for a better approach

Edit: Wrong, all is well. There's just an old sed command in the theme switch that causes this