[GH-ISSUE #680] [feature-request] Treat multi monitor displays as logical screens. #538

Open
opened 2026-05-05 06:38:11 -06:00 by gitea-mirror · 15 comments
Owner

Originally created by @ghost on GitHub (May 21, 2020).
Original GitHub issue: https://github.com/debauchee/barrier/issues/680

Operating Systems

Server: Windows

Client: Windows

Barrier Version

2.3.2

Feature description

Current a multi-monitor setup is displayed as one logical screen. I would like Barrier to be able to treat each monitor as an independent "logical" screen when it comes to assigning clients.

Other info

image

Originally created by @ghost on GitHub (May 21, 2020). Original GitHub issue: https://github.com/debauchee/barrier/issues/680 ### Operating Systems ### Server: Windows Client: Windows ### Barrier Version ### 2.3.2 ### Feature description ### Current a multi-monitor setup is displayed as one logical screen. I would like Barrier to be able to treat each monitor as an independent "logical" screen when it comes to assigning clients. ### Other info ### ![image](https://user-images.githubusercontent.com/470233/82516790-407e6100-9b4e-11ea-968a-ae3a9b9b3b76.png)
Author
Owner

@mitchellnemitz commented on GitHub (May 21, 2020):

I don't believe this is possible or ever will be, see this response: https://github.com/debauchee/barrier/issues/550#issuecomment-593876581

Barrier does not see individual monitors - it only sees the whole displayable area as a single rectangle shape.

I would love to see this feature, but a quick poke around the code leads me to believe it would be anything but trivial to implement correctly.

<!-- gh-comment-id:632142482 --> @mitchellnemitz commented on GitHub (May 21, 2020): I don't believe this is possible or ever will be, see this response: https://github.com/debauchee/barrier/issues/550#issuecomment-593876581 > Barrier does not see individual monitors - it only sees the whole displayable area as a single rectangle shape. I would love to see this feature, but a quick poke around the code leads me to believe it would be anything but trivial to implement correctly.
Author
Owner

@nikatjef commented on GitHub (May 21, 2020):

Greetings,

It has been years since I looked, but @mitchellnemitz is correct. Synergy (and by extension Barrier) only knows where the mouse is in relation to the "desktop".

Having said that, you might be able to "synthesize" it a bit by abusing the configuration a bit. For example, on my desk at home, I have my main monitor on the right hand, a laptop in the middle and a third monitor on the left. In my configuration, I tell Synergy that if my mouse goes off the right side of my right monitor, to move to the left of my left monitor. Then if it goes off the right of my left monitor, it goes to the left side of the laptop, and if it goes off the right of the laptop, it goes to the left of the of the right monitor... Then I I define the inverse. This means that my mouse basically cat go to the right or left forever.

From there, keep in mind that you can also use partial transfer zones. For example, at my office I have a 34" ultrawide and below it, two 27" ultrawide. My configuration uses the same config as above going left and right, but I also say that if my mouse leaves the desktop in the right half of the top of my left screen, to go to the left half of the bottom of my top screen, etc.

EDIT: I have never used the configuration UI, so I am unsure if it is capable of the shitnanigans, but if not, use it to create your basic configuration, then manually edit the configuration file that it generates.

<!-- gh-comment-id:632280618 --> @nikatjef commented on GitHub (May 21, 2020): Greetings, It has been years since I looked, but @mitchellnemitz is correct. Synergy (and by extension Barrier) only knows where the mouse is in relation to the "desktop". Having said that, you might be able to "synthesize" it a bit by abusing the configuration a bit. For example, on my desk at home, I have my main monitor on the right hand, a laptop in the middle and a third monitor on the left. In my configuration, I tell Synergy that if my mouse goes off the right side of my right monitor, to move to the left of my left monitor. Then if it goes off the right of my left monitor, it goes to the left side of the laptop, and if it goes off the right of the laptop, it goes to the left of the of the right monitor... Then I I define the inverse. This means that my mouse basically cat go to the right or left forever. From there, keep in mind that you can also use partial transfer zones. For example, at my office I have a 34" ultrawide and below it, two 27" ultrawide. My configuration uses the same config as above going left and right, but I also say that if my mouse leaves the desktop in the right half of the top of my left screen, to go to the left half of the bottom of my top screen, etc. EDIT: I have never used the configuration UI, so I am unsure if it is capable of the shitnanigans, but if not, use it to create your basic configuration, then manually edit the configuration file that it generates.
Author
Owner

@amoshydra commented on GitHub (Jul 14, 2020):

Thank you @nikatjef! Didn't know this is possible.

This is how my monitors are positioned physically.

image

I am able to achieve the desired mapping like this:

section: links
 host1:
  down(24.41964285714286, 42.85714285714286) = client2(0, 83.69883040935673)
 client2:
  up(0, 83.69883040935673) = host1(24.41964285714286, 42.85714285714286)
end

Ref: https://github.com/debauchee/barrier/wiki/Command-Line#links

<!-- gh-comment-id:658203840 --> @amoshydra commented on GitHub (Jul 14, 2020): Thank you @nikatjef! Didn't know this is possible. This is how my monitors are positioned physically. ![image](https://user-images.githubusercontent.com/8733840/87349318-b15b5b80-c588-11ea-9161-0705772235ea.png) I am able to achieve the desired mapping like this: ```python section: links host1: down(24.41964285714286, 42.85714285714286) = client2(0, 83.69883040935673) client2: up(0, 83.69883040935673) = host1(24.41964285714286, 42.85714285714286) end ``` Ref: https://github.com/debauchee/barrier/wiki/Command-Line#links
Author
Owner

@github-actions[bot] commented on GitHub (Sep 22, 2020):

This issue has been automatically marked as stale due to inactivity. It will be closed if no further activity occurs. Thank you for your contributions.

<!-- gh-comment-id:696466422 --> @github-actions[bot] commented on GitHub (Sep 22, 2020): This issue has been automatically marked as stale due to inactivity. It will be closed if no further activity occurs. Thank you for your contributions.
Author
Owner

@p12tic commented on GitHub (Jan 10, 2021):

Let's not close valid feature requests.

@amoshydra Thanks a lot for providing a workaround.

<!-- gh-comment-id:757535337 --> @p12tic commented on GitHub (Jan 10, 2021): Let's not close valid feature requests. @amoshydra Thanks a lot for providing a workaround.
Author
Owner

@rf-bcit commented on GitHub (Apr 10, 2022):

Is it possible to "Stretch" the shape of the Rectangle mentioned above so they can line up?

<!-- gh-comment-id:1094157824 --> @rf-bcit commented on GitHub (Apr 10, 2022): Is it possible to "Stretch" the shape of the Rectangle mentioned above so they can line up?
Author
Owner

@markjorritsma commented on GitHub (Jan 5, 2024):

Thank you @nikatjef! Didn't know this is possible.

This is how my monitors are positioned physically.

image

I am able to achieve the desired mapping like this:

section: links
 host1:
  down(24.41964285714286, 42.85714285714286) = client2(0, 83.69883040935673)
 client2:
  up(0, 83.69883040935673) = host1(24.41964285714286, 42.85714285714286)
end

Ref: https://github.com/debauchee/barrier/wiki/Command-Line#links

I came here in search of a way to setup a host with two screens (left-right next to eachother) and two clients, one positioned above each host' screen. This reply was my solution.

In Barrier in Win10 I used the GUI to configure the screens/clients, where the host is shown as one screen.
I then saved the configuration through the program Menu -> Save Configuration.
I edited the configuration in the links section to split the up section in a 0,50 and 50,100, each pointing to a different client and vice-versa from the client's down linking to a 0,50 or 50,100 section of the host.
I saved the configuration and in Barrier selected the option to 'use exisiting configuration' instead of 'configure interactively'.
Reloaded barrier and it works :)

