866c88c1d3
Remove EVENT_SCROLL_{UP_DOWN} since it is not being used. Change EVENT_PREFIX to include dash and event names to be just the name without the prefix, for simplified parsing. Use check_send_cmd function to parse the cmd, using the event name as the IPC command name, and the section after the event name to be the argument. The format of a cmd would be "dwm-<event name>-<arg>", so the cmd can easily be translated into an IPC command. Call member functions for all dwmipc events for better organization and to avoid cluttering the constructor. The dwmipc event functions are now just assigned to a lambda that calls a member function. Add update_tag_labels function for updating the tag labels based on their state since this code is repetetive. Add update_title_labels function since that code is also somewhat repetetive. Move reconnect code to reconnect_dwm for better organization. Use pointers to m_monitors array elements instead of holding onto indices, since most of the time, a member of the Monitor element will need to be accessed. These variables should always hold a valid address starting in the constructor, so checks for nullptr should not be necessary. A monitor will always be active and the bar will always be mapped onto a monitor. Add some comments where needed. Reorganize the constructor into a more logical format Only subscribe to events if their labels are included in the default format. Follow clang-tidy warnings and use trailing return types. Move m_ipc->get_monitors to update_monitor_ref since in most cases where the monitor references would need to be updated using geometry, m_ipc->get_monitors would need to be called. |
||
---|---|---|
.. | ||
adapters | ||
cairo | ||
components | ||
drawtypes | ||
events | ||
modules | ||
tags | ||
utils | ||
x11 | ||
CMakeLists.txt | ||
common.hpp | ||
debug.hpp | ||
errors.hpp | ||
settings.hpp.cmake |