Sublime Forum

Sublime instances forgot workspace after changing monitor

#1

On Linux (Ubunut), typically sublime windows will remember the workspace. So after one restarts the computer, the windows are just laid back the same way. This is pretty convenient for people working with workspace like me. But it is not the case when you plug in an additional monitor. When the computer turned off and monitor unplugged, all windows will pop at workspace 1 after turning back on. I wonder if there is a workaround for this problem.

0 Likes

#2

To clarify: Are the windows getting moved when you plug in the monitor, or is it only when you plug in the monitor and afterwards start ST that the windows aren’t getting restored to the right workspace?

0 Likes

#3

When you plugin the monitor, it will not affect the workspace the windows are in. They may change to other monitor randomly. The situation occurs when you plug out the monitor. After restarting, all windows will be moved to workspace 1.

0 Likes

#4

Sublime Text simply stores the _NET_WM_DESKTOP from X11 and restores it on restart; do your workspaces change when you have a monitor plugged in?

0 Likes

#5

Obviously not. The reason can be that the Windows manager on Ubuntu resets _NET_WM_DESKTOP at the restart if it sees a new monitor.

I print the _NET_WM_DESKTOP for each window

Window: /mnt/ARBEIT/kratos_bundle/kratos_bcn2/applications/plate_and_shell_application/custom_elements/reissner_mindlin_elastic_plate_element.cpp (plate_and_shell_application) - Sublime Text | Desktop: 4
Window: /mnt/ARBEIT/baci_bundle/baci_shell/CMakeLists.txt - Sublime Text | Desktop: 0
Window: ~/baci_bundle/baci_small_MR/cmake/templates/4CConfig.cmake.in (baci_small_MR) - Sublime Text | Desktop: 1
Window: ~/baci_bundle/baci_poro_scatra_contact/src/poroelast_scatra/4C_poroelast_scatra_part.cpp - Sublime Text | Desktop: 0
Window: /mnt/ARBEIT/baci_bundle/baci_contact/src/contact/4C_contact_monocoupled_lagrange_strategy.cpp - Sublime Text | Desktop: 0
Window: ~/kratos_bundle/Benchmark_kratos/python2/isogeometric_plate_and_shell_application/test_reissner_mindlin_elastic_linear_shell_dfad_dfad/cylindrical_shell/case_2_inner/simulation_include.py - Sublime Text | Desktop: 4
Window: ~/kratos_bundle/Benchmark_run/study_paper_bim_building/new_york/lower_manhattan_ny_300x400_assembly/lower_manhattan_ny_300x400_assembly.py - Sublime Text | Desktop: 3
Window: ~/.bashrc - Sublime Text | Desktop: 3
Window: ~/Dropbox/research/research.log (subrectangular_lining) - Sublime Text | Desktop: 2
Window: ~/kratos_bundle/kratos_bcn2/applications/isogeometric_lining_application/python_scripts/sub_rectangular_iga_lining_generator.py (isogeometric_tunnel_application) - Sublime Text | Desktop: 2
Window: ~/workspace/docker/docker-cutiga-dev/README_Windows_Update.txt - Sublime Text | Desktop: 2

Turning off the computer, plug in new monitor, turn it on again. The new desktop values:

Window: /mnt/ARBEIT/kratos_bundle/kratos_bcn2/applications/plate_and_shell_application/custom_elements/reissner_mindlin_elastic_plate_element.cpp (plate_and_shell_application) - Sublime Text | Desktop: 0
Window: /mnt/ARBEIT/baci_bundle/baci_shell/CMakeLists.txt - Sublime Text | Desktop: 0
Window: ~/baci_bundle/baci_small_MR/cmake/templates/4CConfig.cmake.in (baci_small_MR) - Sublime Text | Desktop: 0
Window: ~/baci_bundle/baci_poro_scatra_contact/src/poroelast_scatra/4C_poroelast_scatra_part.cpp - Sublime Text | Desktop: 0
Window: /mnt/ARBEIT/baci_bundle/baci_contact/src/contact/4C_contact_monocoupled_lagrange_strategy.cpp - Sublime Text | Desktop: 0
Window: ~/kratos_bundle/Benchmark_kratos/python2/isogeometric_plate_and_shell_application/test_reissner_mindlin_elastic_linear_shell_dfad_dfad/cylindrical_shell/case_2_inner/simulation_include.py - Sublime Text | Desktop: 0
Window: ~/kratos_bundle/Benchmark_run/study_paper_bim_building/new_york/lower_manhattan_ny_300x400_assembly/lower_manhattan_ny_300x400_assembly.py - Sublime Text | Desktop: 0
Window: ~/.bashrc - Sublime Text | Desktop: 0
Window: ~/Dropbox/research/research.log (subrectangular_lining) - Sublime Text | Desktop: 0
Window: ~/kratos_bundle/kratos_bcn2/applications/isogeometric_lining_application/python_scripts/sub_rectangular_iga_lining_generator.py (isogeometric_tunnel_application) - Sublime Text | Desktop: 0
Window: ~/workspace/docker/docker-cutiga-dev/README_Windows_Update.txt - Sublime Text | Desktop: 0

All desktop values (_NET_WM_DESKTOP) are now 0. This proves my observation above.

0 Likes