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.
Event-Driven Polybar Tag Updates
Overview
Modified DWM and the polybar dwm-tags script to use event-driven updates instead of polling every second. This reduces CPU usage and provides instant visual feedback when switching tags.
How It Works
1. DWM Changes (
dwm.c)updatepolybar()function that sets an X propertyDWM_TAG_UPDATEon the root windowupdatepolybar()in key functions:view()- when switching to a different tagtag()- when moving a window to a tagtoggletag()- when toggling tag membershiptoggleview()- when toggling tag visibility2. Script Changes (
polybar/scripts/dwm-tags.sh)--tailmode that listens for X property changes usingxprop -spyupdate_tags()function--tail, the script:DWM_TAG_UPDATEproperty changes3. Polybar Config (
polybar/themes/minimal/modules/dwm-tags.ini)interval = 1totail = true--tailargument to the script executionBenefits
--tailargumentTo Apply Changes
sudo make clean installMod+Shift+Ror re-login)~/.local/share/dwm-titus/polybar/launch.shThe polybar module will now update instantly when you switch workspaces instead of polling every second.