jwm icon indicating copy to clipboard operation
jwm copied to clipboard

jwm -f FILENAME -restart

Open ghost opened this issue 7 years ago • 5 comments

I expect that running jwm -f "$FILENAME" -restart (with a valid file) should restart jwm using the file specified. This does not occur, is there a way to do this type of thing?

ghost avatar Jan 31 '18 22:01 ghost

The closest you could get to that right now is to exit JWM and restart (you could use the Exit tag in a menu to allow you to do this). Another option would be to just run JWM again, but then you'd have JWM running from a terminal or something. It shouldn't be too hard to have JWM pass arguments to the running process when invoked in this fashion, it's just not something that's come up.

joewing avatar Feb 06 '18 14:02 joewing

@joewing It just seemed like it could be an interesting way to make really interactive programs. It could be used as some sort of introductory screen where the user could make choices, and then jwm could load the default jwmrc file. It could even be used as some sort of OEM feature where the first user is allowed to add a new user, configure things, etc..

My main use was to provide a graphical menu screen to choose between options of things needed, with something like a tray in the middle of the screen and traybuttons that could choose what to start, or even if the user wanted to exit to the shell.

ghost avatar Feb 06 '18 15:02 ghost

Does -reload -restart work? ...posting from my phone.

I think this is probably the intended behavior, we just need to check if it is a different file or if the modified time has changed and if so, reload it. Need to either save the modified time or just reload it unconditionally if a file is specified during a restart. The existing behavior probably saves some noticeable delay for the common case though.

technosaurus avatar Feb 06 '18 21:02 technosaurus

@technosaurus No, those options did not work AFAIK this feature does not exist yet. It will only load a new file if you exit, and restart. I think this is a feature you could come up with some creative uses for 😄

ghost avatar Feb 07 '18 00:02 ghost

I already used the reload feature to have a drive menu and package manager, but dynamic menus made those obsolete. I don't think this will be hard to change... just allow reload and restart... Then we just need xdnd event support to allow dropping files to menu items

technosaurus avatar Feb 07 '18 01:02 technosaurus