All Projects → johannesjo → Linux Window Session Manager

johannesjo / Linux Window Session Manager

Licence: mit
A tool to store and reload open windows and window positions for x11 desktops like unity and gnome.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Linux Window Session Manager

hammerspoon
Boosts productivity and adds useful features to OSX.
Stars: ✭ 18 (-92.59%)
Mutual labels:  productivity, window-manager
hyperkeys
Unleash you keyboard shorcuts
Stars: ✭ 35 (-85.6%)
Mutual labels:  productivity, window-manager
Command Center
A CLI-based launcher and general productivity tool.
Stars: ✭ 78 (-67.9%)
Mutual labels:  productivity, window-manager
Like On Github
Chrome extension - Link a repository with the extension and automatically save the links to content you like
Stars: ✭ 218 (-10.29%)
Mutual labels:  productivity
Imdone Atom
imdone-atom has been archived
Stars: ✭ 219 (-9.88%)
Mutual labels:  productivity
Ferdi
🧔🏽 Ferdi helps you organize how you use your favourite apps by combining them into one application
Stars: ✭ 4,089 (+1582.72%)
Mutual labels:  productivity
Hamster System
Ultra-simple framework to organize your life.
Stars: ✭ 237 (-2.47%)
Mutual labels:  productivity
Qtile
🍪 A full-featured, hackable tiling window manager written and configured in Python
Stars: ✭ 3,003 (+1135.8%)
Mutual labels:  window-manager
React Mosaic
A React tiling window manager
Stars: ✭ 2,804 (+1053.91%)
Mutual labels:  window-manager
Fvwm3
FVWM version 3 -- the successor to fvwm2
Stars: ✭ 226 (-7%)
Mutual labels:  window-manager
Urf.core
Unit of Work & Repositories Framework - .NET Core, NET Standard, Entity Framework Core. 100% extensible & lightweight. Live demo: https://goo.gl/QpJVgd
Stars: ✭ 226 (-7%)
Mutual labels:  productivity
Dev Tools
The most popular software developer tools in one app
Stars: ✭ 221 (-9.05%)
Mutual labels:  productivity
Dash
Analytical Web Apps for Python, R, Julia, and Jupyter. No JavaScript Required.
Stars: ✭ 15,592 (+6316.46%)
Mutual labels:  productivity
Small Workflows
Small Alfred workflows I use
Stars: ✭ 218 (-10.29%)
Mutual labels:  productivity
Devo
A Chrome and Firefox extension that displays GitHub Trending, Hacker News, Product Hunt and Designer News on every new tab.
Stars: ✭ 236 (-2.88%)
Mutual labels:  productivity
Synth Shell
Boost your terminal, script by script
Stars: ✭ 217 (-10.7%)
Mutual labels:  productivity
Mechvibes
Mechvibes
Stars: ✭ 226 (-7%)
Mutual labels:  productivity
Devutils App
Offline Toolbox for Developers
Stars: ✭ 2,735 (+1025.51%)
Mutual labels:  productivity
Dewm
A pure go autotiling window manager written with literate programming
Stars: ✭ 225 (-7.41%)
Mutual labels:  window-manager
Archivy
Archivy is a self-hosted knowledge repository that allows you to safely preserve useful content that contributes to your own personal, searchable and extendable wiki.
Stars: ✭ 2,746 (+1030.04%)
Mutual labels:  productivity

MIT license

This is a library / command line tool that let's you save and reload your opened programs and the positions of their windows. Supports Unity and Gnome Desktops and possibly all other compositing window managers using X (including XWayland).

There's also a companion tool in form of an indicator applet, a gnome-shell-extension and a Ulauncher extension if you like such things but this package can also be used standalone.

Installation

NodeJs needs to be installed properly before you can use lwsm. Have a look at google if you need help with that.

npm install -g linux-window-session-manager

For older distros, you also might need to install the locate command via sudo apt-get install mlocate.

Updating

npm uninstall -g linux-window-session-manager && npm i -g linux-window-session-manager
# (optional) delete config to update it to the newest version
rm ~/.config/lwsm/config.json

CMD Usage

Saving a session:

# save the current session to ~/.config/lwsm/sessionData/DEFAULT.json
lwsm save

# save the current session to ~/.config/lwsm/sessionData/my-session.json
lwsm save my-session   

Note that the session are stored for the specific display combination, you're currently running. If you want to store a different layout for when you have an external monitor plugged in this is possible. Just run the save command again for the same session.

Restoring a session:

# restore the session from ~/.config/lwsm/sessionData/DEFAULT.json
lwsm restore

# restore the session from ~/.config/lwsm/sessionData/my-session.json
lwsm restore my-session   

# gracefully close all running apps before starting the session
lwsm restore --closeAllOpenWindows

List saved sessions:

lwsm list

Rename a saved session:

lwsm rename oldName newName

Adjusting the configuration:

You can manually edit the config file present at ~/.config/lwsm/config.json and the session files in ~/.config/lwsm/sessionData/[sessionName].json.

Command-line completion:

# Automatically install command-line completion
lwsm --setupCompletion
# Generate command-line completion code for bash and zsh shells for manual installation
lwsm --completion
# Generate command-line completion code for fish shell for manual installation
lwsm --completion-fish

Command-line completion implemented by omelette, so you may refer it's README to check file where completion code will be added on automatic install. Restart your shell after automatic install to apply changes.

Known Quirks

In order to resize and move the windows the X window manager is used. Unfortunately it has some bugs:

  • Windows moved to the very left of the screen will always be off by some pixels in Unity
  • Sometimes a window can't be restored properly any more. In those cases it helps to close the window and restart the application.
  • When you're using Wayland as display manager all gnome applications won't be saved or restored. Only XWayland applications will work.

Troubleshooting & Issues

!!! please read this before opening up an issue !!!

If you're using Wayland, have a look at above at the known qurks section

Application are not started/lwsm doesn't work

Related error message: undefined findDesktopFile cant find file

lwsm needs to guess the right executable path for your applications. In some cases lwsm might be unable to do so. There are a couple of things, that you can do:

  1. You can locate the executable or desktop file manually for the application which isn't started (e.g. via the locate command), and add it to ~/.config/lwsm/{currentSessionName}.json (depending on the version used the file might be located here instead: ~/.config/lwsm/{currentSessionName}.json). If you want to persist that mapping you might also want to open ~/.config/lwsm/config.json (depending on the version used the file might be located here instead: ~/.config/lwsm/config.json) and edit the WM_CLASS_AND_EXECUTABLE_FILE_MAP property. You can find out which property name to use by executing xprop and clicking on an open window of the application. Look for WM_CLASS(STRING) (Or just execute xprop | grep "WM_CLASS(STRING)"). For finding the desktop file the locate command is usful (e.g.: locate google-chrome.desktop).
# example  entry in ~/.config/lwsm/config.json:
# WM_CLASS(STRING)             Desktop file name
"google-chrome.Google-chrome": "google-chrome.desktop",
  1. If the desktop files are consistently stored in a folder not mapped by lwsm you might want to add it's location to the DESKTOP_FILE_LOCATIONS property in ~/.config/lwsm/config.json(depending on the version used the file might be located here instead: ~/.config/lwsm/config.json) to make sure this folder is also searched the next lwsm tries to guess an desktop file path. If you think the path should be there per default please open up an issue.

You can also see this comment for more detailed instructions.

Ignoring applications

If you want lwsm to ignore the application, you can add it to the ignore list in ~/.config/lwsm/config.json (depending on the version used the file might be located here instead: ~/.config/lwsm/config.json) which is located under the WM_CLASS_EXCLUSIONS property.

If everything fails please open up an issue.

Gnome Terminal or other Gnome applications not restored

Chances are you're running Wayland as a display manager. I'd recommend switching back to Xorg.

❤ contribute ❤

I'm happy for any reported issue or feature request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].