<!-- gh-comment-id:1878527022 --> @markjorritsma commented on GitHub (Jan 5, 2024): > Thank you @nikatjef! Didn't know this is possible. > > This is how my monitors are positioned physically. > > ![image](https://user-images.githubusercontent.com/8733840/87349318-b15b5b80-c588-11ea-9161-0705772235ea.png) > > I am able to achieve the desired mapping like this: > > ```python > section: links > host1: > down(24.41964285714286, 42.85714285714286) = client2(0, 83.69883040935673) > client2: > up(0, 83.69883040935673) = host1(24.41964285714286, 42.85714285714286) > end > ``` > > Ref: https://github.com/debauchee/barrier/wiki/Command-Line#links I came here in search of a way to setup a host with two screens (left-right next to eachother) and two clients, one positioned above each host' screen. This reply was my solution. In Barrier in Win10 I used the GUI to configure the screens/clients, where the host is shown as one screen. I then saved the configuration through the program Menu -> Save Configuration. I edited the configuration in the links section to split the up section in a 0,50 and 50,100, each pointing to a different client and vice-versa from the client's down linking to a 0,50 or 50,100 section of the host. I saved the configuration and in Barrier selected the option to 'use exisiting configuration' instead of 'configure interactively'. Reloaded barrier and it works :)
Author
Owner

@Zamfir-Tucudeanu commented on GitHub (Jan 31, 2025):

Hi,

I have the following sittuation as per attachment.
Would it be possible with your workaround of config to make it work and "natural" transition from one screen to another?

Image

thanks!

<!-- gh-comment-id:2626709505 --> @Zamfir-Tucudeanu commented on GitHub (Jan 31, 2025): Hi, I have the following sittuation as per attachment. Would it be possible with your workaround of config to make it work and "natural" transition from one screen to another? ![Image](https://github.com/user-attachments/assets/a4acfa91-4c95-45f3-bc98-5dffabd3c382) thanks!
Author
Owner

@markjorritsma commented on GitHub (Jan 31, 2025):

I think that could work, I don’t know about the transition to another
client on two sides of your Windows client. But give it a try!

Op vr 31 jan 2025 om 10:09 schreef TuX @.***>

Hi,

I have the following sittuation as per attachment.
Would it be possible with your workaround of config to make it work and
"natural" transition from one screen to another?

monitors-setup.png (view on web)
https://github.com/user-attachments/assets/a4acfa91-4c95-45f3-bc98-5dffabd3c382

thanks!


Reply to this email directly, view it on GitHub
https://github.com/debauchee/barrier/issues/680#issuecomment-2626709505,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ASSLGIKBAQPYD4BYQ575SHT2NM4U3AVCNFSM6AAAAABWHDVLOOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRWG4YDSNJQGU
.
You are receiving this because you commented.Message ID:
@.***>

<!-- gh-comment-id:2626774075 --> @markjorritsma commented on GitHub (Jan 31, 2025): I think that could work, I don’t know about the transition to another client on two sides of your Windows client. But give it a try! Op vr 31 jan 2025 om 10:09 schreef TuX ***@***.***> > Hi, > > I have the following sittuation as per attachment. > Would it be possible with your workaround of config to make it work and > "natural" transition from one screen to another? > > monitors-setup.png (view on web) > <https://github.com/user-attachments/assets/a4acfa91-4c95-45f3-bc98-5dffabd3c382> > > thanks! > > — > Reply to this email directly, view it on GitHub > <https://github.com/debauchee/barrier/issues/680#issuecomment-2626709505>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ASSLGIKBAQPYD4BYQ575SHT2NM4U3AVCNFSM6AAAAABWHDVLOOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRWG4YDSNJQGU> > . > You are receiving this because you commented.Message ID: > ***@***.***> >
Author
Owner

@Zamfir-Tucudeanu commented on GitHub (Jan 31, 2025):

Hi,

Thanks for quick reply.

Not sure I understand what you mean thou, nor what exactly what to put in config file with my given setup so that I can transition "naturally" across the displays. Would you be kind and able to help me on it?

thanks!

<!-- gh-comment-id:2626791709 --> @Zamfir-Tucudeanu commented on GitHub (Jan 31, 2025): Hi, Thanks for quick reply. Not sure I understand what you mean thou, nor what exactly what to put in config file with my given setup so that I can transition "naturally" across the displays. Would you be kind and able to help me on it? thanks!
Author
Owner

@markjorritsma commented on GitHub (Jan 31, 2025):

I don’t have access to my config file anymore, as I left that company., so I sort of have to wing it.

Are you able to create a configuration in the GUI with the host and the client?

Let’s assume Win=host1 and Linux=client1.
Set it up in the GUI as client1 to the left of host1.

Then edit the configuration file in a text editor and edit it.

host1:
left(0,100)=client1
right(0,100)client1

client1:
right(0,100)=host1
left(0,100)=host1

On the client side it will be tricky, because I don’t know where barrier will put the cursor when you exit the hosts’ screen on the right side. Either you will end up on the left side of the left monitor (likely) or if you are lucky on the left side of the right monitor of client1.

Give it a try and let us know.

<!-- gh-comment-id:2627846359 --> @markjorritsma commented on GitHub (Jan 31, 2025): I don’t have access to my config file anymore, as I left that company., so I sort of have to wing it. Are you able to create a configuration in the GUI with the host and the client? Let’s assume Win=host1 and Linux=client1. Set it up in the GUI as client1 to the left of host1. Then edit the configuration file in a text editor and edit it. host1: left(0,100)=client1 right(0,100)client1 client1: right(0,100)=host1 left(0,100)=host1 On the client side it will be tricky, because I don’t know where barrier will put the cursor when you exit the hosts’ screen on the right side. Either you will end up on the left side of the left monitor (likely) or if you are lucky on the left side of the right monitor of client1. Give it a try and let us know.
Author
Owner

@nikatjef commented on GitHub (Jan 31, 2025):

Doesn't quite work that way. To achieve what you are looking for you would need, at a minimum, 2 Linux and 1 Windows machines. The Windows machine can natively handle the two displays, so there is not an issue there, but because the two Linux displays are separated there is no way for Barrier to manage that.... If you have the 2 Linux and 1 Windows, you can do similar to what @markjorritsma lists above. Something like;

linux1:
left = linux2
right = windows1
windows1:
left = linux1
right = linux2
linux2:
left = windows1
right = linux1

If, instead you have 2 Linux and 2 Windows, you would use something like the following;
linux1:
left = linux2
right(0, 50) = windows1
right(50,100) = windows2
windows1:
left = linux1
right = linux2
down = windows2
up = windows2
windows1:
left = linux1
right = linux2
down = windows1
up = windows1
linux2:
left(0, 50) = windows1
left(50,100) = windows2
right = linux1

Of course, you can play around with transitional placement by using destination percentages as well. Something like;
foo:
up(50,100) = topright(0,50)
up(0,50) = topleft(50,100)

<!-- gh-comment-id:2628021075 --> @nikatjef commented on GitHub (Jan 31, 2025): Doesn't quite work that way. To achieve what you are looking for you would need, at a minimum, 2 Linux and 1 Windows machines. The Windows machine can natively handle the two displays, so there is not an issue there, but because the two Linux displays are separated there is no way for Barrier to manage that.... If you have the 2 Linux and 1 Windows, you can do similar to what @markjorritsma lists above. Something like; linux1: left = linux2 right = windows1 windows1: left = linux1 right = linux2 linux2: left = windows1 right = linux1 If, instead you have 2 Linux and 2 Windows, you would use something like the following; linux1: left = linux2 right(0, 50) = windows1 right(50,100) = windows2 windows1: left = linux1 right = linux2 down = windows2 up = windows2 windows1: left = linux1 right = linux2 down = windows1 up = windows1 linux2: left(0, 50) = windows1 left(50,100) = windows2 right = linux1 Of course, you can play around with transitional placement by using destination percentages as well. Something like; foo: up(50,100) = topright(0,50) up(0,50) = topleft(50,100)
Author
Owner

@nbolton commented on GitHub (Feb 3, 2025):

As Barrier is no longer in development, we'd like to implement this upstream in Deskflow.

<!-- gh-comment-id:2630543034 --> @nbolton commented on GitHub (Feb 3, 2025): As Barrier is no longer in development, we'd like to implement this upstream in [Deskflow](https://github.com/deskflow/deskflow).
Author
Owner

@Zamfir-Tucudeanu commented on GitHub (Feb 3, 2025):

I don’t have access to my config file anymore, as I left that company., so I sort of have to wing it.

Are you able to create a configuration in the GUI with the host and the client?

Let’s assume Win=host1 and Linux=client1. Set it up in the GUI as client1 to the left of host1.

Then edit the configuration file in a text editor and edit it.

host1: left(0,100)=client1 right(0,100)client1

client1: right(0,100)=host1 left(0,100)=host1

On the client side it will be tricky, because I don’t know where barrier will put the cursor when you exit the hosts’ screen on the right side. Either you will end up on the left side of the left monitor (likely) or if you are lucky on the left side of the right monitor of client1.

Give it a try and let us know.

didn’t work, but thanks!

<!-- gh-comment-id:2631679239 --> @Zamfir-Tucudeanu commented on GitHub (Feb 3, 2025): > I don’t have access to my config file anymore, as I left that company., so I sort of have to wing it. > > Are you able to create a configuration in the GUI with the host and the client? > > Let’s assume Win=host1 and Linux=client1. Set it up in the GUI as client1 to the left of host1. > > Then edit the configuration file in a text editor and edit it. > > host1: left(0,100)=client1 right(0,100)client1 > > client1: right(0,100)=host1 left(0,100)=host1 > > On the client side it will be tricky, because I don’t know where barrier will put the cursor when you exit the hosts’ screen on the right side. Either you will end up on the left side of the left monitor (likely) or if you are lucky on the left side of the right monitor of client1. > > Give it a try and let us know. didn’t work, but thanks!
Author
Owner

@nikatjef commented on GitHub (Feb 3, 2025):

You can define destinations positions just like you can for the source. See my example above where I use give the topright and topleft destinations. So if I move my mouse to roughly 50% on the left monitor and then move up, it will show up on the bottomleft of the monitor on top. If I move my mouse to the right on the left monitor and then move it, it will go to roughly the middle of the monitor on top.

<!-- gh-comment-id:2631890154 --> @nikatjef commented on GitHub (Feb 3, 2025): You can define destinations positions just like you can for the source. See my example above where I use give the topright and topleft destinations. So if I move my mouse to roughly 50% on the left monitor and then move up, it will show up on the bottomleft of the monitor on top. If I move my mouse to the right on the left monitor and then move it, it will go to roughly the middle of the monitor on top.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#538
No description provided.