johannesjo / gnome-shell-extension-window-session-manager

An indicator that let's you save and restore your open apps and the window positions and arrangements over multiple real and virtual displays.
MIT License
91 stars 18 forks source link

Selectively save a single stack of windows #14

Closed ghost closed 5 years ago

ghost commented 5 years ago

I don't know if this is a functionality provided by some other tool (I have looked, if it is please do tell) but I just have a bunch of images/documents open with FEH and I want to be able to restore them with minimal effort after a reboot.

Is there a way to do this?

johannesjo commented 5 years ago

Hey there! Thanks for opening up this issue. Are the images you're opening always the same ones or are they different every time?

ghost commented 5 years ago

I gave up on a gnome solution and ended up with this working solution:

ps aux|grep -oP "[f]eh.*" >~/feh_restore_session
sed -i 's_/_"/_;s/$/" \&/;1i#!/bin/bash' ~/feh_restore_session

then just bash ~/feh_restore_session after reboot.

johannesjo commented 5 years ago

@MoorayJenkins thanks for sharing! Interesting solution. You probably can combine this with lwsm (the command line tool) to restore the window positions afterwards. Ordering might not be ideal though..