[BUG] Waybar is started twice at login (autostart.lua + ml4w-wallpaper reload)

未关闭 适合新手
#1,904 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
75/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
linux, lua
领域
desktop, devops

调研方向

阅读 dotfiles/.config/hypr/conf/autostart.lua,同时查看 ml4w-autostart 以及调用 run_matugen 和 reload_waybar 的 ml4w-wallpaper 代码。追踪两条启动路径,并检查现有日志或测试(如果有)。确保主题设置完成后 Waybar 只启动一次,然后确认默认的 Waybar 登录过程不再记录第二次重启,且状态栏不再闪烁。

由索引模型根据 Issue 内容生成。

描述

Describe the bug

On every login Waybar is started twice. The first instance shows up with the previous colors and some modules not ready yet. It is then killed and a second instance is started a moment later, so the bar visibly disappears and comes back.

There are two launches:

  1. dotfiles/.config/hypr/conf/autostart.lua starts Waybar directly:
    -- Start waybar
    hl.exec_cmd(HOME .. "/.config/waybar/launch.sh")
    
  2. A few seconds later ml4w-autostart runs ml4w-wallpaper "<cache>" --skip-wallpaper, which calls run_matugen and then reload_waybar. That function does killall waybar and runs launch.sh again.

Looking at the history, this looks like an overlap between two changes made two days apart:

  • c470e824 (Jun 23) added the Waybar launch to autostart.lua. At that point ml4w-wallpaper was skipped entirely when the awww cache existed, so the bar had to be started from somewhere else.
  • a4a1bebd (Jun 25) changed ml4w-autostart to always run ml4w-wallpaper ... --skip-wallpaper for theming. Since then Waybar is also (re)started by reload_waybar, so the launch in autostart.lua is redundant.
  • 0d676f10 (Jul 14) changed reload_waybar from pkill -SIGUSR2 waybar to killall waybar, which makes the restart visible as a flicker.

The issue is present from 2.14.0 up to 2.17.

Steps to reproduce
  1. Use Waybar as the status bar (~/.config/ml4w/settings/statusbar = waybar) with the default autostart.
  2. Make sure the awww cache exists (any normal login after the first one).
  3. Log in to Hyprland.
  4. Waybar appears, disappears for a moment and then appears again. The autostart log in ~/.local/state/ml4w-os-hyprland/ shows Waybar is currently running. followed by Waybar restarted.
Expected behavior

Waybar should start only once at login, already themed by matugen.

A possible fix is to drop the launch from autostart.lua and let ml4w-wallpaper start Waybar after matugen. Another option is to keep it there and have reload_waybar skip the kill and relaunch when it is called from ml4w-autostart.

Distribution

Arch Linux

Additional context

ML4W dotfiles 2.17 (stable), Hyprland with Lua config, wallpaper-app = quickshell. The installed files are identical to the ones in the repo (no local changes).

主要语言
QML
星标
5.1k
派生
386
平均合并
16 小时 45 分钟
30 天内合并 PR
14

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

mylinuxforwork/dotfiles 的其他 Issue

查看 mylinuxforwork/dotfiles 的全部 Issue

相似的 Issue

更多 Desktop Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。