mirror of
https://github.com/FelixKratz/SketchyBar
synced 2025-02-16 20:48:26 +00:00
reallow to hide current display bar only
This commit is contained in:
parent
932d483aeb
commit
2e583b7028
2 changed files with 25 additions and 27 deletions
36
README.md
36
README.md
|
@ -123,24 +123,24 @@ sketchybar --bar <setting>=<value> ... <setting>=<value>
|
|||
|
||||
where possible settings are:
|
||||
|
||||
| \<setting\> | \<value\> | default | description |
|
||||
| :-------: | :------: | :-------: | ----------- |
|
||||
| `color` | `<argb_hex>` | `0x44000000` | Color of the bar |
|
||||
| `border_color` | `<argb_hex>` | `0xffff0000` | Color of the bars border |
|
||||
| `position` | `top`, `bottom` | `top` | Position of the bar on the screen |
|
||||
| `height` | `<integer>` | `25` | Height of the bar |
|
||||
| `margin` | `<integer>` | `0` | Margin around the bar |
|
||||
| `y_offset` | `<integer>` | `0` | Vertical offset of the bar from its default position |
|
||||
| `corner_radius` | `<positive_integer>` | `0` | Corner radius of the bar |
|
||||
| `border_width` | `<positive_integer>` | `0` | Border width of the bars border |
|
||||
| `blur_radius` | `<positive_integer>` | `0` | Blur radius applied to the background of the bar |
|
||||
| `padding_left` | `<positive_integer>` | `0` | Padding between the left bar border and the leftmost item |
|
||||
| `padding_right` | `<positive_integer>` | `0` | Padding between the right bar border and the rightmost item |
|
||||
| `display` | `main`, `all` | `all` | Display to show the bar on |
|
||||
| `hidden` | `<boolean>` | `off` | If the bar is hidden |
|
||||
| `topmost` | `<boolean>` | `off` | If the bar should be drawn on top of `everything` |
|
||||
| `font_smoothing` | `<boolean>` | `off` | If fonts should be smoothened |
|
||||
| `shadow` | `<boolean>` | `off` | If the bar should draw a shadow |
|
||||
| \<setting\> | \<value\> | default | description |
|
||||
| :-------: | :------: | :-------: | ----------- |
|
||||
| `color` | `<argb_hex>` | `0x44000000` | Color of the bar |
|
||||
| `border_color` | `<argb_hex>` | `0xffff0000` | Color of the bars border |
|
||||
| `position` | `top`, `bottom` | `top` | Position of the bar on the screen |
|
||||
| `height` | `<integer>` | `25` | Height of the bar |
|
||||
| `margin` | `<integer>` | `0` | Margin around the bar |
|
||||
| `y_offset` | `<integer>` | `0` | Vertical offset of the bar from its default position |
|
||||
| `corner_radius` | `<positive_integer>` | `0` | Corner radius of the bar |
|
||||
| `border_width` | `<positive_integer>` | `0` | Border width of the bars border |
|
||||
| `blur_radius` | `<positive_integer>` | `0` | Blur radius applied to the background of the bar |
|
||||
| `padding_left` | `<positive_integer>` | `0` | Padding between the left bar border and the leftmost item |
|
||||
| `padding_right` | `<positive_integer>` | `0` | Padding between the right bar border and the rightmost item |
|
||||
| `display` | `main`, `all` | `all` | Display to show the bar on |
|
||||
| `hidden` | `<boolean>`, `current` | `off` | If all / the current bar is hidden |
|
||||
| `topmost` | `<boolean>` | `off` | If the bar should be drawn on top of `everything` |
|
||||
| `font_smoothing` | `<boolean>` | `off` | If fonts should be smoothened |
|
||||
| `shadow` | `<boolean>` | `off` | If the bar should draw a shadow |
|
||||
|
||||
## Items and their properties
|
||||
Items are the main building blocks of sketchybar and can be configured in a number of ways. Items have the following basic structure: <br>
|
||||
|
|
|
@ -360,27 +360,25 @@ static bool handle_domain_bar(FILE *rsp, struct token domain, char *message) {
|
|||
token_to_uint32t(token));
|
||||
} else if (token_equals(command, PROPERTY_HIDDEN)) {
|
||||
struct token state = get_token(&message);
|
||||
struct token select = get_token(&message);
|
||||
uint32_t adid = 0;
|
||||
if (!(select.length == 0)) {
|
||||
adid = token_equals(select, "current")
|
||||
? display_arrangement(display_active_display_id())
|
||||
: atoi(select.text);
|
||||
if (token_equals(state, "current")) {
|
||||
adid = display_arrangement(display_active_display_id());
|
||||
|
||||
if (adid > 0 && adid <= g_bar_manager.bar_count)
|
||||
needs_refresh = bar_manager_set_hidden(&g_bar_manager,
|
||||
adid,
|
||||
evaluate_boolean_state(state,
|
||||
g_bar_manager.bars[adid - 1]->hidden));
|
||||
!g_bar_manager.bars[adid - 1]->hidden);
|
||||
else
|
||||
printf("No bar on display %u \n", adid);
|
||||
} else needs_refresh = bar_manager_set_hidden(&g_bar_manager,
|
||||
adid,
|
||||
evaluate_boolean_state(state, g_bar_manager.any_bar_hidden));
|
||||
evaluate_boolean_state(state,
|
||||
g_bar_manager.any_bar_hidden));
|
||||
} else if (token_equals(command, PROPERTY_TOPMOST)) {
|
||||
struct token token = get_token(&message);
|
||||
needs_refresh = bar_manager_set_topmost(&g_bar_manager,
|
||||
evaluate_boolean_state(token, g_bar_manager.topmost));
|
||||
evaluate_boolean_state(token,
|
||||
g_bar_manager.topmost));
|
||||
} else if (token_equals(command, PROPERTY_DISPLAY)) {
|
||||
struct token position = get_token(&message);
|
||||
if (position.length > 0)
|
||||
|
|
Loading…
Add table
Reference in a new issue