Open corn-flake opened 1 week ago
Thanks for testing the project and taking the time to analyze and report this bug!
It seems like the format is invalid as you mentioned, I will work on fixing that, there are 2 formats for gaps in sway. guile-swayer
implements those as sway-gaps
and sway-default-gaps
sway-default-gaps
will change default gaps of new workspaces
sway-gaps
will change gaps on selected workspaces
It seems like only sway-gaps
needs fixing, I will push an update and let you know
Thanks for responding so quickly! I really appreciate that. Thanks for taking a look. I really love this project, great job!
I just pushed a commit c09e4b16d9fcfad79937bdccff4808ef039b451a, it should fix the sway-gaps
function now, a new parameter is introduced sway-gaps-type
. Happy hacking!
(sway-gaps SWAY-GAPS-OPTION-INNER SWAY-GAPS-WORKSPACE-ALL SWAY-GAPS-TYPE-SET 10)
Amazing! If It's necessary (idk if it is, I think guix's build farms automatically do this, or maybe it's written into the package itself that it pulls from github when updated) I'll contact the maintainer of the guix package about this commit so they can update the package if need be. Happy hacking to you too!
The definition in guix is pointing now at v0.3.0
You can see this here
(commit (string-append "v" version))))
If I am not mistaken, guix also accepts a commit, for example
(commit "c09e4b16d9fcfad79937bdccff4808ef039b451a")))
Note: the sha256 signature will also have to be updated.
In case needed, I can release v0.3.1
if the commit solved your problem
Hi, I think there is a bug in the sway-gaps function. I installed guile-swayer using the GNU Guix package, the package definition for which can be found here: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/guile-xyz.scm#n1032 I'm running version 0.3.0. I wrote this code to set the inner gaps of all workspaces to 10px, but it gives an error when run from the Guile REPL and does not set the gaps when placed in my guile swayer config file:
Here is the full output of the Guile REPL:
According to the docstring and declaration of the sway-gaps function, I called it correctly to do what I want it to do:
I called the function with the correct parameters, but it didn't do what I expected. Judging by the error message, it seems like this can be fixed by adding another parameter to the function that matches with the set | plus | minus | toggle option expected by sway. Then you could just add that parameter into the call to
format
. I haven't tested this idea yet but I will update when I do it and if it works.I don't think this is an issue with my setup, since all other code in my guile-swayer config works as expected.