-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSI3 - Doesnt work if config has varbles #10
Comments
this may help to see how i did this kind of thing for dmenu, rofi, yad and fzf
|
Yeah, I should've taken note of it not reading the modifier key if it's set using a variable, but it wouldn't be too much to look for that assignment, then substitute that assigned key whenever it sees the variable which assigns it. Unfortunately, you can name a variable anything you like, so it's not really going to be a perfect system. :\ Thanks for reporting this and for showing your configuration. Unfortunately, from looking at your file more closely, it's pretty clear that it's not going to be practical to support it. You've gone above and beyond to make it considerably different to the standard approach, even splitting up the lines which set bindings. I could add a bunch of code to handle it, but it'd add unnecessary heft and complexity to CSi3. I also see a lack of |
Thanks to you making this issue, in the recent update for CSi3, I supported the use of I could handle the edge case of having |
i really like seeing these kind of scripts and watching them evolve over time :) keep up the grate work. also feel free to close this if you are done :) |
Actually, I've just noticed something else: modes aren't supported at all. I should probably try to support that, but I dunno how reliable that would be. I've been adding to the README.md for CSi3, for the Caveat(s) section. ...and thanks. :) Your issue reports are very welcome. |
I use DWM mostly but i did use i3 from 2009 until 2020 when i switched over to using dwm :) so i also checked out the dwm script and found issues/11 |
I've figured out a way I could begin to parse your configuration file. I'm pretty sure I'd have to pre-process it, unfortunately. The first time would be to determine the correct output based on the variables you've set, then the second time would be as normal. It still wouldn't read the modes properly. Catching the newlines in the middle of the commands might just be a case of detecting I wonder if i3 has a way to display all of the bindings, even in a raw format, which CSi3 could instead or alternatively parse. Like how you can output all of the workspaces, windows, and their information. |
i3 does have an api to it that can get the current used config but im not sure if you can get just the keybinds from that |
Are you thinking of There's an |
i know python and purl has i3ipc that can get info from i3 but im not 100% sure if it can break down the info to bindings only |
Just spent about an hour working on it. It wound up being so convoluted and complicated, that I've decided to never try that again, at least not in Shell. Lol It was worth a try. Here's what I came up with (ignore AE on the right): The new code is the top-most section and the new block in the main I could just preprocess with sed(1), but then it wouldn't be pure-BASH, and it would wind up really clunky. Honestly, I may just rewrite it in PERL anyway, at which point I might have more luck doing this stuff. At last |
welcome to my world :) bash can sure be a pain to deal with at times but when it all works out its sure fun in the end :) now others can have funny configs and not just stick with the defaults :) |
I just had a try of |
this code block below will get the list of commands but then they need converted back to being on 1 line again instead of 2 lines but it works to get them
also |
You've somehow got me thinking: AWK would probably do this quite well, because it can substitute in a sed(1)-like way with |
so this is an example what what i have come up with now its just to parse the list above :) instead of using all them sed commands |
This is really tempting me to move back to i3 from dwm as I don't use layouts in dwm anyways so who knows what I'll do when I get back home from work :) |
Going back to my good old i3 and get this working :) I miss my i3 and dwm really isn't kicking it for me after 8 months using it after 11 years using i3 :) |
@terminalforlife do you know if there is a way to chain keybinds in i3 without using modes |
Not quite sure what you mean, but on the off-chance you're referring to, for example, this, then yes:
|
Updated the 'README.md' and man page to reflect these changes. There's a new flag which disables this functionality, as explained in the man page and the comments in the new code included in this commit. Admittedly, I'm not _yet_ 100% sure this is stable, but I've no reason to expect it to fail, it's just that there are a lot of moving parts. Testing showed this works fine. I'm actually amazed not only how well it works, but how fast BASH can manage to do all of this.
I finally did it. :) |
when using a config like DotFiles/main/i3/.config/i3/config it does not seem to wanna work as displayed in the image below
only seems to work on 1 liners and without varbles when it should convert the varbles in my opnion
The text was updated successfully, but these errors were encountered: