AlexisBRENON / ewmh_m2m

EWMH-compliant move to monitor utility
https://pypi.org/project/ewmh-m2m/
MIT License
90 stars 5 forks source link

Change to any other screen #20

Closed juleswh closed 1 year ago

juleswh commented 1 year ago

Hey !

This PR comes with 2 simple changes :

  1. exit with status=1 if no sibling found this allows to chain, e.g.:
    move-to-window -d SOUTH || move-to-window -d EAST
  2. by default (without a --direction parameter), does the equivalent of:
    move-to-window -d EAST || move-to-window -d SOUTH

My use case is that I have 2 screens, sometimes left-right, sometimes up-down (depending on which desk I'm working on). So I needed a command to just switch between the 2 screens, whatever their arrangement. Each of these two changes allow doing that.

And thanks for this nice tool. Very helpful !

juleswh commented 1 year ago

Thanks for the feedback. I did as proposed, just leaving a neat try/except/finally in the move_to_screen function.

AlexisBRENON commented 1 year ago

Fixed by #22