Hi,
I have a laptop connected to an external monitor via an HDMI port.
Everything works fine. However, I have a small issue.
The external monitor is set above the laptop. In the Settings, I configured the screens to be one on top of the other. Everything works.
But I don't always want to use the laptop screen. I discovered that you can easily switch between screens using the Super (Windows) + P shortcut.
Here's the problem: when I choose "Duplicate" to use the laptop screen, I have to move the mouse to the right, not down as I originally set it up.
Is there any way to change the default screen settings for the Super (Windows) + P shortcut?
I hope you understand what I mean
The Gnome desktop environment used by ZorinOS Core is not known for being highly configurable, so I don't think it's possible to change that default. For me, it also resets to whatever underlying default it's using.
But I don't always want to use the laptop screen. I discovered that you can easily switch between screens using the Super (Windows) + P shortcut.
Could you elaborate on what do you by "switching screens"? What are you trying to achieve exactly? Maybe there's some other solution to your problem. For example you can send the current active window to another screen using Super+Shift+↑/→/↓/←
Thank you for your response.
I usually only use the external screen - the one on the laptop is turned off (among other things, to save battery). However, sometimes I need the second screen, and then I just want to switch using the Super (Windows) + P shortcut and select the "Extend" display option across two screens. However, by default, this shortcut allows extending the image across two screens side by side, as shown in the screenshot below.
And my laptop is below the monitor, so to work on it, I have to move the mouse to the right.
If I manually arrange the screens in the Settings, everything is fine. However, if I switch screens using the Super (Windows) + P shortcut, they are arranged side by side again, as in the first screenshot. I want them to be one below the other by default after switching.
This is what I need:
As far as I can tell, what you are asking is currently not supported:
My only suggestion would be to use some other keyboard shortcut to navigate to a window that's located in your other monitor. Using this approach you can just as well navigate between your two monitors.
I have just played with this and tested it every which way on Zorin OS 16 Lite, and the display manager sets the mouse to move in whichever direction the monitor is set in.
In terminal, run:
xrandr | grep "connected"
Note your connected monitor I.D.'s.
If you are connecting one as HDMI and one is a built in notebook computer, your I.D's may look like HDMI-1 and eDP-1.
Test setting the following and see if the cursor tracks properly:
Thanks for your help. I'm using Zorin 16.3 Core.
I've checked these commands. With both screens on, the cursor moved correctly (up and down). However, when I switched screens using the Super+P shortcut to the external screen and then back to the combined screens using the same shortcut, the cursor didn't move down to the laptop screen. I had to move it to the right to get it onto the laptop screen. I also tried the command: xrandr | grep "Extend" and then xrandr --output HDMI-1 --above eDP-1. Just entering these commands fixed everything as it should. However, I would like to set this permanently rather than entering the command or changing settings each time Is it possible to create an executable file or shortcut from this command? Because the commands themselves work and "fix" the cursor movement when using two screens
Yes, you can save the commands as a #/bin/bash
script. Maybe name it xmon.sh or whatever else will be easily remembered. Save it in a safe location, like ~/Documents
Place your command on a line or if you need to use more than one, combine them with the && operator or set them both on separate lines if you prefer to not use the operator in case the first command fails but you still want the second to run.
Right click the saved file and set to run as executable.
In Settings > Keyboard > Shortcuts save the command to run as the path to that executable script file you just made.
Set a keyboard shortcut.
OR
Preempt the super+p shortcut command (which is cycle displays) by snagging the command from it in core, then putting it in your bash script followed with && xrandr --output HDMI-1 --above eDP-1 so that both commands are run when you use the shortcut.
This is genius, I really need to learn how to use this xrandr command.
It seems that on Gnome the Super+P shortcut is already taken as a system binding. To be able to assign this combination to something else like a shell script it has to be removed first, although ideally I would also want to react to the display switching event instead of overwriting it. Is this possible?
To remove the default keybiding:
gsettings set org.gnome.mutter.keybindings switch-monitor '[]'
Note that after this you'd be relying on shells scripts to switch back and forth between your monitor setups. It's definitely more granular control but needs to be setup accordingly.
Thank you, Aravisian! I can't write scripts, but I searched on Google for how to do it and wrote this script:
#!/bin/bash
xrandr --output HDMI-1 --above eDP-1
I then followed your steps, and it works! I've assigned this script to a shortcut, and it works as intended. I hope my script is correct? I only use it when switching to two screens. If there's anything in my script that needs modification, I'd appreciate your advice.
Thanks again!