Open andrewcincotta opened 4 months ago
`// set screenWidth and screenHeight to display with cursor's dimensions
const screenWidth = 2560; const screenHeight = 1440;
Right now the above code will toggle showing/hiding the CopyQ window with the proper dimensions/position on my external display.
Now, I just need help with the comment starting the code. That is, I need to set the constants screenWidth and screenHeight to the dimensions of the display that the mouse cursor is on.
Running the latest version of CopyQ on the latest version of macOS.
Sometimes when switching between displays CopyQ will shrink the size of the main window. How can I get CopyQ to remember the size and position of the window when triggered through the global shortcut? I am using the default "Show/Hide Main Window" global shortcut in preferences.
As a temporary workaround, I've created a custom global shortcut that sizes my window properly on my main display:
copyq: showAt(285, 285, 575, 300, '&Mac')
If someone can help me revise the above command to run a different showAt() depending on the display the cursor is on at the time of executing the command, that would be helpful. Additionally, this shortcut does not toggle the copyQ window, but instead only displays it. Is there a way I can also run hide() if copyQ is already focused?