Commit Graph

362 Commits

Author SHA1 Message Date
Michael Carlberg
31608bb706 refactor(renderer): Cast signal data 2016-12-31 01:27:37 +01:00
Michael Carlberg
78bb3695e6 refactor(config): Deduce return type from default value 2016-12-30 23:32:05 +01:00
Michael Carlberg
a0f1d97c2b fix(controller): UB sanitizer patch 2016-12-30 23:28:58 +01:00
Michael Carlberg
e1c6a4e5a3 fix(command_line): End with empty line 2016-12-30 21:14:22 +01:00
Michael Carlberg
dffdc6a20b fix(builder): Sub-string check
Fixes #282
2016-12-30 20:34:23 +01:00
Michael Carlberg
18cf9df86c refactor: Cleanup 2016-12-27 04:58:41 +01:00
Michael Carlberg
f101a303bd fix(bar): Only initialize config values when using --print-wmname 2016-12-27 04:15:01 +01:00
Michael Carlberg
db7aa7c490 fix(format): Ignore empty contents 2016-12-27 04:03:46 +01:00
Michael Carlberg
7b780a3201 refactor(builder): Cleanup 2016-12-26 17:06:28 +01:00
Michael Carlberg
b9f9092bbe refactor: Cleanup 2016-12-26 10:37:14 +01:00
Michael Carlberg
baaba4adf9 refactor(ipc): Rename signals 2016-12-26 10:36:14 +01:00
Michael Carlberg
00ac4bea63 refactor(x11): Header cleanup 2016-12-26 10:27:30 +01:00
Michael Carlberg
11aabac227 refactor(connection: Use custom base 2016-12-26 09:46:48 +01:00
Michael Carlberg
789800a68f refactor(signals): Simple types 2016-12-23 22:19:42 +01:00
Michael Carlberg
b422d1d1a4 refactor(modules): Input handling 2016-12-23 20:43:52 +01:00
Michael Carlberg
92424f0d49 refactor(cmake): Install components 2016-12-23 18:10:19 +01:00
Michael Carlberg
9c14531542 fix(config): Require wrapping quotes to trim 2016-12-23 14:39:12 +01:00
Michael Carlberg
1cb8e455fb fix(controller): Invalid move constructions
Refs #268, #265
2016-12-23 13:03:05 +01:00
Michael Carlberg
e551dbfea9 fix(controller): Raise signal on quit from eventqueue 2016-12-23 05:51:33 +01:00
Michael Carlberg
debb3534c7 concurrency_ytil: Thread id 2016-12-23 05:18:58 +01:00
Michael Carlberg
8cc275ccd1 refactor(controller): Process eventqueue concurrently 2016-12-23 05:10:40 +01:00
Michael Carlberg
8cff01e3d8 refactor(event_handler): Abstract sink attaching 2016-12-23 05:08:19 +01:00
Michael Carlberg
d4e3891ab6 refactor(connection): Listen for property notify by default 2016-12-23 01:05:36 +01:00
Michael Carlberg
417d90f411 refactor(controller): Store module input handlers locally
Refs #265, #262
2016-12-23 00:54:14 +01:00
Michael Carlberg
e47e439954 refactor(modules): Replace callbacks with signals
Refs #265
2016-12-22 22:11:30 +01:00
Michael Carlberg
a914526949 fix(config): Use strtoul
Refs #267
2016-12-22 18:37:23 +01:00
Michael Carlberg
bc9b9f0d12 refactor: Cleanup 2016-12-21 23:22:02 +01:00
Michael Carlberg
185363056a refactor(x11): Cleanup 2016-12-21 15:04:16 +01:00
Michael Carlberg
7979f5b3d4 refactor(modules): Handle events using signal_receiver 2016-12-21 08:38:44 +01:00
Michael Carlberg
c01f111e34 refactor(modules): Move setup to constructor 2016-12-21 08:00:09 +01:00
Michael Carlberg
81e6fb062f wip: Window autohide 2016-12-21 04:50:43 +01:00
Michael Carlberg
3aa7c3b106 fix(taskqueue): Type error 2016-12-20 18:14:43 +01:00
Michael Carlberg
abd30860e0 fix(button_press): Use correct double click button 2016-12-20 15:51:45 +01:00
Michael Carlberg
c14c46b998 refactor: Font index cleanup 2016-12-20 15:09:11 +01:00
Michael Carlberg
8ef8900ca2 refactor: Defer buttonpress using taskqueue 2016-12-20 13:03:46 +01:00
Michael Carlberg
b8ff0da693 feat: Add taskqueue component 2016-12-20 12:54:17 +01:00
Michael Carlberg
3a01bcf308 fix: Apply x position once to action blocks 2016-12-20 08:00:08 +01:00
Michael Carlberg
1cccd100bb fix(bar): Remove double click 2016-12-20 07:46:30 +01:00
Michael Carlberg
cd31d92713 fix(controller): Check eventpipe reads/writes 2016-12-20 05:36:10 +01:00
Michael Carlberg
a89c4ef2dd refactor: Move all event handling to the controller 2016-12-20 05:16:04 +01:00
NBonaparte
e72f85079f feat(monitor): Add monitor-fallback option #243
Adds new parameter monitor-fallback, which allows the bar to revert to a
specified monitor. Polybar should now be compatible with dynamic
multi-monitor setups when using screenchange-reload = true (no need to
stop and restart the bar with a different environment variable).

Closes #243
2016-12-16 13:09:19 +01:00
Michael Carlberg
519172b6ec feat(xkeyboard): Switch layout group on click
When serveral layout groups are defined for the keyboard
they can be cycled when clicking on the module.

   For example:

   $ setxkbmap -layout us,sv,fr

Ref #84
2016-12-16 11:31:08 +01:00
Michael Carlberg
f50f43af02 refactor: Cleanup 2016-12-16 10:23:54 +01:00
Michael Carlberg
697638db2b fix(tray): Follow window fade 2016-12-16 07:10:45 +01:00
Michael Carlberg
a7005be82c feat: Fade if unfocused and handle double clicks 2016-12-16 06:44:55 +01:00
Michael Carlberg
b90856157b fix: Update font visual if depth changes 2016-12-15 18:22:34 +01:00
Michael Carlberg
b2e8428550 wip(refactor): Improve parsing and font glyph caching 2016-12-15 17:28:58 +01:00
Michael Carlberg
9f9f438fae refactor: Remove last usage of boost::optional
Since it's the only thing boost was used for at the moment
we drop it to be able to get rid of a dependency.
2016-12-15 17:13:16 +01:00
Michael Carlberg
a0d485f79d refactor: Initialize data 2016-12-15 09:30:31 +01:00
Michael Carlberg
f9062d031c refactor(clang-tidy): Apply fixes 2016-12-15 03:30:41 +01:00
Michael Carlberg
78b5f9651f fix(config): Remove tabs 2016-12-14 20:39:40 +01:00
Michael Carlberg
0fca9a0c6e git: Remove unused headers for boost::di 2016-12-14 20:18:55 +01:00
Michael Carlberg
4c36d65cbe fix(eventloop): Acquire lock guard 2016-12-14 19:04:33 +01:00
Michael Carlberg
e11798253a fix(controller): Module margin require surrounding text 2016-12-14 19:03:59 +01:00
Michael Carlberg
0b949ee3bb fix(config): Allow empty values 2016-12-14 15:10:19 +01:00
Michael Carlberg
b11a662d81 fix(tray): Re-activation 2016-12-14 11:34:09 +01:00
Michael Carlberg
8c3f40db5b refactor(eventloop): Use config wrapper 2016-12-14 11:01:44 +01:00
Michael Carlberg
5077325044 refactor(string_util): Use rvalue references for *trim() 2016-12-14 11:01:44 +01:00
Michael Carlberg
eca870774f fix: Handle single input events 2016-12-14 11:01:44 +01:00
Michael Carlberg
c2caf4d7a6 fix(parser): Apply clang-tidy fixes 2016-12-14 11:01:44 +01:00
Michael Carlberg
7d07812fa6 fix(font_manager): Memory leak 2016-12-14 11:01:44 +01:00
Michael Carlberg
80a00bd596 refactor(config): Cleanup and minor tweaks 2016-12-14 11:01:44 +01:00
Michael Carlberg
83f7d2ce91 refactor: Cleanup 2016-12-14 11:01:44 +01:00
Michael Carlberg
5d5542169b refactor(command_line): Cleanup 2016-12-14 11:01:44 +01:00
Michael Carlberg
683ce7acc6 refactor(logger): Cleanup 2016-12-14 11:01:44 +01:00
Michael Carlberg
540bcb9fd0 refactor(config): Load on instantiation 2016-12-14 11:01:44 +01:00
Michael Carlberg
4fca0c89b4 refactor: Object construction 2016-12-14 11:01:44 +01:00
Michael Carlberg
1a2a6e5fab refactor: Construction methods 2016-12-14 11:01:44 +01:00
Michael Carlberg
08be86fbe1 wip(refactor): Improve signal and event handling 2016-12-14 11:01:44 +01:00
Michael Carlberg
d45fd76dcd refactor(config): Drop boost::property_tree 2016-12-14 10:57:45 +01:00
Michael Carlberg
8da52af6a2 fix(tray): Attached offset relative to inner area 2016-12-14 10:55:40 +01:00
Michael Carlberg
24df9e30a3 fix(tray): Correct alignment coords 2016-12-14 10:55:40 +01:00
Michael Carlberg
4c2d710169 fix(tray): Adjust action coords
Ref #241
2016-12-14 10:55:36 +01:00
Michael Carlberg
cab2d49532 fix: Module margin
Only output module margin right when there are
preceeding modules.
2016-12-13 14:30:06 +01:00
Michael Carlberg
ec39859093 feat: Window click handlers
New parameters for defining fallback click handlers
that will be triggered for the whole window unless
a module action is matched.

Parameters added to all [bar/foo] sections:

- `click-left = ...`
- `click-middle= ...`
- `click-right= ...`
- `scroll-up= ...`
- `scroll-down= ...`

Ref #226
2016-12-05 13:17:15 +01:00
Michael Carlberg
3854515521 fix: Wrap format pre/suffix within cmd 2016-12-05 05:32:10 +01:00
Michael Carlberg
d561b9cb2d fix(builder): Remove surrounding quotes for raw strings
Ref #221
2016-12-05 04:15:21 +01:00
Michael Carlberg
7f5117b7cc fix(tray): Improve pseudo-transparency handling
- Make sure previously drawn content is cleared
- Redraw tray clients on XCB_EXPOSE
- Prevent void parts of the root pixmap being copied

Ref #187
2016-12-05 03:56:04 +01:00
Michael Carlberg
d93bd635b4 fix(label): Remove surrounding quotes
Fixes #221
2016-12-04 17:28:58 +01:00
Michael Carlberg
9eee27544d fix(renderer): Improve precision when shifting action blocks
Fixes #220
2016-12-04 13:50:30 +01:00
NBonaparte
d888f1b331 feat: Add left and right padding and margins (#219)
* feat: Add left and right padding and margins

* fix: use side_values and change precedence

* fix: cast to uint16_t
2016-12-04 11:57:33 +01:00
Michael Carlberg
c870a9efa7 fix(tray): Do not reserve space when detached
Ref #218
2016-12-04 05:53:45 +01:00
Michael Carlberg
44da14755d refactor(clang-tidy): Apply fixes 2016-12-04 04:11:47 +01:00
Michael Carlberg
fbca73a83b fix: Check ptr before accessing 2016-12-04 01:15:00 +01:00
Michael Carlberg
9f16e3fff7 refactor: Rename dock to override-redirect 2016-12-03 23:21:40 +01:00
Michael Carlberg
d6a0c84e0b refactor(tray): Update using eventloop 2016-12-03 23:01:21 +01:00
Michael Carlberg
df85a6492e refactor(eventloop): Typed events 2016-12-03 23:00:41 +01:00
Michael Carlberg
aca249727a fix(tray): Emit visibility state before activate 2016-12-03 21:19:39 +01:00
Michael Carlberg
bb0cfcf033 fix(tray): Visibility change 2016-12-03 20:26:29 +01:00
Michael Carlberg
a3f2e8aa51 fix: Reconfigure position after mapping
Ref #212
2016-12-03 18:38:35 +01:00
Michael Carlberg
6b51234f23 fix(screen): Only reload if changed 2016-12-03 16:44:37 +01:00
Michael Carlberg
ef9b37447b fix(xcb): Deallocate using deleter 2016-12-03 16:44:08 +01:00
Michael Carlberg
086e498388 fix: Replace process on reload 2016-12-03 15:46:48 +01:00
Michael Carlberg
158d4dd515 fix(controller): Handle connection error 2016-12-03 15:12:11 +01:00
Michael Carlberg
edbefbd8fa fix(controller): Check runstate when handling X event 2016-12-03 13:01:10 +01:00
Michael Carlberg
4776ec49df fix: Use defined event sink priority 2016-12-03 13:00:40 +01:00
Michael Carlberg
a1ad4de470 fix: Fill background for initial draw
Ref #179
2016-12-03 12:58:43 +01:00
Michael Carlberg
e9db3fab3a fix: Only escape delimiter within action blocks
Ref #197
2016-12-01 14:30:47 +01:00
Michael Carlberg
0ef2615af2 fix(config): Boost error
Ref #208
2016-12-01 13:00:38 +01:00
Michael Carlberg
c6540a8950 refactor: Signaling 2016-12-01 08:56:16 +01:00
Michael Carlberg
121d367205 fix(config): Use KEY_INHERIT 2016-12-01 08:30:48 +01:00
Michael Carlberg
0c6937edae feat(config): Inheritance
Add support for basic inheritance. The parser will
look for `inherit = base/section` and copy all undefined
values from the base section.

Ref #84
2016-12-01 07:57:30 +01:00
Michael Carlberg
d34263d850 fix(progressbar): Generate less data
Build the format sub-strings (%fill%, %indicator%, %empty%)
before adding it to the builder to avoid having it generate
alot of duplicate content (tags, etc)
2016-11-30 22:17:55 +01:00
Michael Carlberg
be8805be1e fix(renderer): Draw under-/overline after glyph 2016-11-30 22:15:01 +01:00
Michael Carlberg
f6ae5bd191 fix(build): Optional XKB 2016-11-30 14:26:11 +01:00
Michael Carlberg
608519363d feat(xkeyboard): New module
New module that uses the X keyboard extension
to show keyboard layout and indicators.

Ref #84, #200
2016-11-30 10:08:44 +01:00
Michael Carlberg
4852f2817c feat: Reload on XCB_RANDR_SCREEN_CHANGE_NOTIFY 2016-11-27 01:14:02 +01:00
Michael Carlberg
c4822b713f fix(renderer): Remove superflous clear 2016-11-26 17:26:35 +01:00
Michael Carlberg
b25fa46ac2 wip(xworkspaces): EWMH desktops
Ref #84
2016-11-26 06:30:33 +01:00
Michael Carlberg
9f4638f42c refactor: Cleanup 2016-11-26 06:13:20 +01:00
Michael Carlberg
c2acdff7d4 feat(eventloop): Delayed enqueue
A new worker that will block the queue channel
until the delayed event has been processed.

This is used to limit the amount of X button events
within defined time frame and we can't block
the main X thread.
2016-11-25 21:58:51 +01:00
Michael Carlberg
ff9be848c7 refactor(clang-tidy): Apply fixes 2016-11-25 21:58:49 +01:00
Michael Carlberg
6f2b437be3 fix(renderer): Destroy window on deconstruct 2016-11-25 14:17:56 +01:00
Michael Carlberg
4268817c51 fix(config): Trigger reload on correct event
Fixes #85
2016-11-25 14:17:56 +01:00
Michael Carlberg
8db3e79919 refactor(clang-format): Apply fixes 2016-11-25 14:17:41 +01:00
Michael Carlberg
9fdc22843b refactor: Cleanup rendering 2016-11-25 04:42:27 +01:00
Michael Carlberg
84d58e7619 refactor: Cleanup handling of syntax tags 2016-11-25 04:34:24 +01:00
Michael Carlberg
48c709eb58 fix(builder): Always close open tags on flush
Ref #186
2016-11-23 21:59:05 +01:00
Michael Carlberg
4794ef653c refactor(renderer): Separate methods 2016-11-22 23:18:47 +01:00
Michael Carlberg
c6e861083b fix: Avoid unnecessary color change
Ref #181
2016-11-22 22:45:12 +01:00
Michael Carlberg
cd005a9ce6 fix(renderer): Avoid false positives
Ref #181
2016-11-22 22:44:28 +01:00
Michael Carlberg
0983167510 fix(builder): Erase full tag
Ref #180
2016-11-22 21:33:27 +01:00
Michael Carlberg
6e35bcd183 fix(bar): Draw empty window at launch
Ref #179
2016-11-22 20:52:07 +01:00
Michael Carlberg
09e0ea1932 config: Print deprecation warnings 2016-11-22 03:01:50 +01:00
Michael Carlberg
733341d62b fix: Skip button events unless lock acquired 2016-11-22 02:06:25 +01:00
Michael Carlberg
0c64b64ff8 refactor: Cleanup 2016-11-22 01:22:47 +01:00
Michael Carlberg
ebf1bd1129 feat: Support different under-/overline
Make it possible to set different size
and color values for the two properties.

`overline-size = 2`
`overline-color = #f00`
`underline-size = 5`
`underline-size = #00f`
2016-11-21 16:16:06 +01:00
Michael Carlberg
25e33b6aab refactor: Separate render component 2016-11-21 16:16:02 +01:00
Michael Carlberg
d0915b82f4 fix: Only include optional module fallback if needed 2016-11-21 01:19:44 +01:00
Michael Carlberg
002eb08b20 fix(build): Explicit type for list initialization 2016-11-20 23:29:42 +01:00
Michael Carlberg
c6d85b2b92 refactor: Optimize build 2016-11-20 23:04:31 +01:00
Michael Carlberg
88c8bbd940 refactor: Fwd declare drawtypes
Ref #164
2016-11-19 15:49:06 +01:00
Michael Carlberg
bf23086687 fix(builder): Always close raw syntax tags
The lazy closing doesn't work well with raw
syntax tags so ignore it when closing tags.
2016-11-19 08:11:18 +01:00
Michael Carlberg
fd57ab0f3d fix: project rename 2016-11-19 06:26:07 +01:00
Michael Carlberg
51d8f289fa feat(xwindow): New module "xwindow"
Add module to display title of active window.
Requires WM with support for the _NET_ACTIVE_WINDOW hint.

Ref #84
2016-11-19 04:05:13 +01:00
Michael Carlberg
2fd88c4f60 feat(ipc): New message type "action:"
Adds a new message type, prefixed "action:"
that will perform the same task as mouse actions.

This could be used to control menu modules:

  echo action:menu-open-1 > /tmp/lemonbuddy_mqueue.<pid>
  echo action:menu-close > /tmp/lemonbuddy_mqueue.<pid>

Ref #84
2016-11-18 18:37:53 +01:00
Michael Carlberg
0a1e9c86c4 fix: Add monitor y to strut top value 2016-11-18 18:04:43 +01:00
Michael Carlberg
2140e11369 fix: Do not require custom font list 2016-11-18 18:04:43 +01:00
Michael Carlberg
70a5f1d41e fix: Bottom strut relative to screen 2016-11-15 02:28:42 +01:00
Michael Carlberg
ffe76b0556 fix(tray): Avoid tray redraw on bar update 2016-11-15 01:00:51 +01:00
Michael Carlberg
39b4f50c65 fix: Terminate on X connection error 2016-11-14 10:37:13 +01:00
Michael Carlberg
e3065d0e6c feat(ipc): New ipc module
Add a new module that allow users to configure hooks
on received ipc messages. The hook will execute the defined
shell script and the output of the script will be used
as the module content.

Ref #84
2016-11-14 09:26:40 +01:00
Michael Carlberg
4b0e648cb8 refactor: Cleanup 2016-11-14 00:46:50 +01:00
Michael Carlberg
489f3ce480 wip: Inter-process messaging 2016-11-13 19:05:30 +01:00
Michael Carlberg
c480f6fd1e refactor: Move strut handling to window class 2016-11-13 16:10:20 +01:00
Michael Carlberg
4224d838a8 refactor(bar): Strut values based on EMWH spec 2016-11-13 13:25:57 +01:00
Michael Carlberg
9a0df75a91 feat(fs): New filesystem module
Module that displays details about
mounted filesystems, #84

Closes #153
2016-11-13 06:14:34 +01:00
Michael Carlberg
4d7f6c14e6 fix(xrandr): Less strict monitor matching
Be less strict when matching randr outputs
against specified name. This is a workaround
to fix the output naming issue when switching
between graphic drivers.

On my system the output names include a dash
when using the nvidia drivers but the intel
driver does not.

   nvidia:
      HDMI-1
      eDP-1
   xf86-video-intel:
      HDMI1
      eDP1

When strict mode is disabled the matching
won't care about the connection state.

The user can re-enable exact matching and
connection state testing by setting the
config parameter `monitor-strict = true`
2016-11-12 20:42:56 +01:00
Michael Carlberg
171e69bd30 fix: tray-position should be optional 2016-11-12 13:14:08 +01:00
Michael Carlberg
23996fdcdc refactor: Tray transparency and code cleaning
- Make pseudo-transparency work as intended, fixes #158
- Fill tray pixmap in case a root pixmap is not found
- Split up bar bootstrap routine
- Formatting (clang-format)
2016-11-12 13:09:50 +01:00
Michael Carlberg
f2bbd301f2 feat(xbacklight): Change value on scroll
- Add action handlers for scroll up/down (conf: enable-sroll = true)
- Use xcb_timestamps instead of the throttle util
2016-11-12 13:07:05 +01:00
Michael Carlberg
d9707068f9 fix(tray): Disable tray if nodraw is set 2016-11-11 10:23:21 +01:00
NBonaparte
a06b38f534 feat(temperature): Added temp module and examples 2016-11-10 22:54:07 -08:00
Michael Carlberg
a1d30ddee3 feat: Configurable _NET_WM_STRUT_PARTIAL
Bspwm just released support for _NET_WM_STRUT_PARTIAL
which can be used to fix the workspace padding

New config section:

[global/wm]
margin-top = 5
margin-bottom = 5
margin-left = 5
margin-right = 5
2016-11-04 20:23:15 +01:00
Michael Carlberg
de2ee4db1b fix(tray): Default to bar background rgb 2016-11-04 19:33:38 +01:00
Michael Carlberg
0814ed381f refactor: Group consecutive ascii chars and render string 2016-11-04 19:22:00 +01:00
Michael Carlberg
869c5fe718 refactor: Code cleanup 2016-11-04 19:21:56 +01:00
Michael Carlberg
004d499ce3 fix: Make sure background colors are filled
Fixes a bug where alignment changes caused
the previous background to bleed over because
of the shift.

Fixes #141
2016-11-04 12:06:52 +01:00
Michael Carlberg
d74dd7f3ef fix(build): Remove disabled libs 2016-11-03 19:01:45 +01:00
Michael Carlberg
37ad86fa1c fix(build): GCC warnings 2016-11-03 18:19:47 +01:00
Michael Carlberg
b9e4ee9b92 fix: Disable modules with error 2016-11-03 14:10:48 +01:00
Michael Carlberg
e7cb345cec wip: Separate source from definitions 2016-11-03 12:54:32 +01:00