JonnyHaystack / i3-resurrect

Simple solution to saving and restoring i3 workspaces
GNU General Public License v3.0
379 stars 19 forks source link

Only restore programs that are not running? #62

Closed JonnyHaystack closed 4 years ago

JonnyHaystack commented 4 years ago

Is your feature request related to a problem? Please describe. It can be a bit annoying that all programs are restored regardless of whether they are already open or not. It would be more convenient to have only missing programs restored.

Describe the solution you'd like

  1. Get list of programs to restore
  2. Get open windows
  3. Get commands for open windows
  4. Loop through open programs
    • Use list.remove() to delete matching programs from list of programs to restore

This would change existing behaviour though, so it might be best to add a flag to make it optional. I would appreciate feedback on this.

JonnyHaystack commented 4 years ago

64 makes it so only missing programs are restored, but I'll leave this issue here for a while in case anyone has any problems. Wouldn't want to break anyone's workflow :wink: