Giter Club home page Giter Club logo

swayrst's Introduction

swayrst

Called sway-workspaces before
Restore workspaces in sway to displays and move already open windows to their workspaces.

Setup

  1. Download
    • Either from AUR with yay -S swayrst-git
    • Or download from Actions or Releases
      • unzip and chmod +x the file
  2. Setup displays, e.g. with swaymsg output ... or a GUI tool
  3. Move the windows to your desired workspaces
  4. Run swayrst save <profilename>
  5. Repeat with another profilename for every display setup (desk, mobile, work)
  6. Run swayrst load <profilename> to restore
  7. Make kanshi or shikane run this command for more automation

Development

Used objects in tree

  • output in workspace is replaced with the display name
  • The nodes list is used. All workspaces are in outputs (displays)
    • Windows are in a list in workspaces
  • Windows can be nested indefinitely, so node_getter() is used
    • This can happen if the user changes the layout of single windows, hence creates a new container
  • Workspace to output mapping are saved separately from the sway tree json
  • We get the information about which window is in which workspace from the tree: i3.get_tree(), swaymsg -t get_tree
  • There is no known way (to me) to identify the exact same windows after a reboot (to move multiple windows of the same tool)
    • window is only set for Xwayland windows - and is reset after a reboot
    • node IDs reset after a reboot

swayrst's People

Contributors

nama avatar mnolan147 avatar pineman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.