Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open new window to left of focused window #526

Closed
joeyh opened this issue May 18, 2023 · 8 comments · Fixed by #679
Closed

open new window to left of focused window #526

joeyh opened this issue May 18, 2023 · 8 comments · Fixed by #679
Assignees
Labels
enhancement Adds a new feature or extends scope PR READY Pull Request is ready

Comments

@joeyh
Copy link

joeyh commented May 18, 2023

I find that often I want to open a new window to the left of the focused window. Since text goes left to right, the left side of a window like a browser or a terminal often has more useful information in it than the right side does. When the two windows can't fit on the screen together, opening a new window to the right will prevent referring back to the original window as effectively as if the new window were on the left.

Currently I have to open the window and then move it to the left. That sounds easy, but it's kinda not. Really the process is: Press key that will open the new window. Wait some amount of time for it to appear. Screen shifts right. Multifinger keypress to move it to the left. Screen shifts left. The variable delay and screen movement make this significantly more taxing than if the window could be opened to the left. It's a small papercut, but one that happens repeatedly thruought my day.

Describe the solution you'd like

I'd be ok with an option that changes all windows to default to open to the left rather than the right.

Since super-I also pulls from the right, any change would also need to affect it presumably.

@joeyh joeyh added the enhancement Adds a new feature or extends scope label May 18, 2023
@jtaala
Copy link
Collaborator

jtaala commented May 24, 2023

I can see the utility in this request. Technically, it's fairly straightforward to implement. If we're going to make it a user settable option, we could provide a few options, e.g.:

  • open new windows to the right (current behaviour);
  • open new windows to the left;
  • open new windows at start of windows (position 0);
  • open new windows at end of windows (position n);

I played around with the last two and feel some people might like those behaviours (they're at least very consistent?)... actually, think this would be a pain with lots of windows, although we do have keybinds to go to start/end of windows.

Although, I can see some times where I'd like one behaviour over another... it's feasible we could add modes (like window focus modes) - with a similar icon, although I'm weary of crowding the topbar with icons.

The latter is more complexity, so maybe just a setting to set the behaviour for all windows is preferable?

Thoughts?

@jtaala jtaala added the seeking-feedback Seeking feedback from other PaperWM users label May 24, 2023
@jtaala jtaala self-assigned this May 24, 2023
@jtaala
Copy link
Collaborator

jtaala commented May 24, 2023

P.S. if you wanted to try out always opening windows to the left, just comment out (or delete) this line:

PaperWM/tiling.js

Line 2919 in 0592c92

index++;

and then logout/login.

@Lythenas
Copy link
Collaborator

I think a setting would probably be fine. You can always emulate a "mode" by creating a keybinding with the correct dconf write command (although you would not get any indicator in the top bar).

If we add any more indicators I think we should make them as compact as possible. Although at least on my monitor resolution I'm not running out of space any time soon :D

@joeyh
Copy link
Author

joeyh commented Aug 15, 2023

A setting would be fine with me.

I'm using the index++ removal hack and happy with how it behaves with that change.

@madx
Copy link
Contributor

madx commented Nov 10, 2023

This would be super cool too, I'd definitely be interested in opening at the end of windows too. A setting is fine and keeps the things simple imo

@jtaala
Copy link
Collaborator

jtaala commented Nov 10, 2023

Hey all,

I've now implemented this - could I have others test this please?

Check out the branch for the shell you're on:

Gnome 45

git clone https://github.com/paperwm/PaperWM.git
cd PaperWM
git checkout feature-526-open-new-window-position-gnome45
./install.sh

then logout/login and open preferences and choose your preferred option.

Gnome 44 (or 43, 42)

git clone https://github.com/paperwm/PaperWM.git
cd PaperWM
git checkout feature-526-open-new-window-position
./install.sh

then logout/login and open preferences and choose your preferred option.

@jtaala
Copy link
Collaborator

jtaala commented Nov 10, 2023

image

@jtaala jtaala added PR READY Pull Request is ready and removed seeking-feedback Seeking feedback from other PaperWM users labels Nov 11, 2023
jtaala added a commit that referenced this issue Nov 11, 2023
Completes #526 by adding options to set where to insert new windows
(e.g. to the `left` / `right` of windows, or at `start` / `end` of
tiling):


![image](https://github.com/paperwm/PaperWM/assets/30424662/2e6ac703-f5e1-426e-9b58-76ff59be1d16)
@jtaala
Copy link
Collaborator

jtaala commented Nov 11, 2023

Merged into release and gnome-44 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adds a new feature or extends scope PR READY Pull Request is ready
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants