External screen overlap

> Published on Fri, 15 Dec 2023, 16:05> Updated on Fri, 15 Dec 2023, 16:06

Introduction

Many users have encountered an overlapping issue when using an external screen with the simple-bar. This tutorial aims to guide you through the steps to resolve this issue by modifying the .yabairc configuration file.

Step-by-Step Guide

  1. Open the .yabairc Configuration File

    Navigate to your .yabairc file, which is usually located in your home directory.

  2. Add the Configuration Line

    Add the following line to your .yabairc file to create a void space at the top of all spaces, which can accommodate a bar (or other elements, but in this case, it's for the bar):

shell
yabai -m config external_bar all:28:0

Note: The value 28 in 28:0 represents the number of pixels dedicated to the space. You can modify this value according to your preference.

  1. Save Your File

After adding the line, save your .yabairc file to apply the changes.

  1. Restart the Configuration

Restart the configuration to apply the new settings and check if the issue has been resolved. You can do this by using the following command in your terminal:

shell
yabai --restart-service

Yabai documentation excerpt

Here is an excerpt from the yabai documentation that further explains the external_bar configuration:

shell
external_bar [<main|all|off>:<top_padding>:<bottom_padding>]

Specify top and bottom padding for a potential custom bar that you may be running.
- main: Apply the given padding only to spaces located on the main display.
- all: Apply the given padding to all spaces regardless of their display.
- off: Do not apply any special padding.

Guide created by emilehiot originaly in simple-bar's repository issue section

Something is wrong in this documentation? Please open an issue on GitHub in simple-bar repo.