nama / swayrst Goto Github PK
View Code? Open in Web Editor NEWRestore workspaces in sway to displays and move applications to saved workspaces
License: MIT License
Restore workspaces in sway to displays and move applications to saved workspaces
License: MIT License
Currently, the script doesn't know what to do when there are multiple windows of the same program that need to be arranged.
If this could be packaged into AUR (Arch user repository) git package, that would be really helpful for the arch users to install this directly
Hi, thanks for this script.
When I run it, I get this error:
Sway config not found! Make sure to use a default config path (man sway)
.
I've tracked it to 561eca1.
home_folder
and config_folder
don't have a trailing slash, so each path
in paths
looks like /home/user.sway/
or /home/user/.configsway
.
Adding a trailing slash worked for me. Here's the diff I used:
diff --git a/sway_workspaces/sway_workspaces.py b/sway_workspaces/sway_workspaces.py
index 9d81709..4a9ea22 100644
--- a/sway_workspaces/sway_workspaces.py
+++ b/sway_workspaces/sway_workspaces.py
@@ -23,9 +23,9 @@ else:
notifysend = None
PATH = None
-home_folder = os.path.expanduser('~')
+home_folder = os.path.expanduser('~') + '/'
try:
- config_folder = os.environ['XDG_CONFIG_HOME']
+ config_folder = os.environ['XDG_CONFIG_HOME'] + '/'
except KeyError:
config_folder = home_folder + '/.config/'
paths = [
I can open a PR if you want. Thanks!
I made a PR to fix this earlier, but it had it's own problems so I'm making an issue instead (as directed).
When I run pip install .
, I get this error:
Defaulting to user installation because normal site-packages is not writeable
Processing /home/jsimonrichard/sway-workspaces
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
running egg_info
creating /tmp/pip-pip-egg-info-gntbtofq/sway_workspaces.egg-info
writing /tmp/pip-pip-egg-info-gntbtofq/sway_workspaces.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-gntbtofq/sway_workspaces.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-pip-egg-info-gntbtofq/sway_workspaces.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-gntbtofq/sway_workspaces.egg-info/SOURCES.txt'
error: package directory 'sway_workspaces' does not exist
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I believe this is because, when the packages
option is used, pip expects a folder called sway_workspaces
with an __init__.py
folder, not a file called sway_workspaces.py
. Instead, and individual python module could be specified using the py_modules
option (https://docs.python.org/3/distutils/setupscript.html#listing-individual-modules).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.