polybar-dwm/include
Mihir Lad 866c88c1d3 dwm: Reorganize module
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.
2020-12-19 19:43:05 -05:00
..
adapters Merge branch 'hotfix/3.5.1' 2020-12-12 13:28:57 +01:00
cairo feat(conf) Properties for {bottom,top}-{left,right} radius 2020-12-13 17:02:23 +01:00
components New Tag Parser (#2303) 2020-12-17 20:37:28 +01:00
drawtypes feat: Warn state for cpu, memory, fs, battery modules (#2199) 2020-12-02 15:55:13 +01:00
events New Tag Parser (#2303) 2020-12-17 20:37:28 +01:00
modules dwm: Reorganize module 2020-12-19 19:43:05 -05:00
tags New Tag Parser (#2303) 2020-12-17 20:37:28 +01:00
utils New Tag Parser (#2303) 2020-12-17 20:37:28 +01:00
x11 feat(xkeyboard): Add variant support to layout label (#2163) 2020-12-19 18:22:27 +01:00
CMakeLists.txt build: remove xdamage extension 2019-06-03 00:46:12 +02:00
common.hpp refactor(build): Remove version number namespace 2019-05-17 16:49:47 +02:00
debug.hpp refactor: Cleanup 2017-01-11 03:07:28 +01:00
errors.hpp Add missing <stdexcept> header 2019-12-25 01:00:29 +01:00
settings.hpp.cmake Update cmake/config files to include dwmipcpp 2020-12-19 19:28:34 -05:00