Commit Graph

16 Commits

Author SHA1 Message Date
fbbb5922da doc: Reword -m and -M description 2020-04-21 23:59:01 +02:00
33b68ec7cb fix(randr): Undefined behavior when removing clones
Because of how monitors are removed inside the loop and depending on the
monitor order a cloned monitor may be assigned a width of 0 but is never
actually removed resulting in polybar saying the bar is out of bounds

Fixes #1794
2020-04-21 23:59:01 +02:00
cc36350849 xrandr: Allow not to purge cloned monitors 2020-04-21 23:59:01 +02:00
b5e7078d93 fix(monitor): Remove realloc from get_monitors
Premature optimization that tried to cache monitors but the cache did
not take into account the parameter values.

The call `get_monitors(..., ..., false, true);` would get all connected
and unconncected monitors a subsequent call
`get_monitors(..., ..., true, false);` would get back the same list of
monitors even though it requested only connected monitors.

Additionally `get_monitors` is never called periodically so the
optimization really didn't help much.
2020-04-21 23:59:01 +02:00
a7ad68da31 fix(randr): Check if there is a primary monitor (#1621)
* fix(randr): Check if there is a primary monitor

primary_info.name() throws an error if get_output_info is called with
XCB_NONE

Fixes #1620
2019-01-24 21:17:35 +01:00
1145681cf5 feat(monitor): use primary monitor as default (#1426)
If the monitor option isn't set, the primary monitor (if connected) is chosen as the default display.
2019-01-20 11:20:30 -08:00
e793082008 randr: Add separate key for exact monitor matching
This adds `monitor-exact = true` in the bar section

This also properly does best-match instead of first-match if multiple
matches exists. For example if there are two monitors HDMI2 and HDMI-2
and we try to match HDMI-2 with monitor-exact = false, until now HDMI2
would be matched. Now exact matches are always preferred.

Fixes #1532
2019-01-08 17:23:28 +01:00
43a17c3b36 refactor(cmake): Cleanup 2017-01-26 17:39:50 +01:00
a5d6670121 refactor(clang-tidy): Apply fixes 2017-01-24 08:01:04 +01:00
452afcdc68 refactor: Integral types 2017-01-24 07:11:14 +01:00
761b224f7c fix(xrandr): Merge outputs and 1-output monitors
Refs #280
2017-01-13 04:31:54 +01:00
506ac3e4ac fix(xrandr): Enable monitor support by default
Refs #280
2017-01-13 04:02:27 +01:00
385572ec64 feat(xrandr): Support for monitors
Refs #280
2017-01-13 03:52:57 +01:00
e441332f40 fix(xbacklight): Value type 2017-01-11 09:23:27 +01:00
5c9bfc147c fix(xbacklight): Lower inc/dec value to 5 and fix flooring 2017-01-11 04:40:10 +01:00
185363056a refactor(x11): Cleanup 2016-12-21 15:04:16 +01:00