diff --git a/README.md b/README.md index 8cfd97b..75733f0 100644 --- a/README.md +++ b/README.md @@ -226,36 +226,36 @@ A list of properties available to the *set* command is listed below (components * Background properties: -| \ | \ | default | description | -| :-------: | :------: | :-------: | ----------- | -| `drawing` | `` | `off` | If the `background` should be rendered | -| `color` | `` | `0x00000000` | Fill color of the `background` | -| `border_color` | `` | `0x00000000` | Color of the backgrounds border | -| `border_width` | `` | `0` | Width of the background border | -| `height` | `` | `0` | Overrides the `height` of the background | -| `corner_radius` | `` | `0` | Corner radius of the background | -| `padding_left` | `` | `0` | Padding to the left of the `background` | -| `padding_right` | `` | `0` | Padding to the right of the `background` | -| `y_offset` | `` | `0` | Vertical offset applied to the `background` | -| `shadow.` | | | Backgrounds support all `shadow` properties | -| `image.` | | | Backgrounds support all `image` properties | - -* Shadow properties: - -| \ | \ | default | description | -| :-------: | :------: | :-------: | ----------- | -| `shadow.drawing` | `` | `off` | If the shadow should be drawn | -| `shadow.color` | `` | 0xff000000 | Color of the shadow | -| `shadow.angle` | `` | 30 | Angle of the shadow | -| `shadow.distance` | `` | 5 | Distance of the shadow | +| \ | \ | default | description | +| :-------: | :------: | :-------: | ----------- | +| `drawing` | `` | `off` | If the `background` should be rendered | +| `color` | `` | `0x00000000` | Fill color of the `background` | +| `border_color` | `` | `0x00000000` | Color of the backgrounds border | +| `border_width` | `` | `0` | Width of the background border | +| `height` | `` | `0` | Overrides the `height` of the background | +| `corner_radius` | `` | `0` | Corner radius of the background | +| `padding_left` | `` | `0` | Padding to the left of the `background` | +| `padding_right` | `` | `0` | Padding to the right of the `background` | +| `y_offset` | `` | `0` | Vertical offset applied to the `background` | +| `image` | The path to a png or jpeg image file | `` | | +| `image.` | | | Backgrounds support all `image` properties | +| `shadow.` | | | Backgrounds support all `shadow` properties | * Image properties (Can be resource intensive if many large images are drawn): | \ | \ | default | description | | :-------: | :------: | :-------: | ----------- | -| `image` | The path to a png or jpeg image file | `` | | -| `image.drawing` | If the image should draw | `` | `off` | -| `image.scale` | The scale factor that should be applied to the image | `` | `0` | +| `drawing` | If the image should draw | `` | `off` | +| `scale` | The scale factor that should be applied to the image | `` | `0` | + +* Shadow properties: + +| \ | \ | default | description | +| :-------: | :------: | :-------: | ----------- | +| `drawing` | `` | `off` | If the shadow should be drawn | +| `color` | `` | `0xff000000` | Color of the shadow | +| `angle` | `` | `30` | Angle of the shadow | +| `distance` | `` | `5` | Distance of the shadow | ### Changing the default values for all further items It is possible to change the *defaults* at every point in the configuration. All item created *after* changing the defaults will @@ -266,11 +266,6 @@ sketchybar --default = ... = ``` this works for all item properties. -It is also possible to reset the defaults via the command -```bash -sketchybar --default reset -``` - ### Type nomenclature | `type` | `values` | @@ -279,6 +274,7 @@ sketchybar --default reset | `` | Color as an 8 digit hex with alpha, red, green and blue channels | | `` | An absolute file path | | `` | Any UTF-8 string or symbol | +| `` | A floating point number | | `` | An integer | | `` | A positive integer | | `` | A comma separated list of positive integers | @@ -301,6 +297,12 @@ Additional graph properties: * *graph.fill_color*: optional property to override the automatically calculated fill color of the graph * *graph.line_width*: sets the line width of the associated graph +| \ | \ | default | description | +| :-------: | :------: | :-------: | ----------- | +| `graph.color` | `` | `0xcccccc` | Color of the graph line | +| `graph.fill_color` | `` | `0xcccccc` | Fill color of the graph | +| `graph.line_width` | `` | `0.5` | Width of the line in points | + Push data points into the graph via: ```bash sketchybar --push @@ -389,14 +391,17 @@ sketchybar --set alias.color=
Popup menus are a powerful way to make further `items` accessible in a small popup window below any bar item. Every item has a popup available with the properties: -* *popup.background.\*: All background properties are available for the popup -* *popup.align*: Where to align the popup below the item (values: *left*, *right*, *center*, default: *left*) -* *popup.horizontal*: If the popup should draw horizontally, by default popups will draw vertically (values: *on*, *off*, *toggle*, default: *off*) -* *popup.drawing*: If the popup should draw (values: *on*, *off*, *toggle*, default: *off*) -* *popup.y_offset*: The vertical offset for the popup anchor (default: 0) -* *popup.height*: The vertical spacing between items in the vertical layout (default: bar height) (Only on HEAD) -Items can be added to a popup menu by setting the `position` of those items to `popup.` where is the name of the item containing the popup. +| \ | \ | default | description | +| :-------: | :------: | :-------: | ----------- | +| `popup.drawing` | `` | `off` | If the `popup` should be rendered | +| `popup.horizontal` | `` | `off` | If the `popup` should render horizontally | +| `popup.height` | `` | bar height | The vertical spacing between items in a popup (Only on HEAD) | +| `popup.y_offset` | `` | `0` | Vertical offset applied to the `popup` | +| `popup.align` | `left`, `right`, `center` | `left` | Alignment of the popup with its parent item in the bar | +| `popup.background.` | | | Popups have a background and support all properties | + +Items can be added to a popup menu by setting the `position` of those items to `popup.` where `` is the name of the item containing the popup. You can find a demo implementation of this [here](https://github.com/FelixKratz/SketchyBar/discussions/12?sort=new#discussioncomment-1843975). ## Batching of configuration commands @@ -427,14 +432,17 @@ This can be used to create more reactive and performant items which react to eve sketchybar --subscribe ... ``` where the events are: -* *front_app_switched*: when the frontmost application changes (not triggered if a different app of the same window is focused) -* *space_change*: when the space is changed -* *display_change*: when the display is changed -* *system_will_sleep*: when the system is preparing to sleep -* *system_woke*: when the system has awaken from sleep -* *mouse.entered*: when the mouse enters over an item -* *mouse.exited*: when the mouse leaves an item -* *mouse.clicked*: when an item is clicked + +| \ | description | +| :-------: | :------: | +| `front_app_switched` | When the front application changes (not triggered if a different window of the same app is focused) | +| `space_change` | When the active mission control space changes | +| `display_change` | When the active display is changed | +| `system_will_sleep` | When the system prepares to sleep | +| `system_woke` | When the system has awaken from sleep | +| `mouse.entered` | When the mouse enters over an item | +| `mouse.exited` | When the mouse leaves an item | +| `mouse.clicked` | When an item is clicked | When an item is subscribed to these events the *script* is run and it gets passed the `$SENDER` variable, which holds exactly the above names, to distinguish between the different events. It is thus possible to have a script that reacts to each event differently e.g. via a switch for the `$SENDER` variable in the *script*.