Repository navigation
fix: resolve false setup notification on startup caused by FileView.loaded race condition - #5
Open
mehdichamani wants to merge 1 commit into
Conversation
…oaded race condition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every time the system reboots or the Omarchy shell starts up, users who have already configured their Hyprland keybindings in
~/.config/hypr/bindings.luareceive a falseomalt-tab: Setup Requireddesktop notification telling them to runmake prod.Root Cause
In
AltTabOverlay.qml, thehasBindingsHookproperty is declared as:When
Component.onCompletedfires on startup:FileViewhasblockLoading: true(which buffers the file content synchronously sotext()is already available), Quickshell does not emit/setloaded = trueuntil the next tick in the Qt/QML event loop.if (!hyprBindingsFile.loaded) return false;,hasBindingsHookevaluates tofalseduringComponent.onCompleted.setupNotifier.running = true.${XDG_RUNTIME_DIR}(atmpfsRAM disk), it is wiped on every reboot, causing the notification to trigger repeatedly after each system restart.Solution
Removed the early
if (!hyprBindingsFile.loaded) return false;guard fromhasBindingsHook.hyprBindingsFile.text()already holds the file's text synchronously; if the file does not exist or is empty,text()returns an empty string""which safely results inindexOf(...) === -1and correctly returnsfalse.Verification & Testing
make test&make validate(all 23 modular unit tests, manifest checks, bash syntax, and lua syntax passed).hasBindingsHookresolves totrueduringComponent.onCompletedwithout false notifications.