aboutsummaryrefslogtreecommitdiff
path: root/i3bar
AgeCommit message (Collapse)Author
2024-05-20i3bar: Fix clicks with horizontal padding (#6064)Orestis Floros
Fixes #5476
2024-01-28Shrinking on a per-block basis (#5818)Alessandro Vinciguerra
Co-authored-by: Orestis Floros <orestisflo@gmail.com>
2024-01-27clang-format: enable InsertBraces (#5882)Orestis Floros
Enforces a rule that we have followed for years now. Yes, the diff is quite big but we get it over with once and we prevent having to nit-pick future PRs.
2023-04-02Update ubuntu & clang-format in builds (#5467)Orestis Floros
2023-01-22i3bar: Add protocol for workspace buttonsOrestis Floros
Closes #3818 (parent issue) Fixes #1808 Fixes #2333 Fixes #2617 Fixes #3548
2023-01-02fix -Wmaybe-unused and -Wstringop-truncation warningsMichael Stapelberg
2022-10-30implement bar { padding } config directiveMichael Stapelberg
related to https://github.com/i3/i3/issues/3724 related to https://github.com/i3/i3/pull/4288 fixes https://github.com/i3/i3/issues/3721
2022-10-30Merge support for the bar { height } option as-is from i3-gapsMichael Stapelberg
related to https://github.com/i3/i3/issues/3724 related to https://github.com/i3/i3/issues/3721 In a follow-up commit, we can evolve this into the padding directive as discussed on issue #3721.
2022-06-01Fix typos (#4989)George Rodrigues
2022-02-10Remove Xlib references (#4845)Ingo Bürk
* remove Xlib import from i3bar * remove unused Xlib declarations
2021-10-22check for both arguments NULL on strings_differrvalieris
2021-05-20Drop xcb_flush() before xcb_aux_sync() (#4378)Uli Schlachter
xcb_flush() flushes xcb's output buffer. Thus, after this call, all previous requests are surely written to the connection with the X11 server. xcb_aux_sync() synchronises with the X11 server. It makes sure all previous requests were sent to the X11 server and already processed. It does this via free(xcb_get_input_focus_reply(xcb_get_input_focus())): It sends a request and waits for its reply. It is guaranteed that the X11 server processes requests in-order. This means that the sequence xcb_flush(); xcb_aux_sync() first writes whatever is in the output buffer and then does another write for the four bytes of the GetInputFocus request from xcb_aux_sync(). Put differently: xcb_flush(); xcb_aux_sync() doesn't do anything more than just xcb_aux_sync(). In fact, it has slightly more overhead for the same result. Thus, this commit drops all calls to xcb_flush() immediately after xcb_aux_sync(). Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-01-15i3bar: Exit with 1 on wrong argumentOrestis Floros
2021-01-15i3bar: LOG version on startupOrestis Floros
2021-01-12i3bar: No reason to get_workspaces after output eventOrestis Floros
got_output_reply() requests this information anyway and if it is received before the output reply, the information will be erased by get_output_reply().
2021-01-12i3bar: properly restart status command after config changeOrestis Floros
2021-01-12i3bar: Properly close FDsOrestis Floros
2021-01-03i3bar: Add default bar_idOrestis Floros
Instead of erroring, request the list of bar configs from i3 and use the first one.
2021-01-03i3bar: Update manpage/help with optionsOrestis Floros
2020-10-24i3bar: add support for nonprimary outputMaxim Schuwalow
Added a new output option `nonprimary` that causes the bar to be displayed on all outputs except the primary one. Fixes #4083
2020-10-23Add coordinates relative to the current output in i3bar click eventsAndrey Burov
Currently i3bar click events provide x and y coordinates relative to all monitors. I've added coordinates relative to the current output. +-----------+-----------+ | | i3bar | | +-----------+ | HDMI-0 | DP-0 | | 1920x1080 | 2560x1080 | +-----------+-----------+ When you click in the top right corner of the DP-0, i3bar will provide something like this: { "x": 4480, "y": 10, "output_x": 2560, "output_y": 10, } This is useful for creating a rofi menu or something else. rofi -show run -location 1 -xoffset ${I3_OUTPUT_X} -yoffset ${I3_OUTPUT_Y}
2020-10-20clang-format: use TypenameMacrosAlbert Safin
This commit removes line breaks and extra empty lines introduced in commit fff3f79da9a87a1f790c6328f6615422f2b69b47.
2020-08-31i3bar: Remove duplicate call to kick_tray_clients (#4163)Orestis Floros
Fixes #4159 Fixes #4162
2020-07-26Merge branch 'stable' into nextMichael Stapelberg
2020-07-22Fix i3bar Xorg memory leak (#4140)Orestis Floros
The `*_free_*` calls in this branch: https://github.com/i3/i3/blob/51b0583578ecb8ccdb264dca9a0c7f64afca60be/i3bar/src/xcb.c#L1854 are never called when we remove the output from the tailq during a refresh. Fixes #4123
2020-06-30kick tray clients before destroying the barMark Guptill
2020-06-27Fix i3bar Xorg memory leak (#4140)Orestis Floros
The `*_free_*` calls in this branch: https://github.com/i3/i3/blob/51b0583578ecb8ccdb264dca9a0c7f64afca60be/i3bar/src/xcb.c#L1854 are never called when we remove the output from the tailq during a refresh. Fixes #4123
2020-04-22Call cont_child() more liberally (#3996)Orestis Floros
Following the reproduction instructions from https://github.com/i3/i3/issues/3242#issuecomment-436175346 For me, #3242 happened when the following sequence executed: 1. Fullscreening window correctly calls `stop_child()` in https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L685 2. Xrandr change, `reconfig_windows()` is called and `output->visible` is set to `true` in this line: https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L1791 3. When the window's fullscreen is disabled, `handle_visibility_notify()` returns in this line: https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L677 because previously `output->visible` was set to `true` To fix this, I call `cont_child()` more leniently since it is a no-op when the child is not stopped. Fixes #3242 Closes #3761
2020-04-22Fix SEGFAULT when i3bar receives invalid inputOrestis Floros
Fixes #3844
2020-04-20Remove unused headersOrestis Floros
With help from https://github.com/include-what-you-use/include-what-you-use/
2020-04-19Sort includes in *.c filesOrestis Floros
Not enabling in .clang-format because it breaks headers files. Used: IncludeCategories: - Regex: '^<config' Priority: 0 - Regex: '^".*"' Priority: 1 - Regex: '^<(xcb|xkb|yajl|X11)' Priority: 3 - Regex: '.*' Priority: 2
2020-04-14Sort dock clients by class and instanceOrestis Floros
This is similar to #3820 but does not use qsort but an insertion sort in con_attach. Since each bar block automatically gets its own incremental bar id, bards end up being sorted according to their definition order in the config file. For i3bar, the WM_CLASS is modified to include an instance name which depends on the bar_id. This could be useful for other reason, e.g. users targeting a specific bar instance. Fixes #3491
2020-04-14i3bar: Set WM_CLASS instance to bar_idOrestis Floros
2020-04-10Merge pull request #4004 from orestisfl/i3bar-segfaultIngo Bürk
Fix SEGFAULT when i3bar receives invalid input
2020-04-10Fix SEGFAULT when i3bar receives invalid inputOrestis Floros
Fixes #3844
2020-04-10i3bar: Add a macro to log child infoOrestis Floros
Mentioned in #3242
2020-04-09Call cont_child() more liberally (#3996)Orestis Floros
Following the reproduction instructions from https://github.com/i3/i3/issues/3242#issuecomment-436175346 For me, #3242 happened when the following sequence executed: 1. Fullscreening window correctly calls `stop_child()` in https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L685 2. Xrandr change, `reconfig_windows()` is called and `output->visible` is set to `true` in this line: https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L1791 3. When the window's fullscreen is disabled, `handle_visibility_notify()` returns in this line: https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L677 because previously `output->visible` was set to `true` To fix this, I call `cont_child()` more leniently since it is a no-op when the child is not stopped. Fixes #3242 Closes #3761
2020-03-01Remove comment referencing old source codeJason
Behaviour was changed in f691a55923850a4d315450925fc98733d07b69c9
2020-02-24Assume xcb_cursor_context_new never fails (#3955)xzfc
According to libxcb-cursor code, the only condition in which xcb_cursor_context_new() returns a non-zero result is a memory allocation failure[1]. Thus, it is safe to assume that xcursor_supported is always true, and remove dead code. [1]: https://gitlab.freedesktop.org/xorg/lib/libxcb-cursor/blob/0.1.3/cursor/cursor.c#L131-132
2020-02-21Limit workspace numbers within 0..INT32_MAXAlbert Safin
Before this commit, large workspace numbers treated oddly: $ i3-msg 'rename workspace to 1234567890' # displayed in i3bar as `0` $ i3-msg 'rename workspace to 4294967200' $ i3-msg -t get_workspaces | jq '.[]|select(.focused).num' -96 # int32_t overflow $ i3-msg 'rename workspace to 99999999999999999999' $ i3-msg -t get_workspaces | jq '.[]|select(.focused).num' -1 # treated as unnumbered This commit puts a consistent limit on workspace numbers. Now workspaces with numbers beyond INT32_MAX are treated as unnumbered.
2020-02-19clang-format: bring back ForeachMacros (#3948)xzfc
* clang-format: bring back ForeachMacros ForeachMacros was disabled in 4211274fcd028a8e33a084e5695290ae0e9f3020 due to the breakage of include/queue.h. The currently used version, clang-format-6.0 doesn't break it. * Add curly braces Co-authored-by: Orestis Floros <orestisflo@gmail.com>
2020-02-01i3bar: Make header declarations externOrestis Floros
See #3914
2020-01-08Added workspace ID in GET_WORKSPACES response.Iskustvo
2019-10-14Fix i3bar leak on handle_destroy_notifyOrestis Floros
2019-10-14Fix small leak in i3bar's mainOrestis Floros
If -s is used, the socket_path returned by getenv is never freed. Also some small rearrangements.
2019-10-11reorder_trayclients_cmp: Correct commentOrestis Floros
2019-10-11Make tray icon order deterministicOrestis Floros
Fixes #3573
2019-10-11Introduce trayclient_and_output_from_windowOrestis Floros
Saves some code repetition
2019-06-25Add setting for minimal width of workspace buttonsKonst Mayer
2019-06-22feat: added support for user-defined border widths in i3bar blocks (#3726)Ingo Bürk
This change introduces support for four new properties on the i3bar protocol, namely "border_top", "border_right", "border_bottom" and "border_left". If a block is drawn with a border, these values define the width of the corresponding edge in pixels. They all default to 1 if not specified to preserve compatibility. fixes #3722