Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[feature request] Assign scratchpad to monitor #3162
Reposting from Airblader/i3#198 (comment)
I've been using i3(-gaps) for a little over 6 months now, and the one thing that's bugging me is that the scratchpad follows my cursor. I've put a terminal emulator on it, and I show & hide it with a hotkey. It doesn't follow the cursor immediately, but if the scratchpad is open on my primary monitor, and I move my mouse to the secondary and then try to hide it with the hotkey, it will instead pop to my secondary monitor.
That is the hotkey combination I'm using.
If my monitors were the same resolution, the scratchpad following wouldn't be an issue, but the terminal is unreadable on my laptop monitor when I'm using it on the primary monitor. I've tried searching the documentation but I haven't found anything on the subject.
Something like this is what I'd want to do. But pretty much anything that will achieve what I want will do.
Binary i3 version: 4.14.1 (2017-09-24) © 2009 Michael Stapelberg and contributors
The i3 binary you just called: /usr/bin/i3
Sorry, I should elaborate. I don't like the proposal here (and don't think it makes much sense*), so my suggestion is a different one. Would that work for you as well? From my understanding it should.
*) The scratchpad is a workspace which lives on no output. The behavior in question is caused by the logic of showing a scratchpad window. "Assigning the scratchpad to an output" thus seems weird and would logically involve other effects, I think, which may not be wanted.
referenced this issue
Apr 16, 2018
added a commit
Jul 6, 2018
I stumbled upon this a couple of days ago and as I tried to understand the issue, I noticed that perhaps the proposed solution doesn't solve OP's problem and does not add much functionality as well. It seems to me the original idea behind "assigning" the scratchpad to an output would be to have the scratchpad always be displayed on a given output: running
(* = more on that later)
The proposed behavior (and somewhat associated pull request) just add an option to prevent a scratchpad window on a workspace that's not the currently focused one from being moved to the current workspace when
I agree that it doesn't make much sense to assign the scratchpad (workspace) to an input, so I propose a variant of
This wouldn't still work 100% for OP, because having the scratchpad terminal window open on monitor A, then focusing B and running
I tried to implement (to the best of my ability, as this is my first attempt at contributing to the project) this feature, and it lives in PR #3320. There are still some problems with it, but I'd like to know what you think of the feature and in case you guys think it's valid, please check the code and tell me if there's anything I could improve on it (which I believe there'll be).