Skip to content

Conversation

aidenlangley
Copy link

No description provided.

@aidenlangley
Copy link
Author

aidenlangley commented Jan 18, 2022

Could somebody translate this to sh/bash so I can include a not so fishy version? :)

set name (string split ':' $flag)[1]

Edit: actually, there are a few more places that need to be made ready for sh/bash, so will take a little time.

@x70b1
Copy link
Member

x70b1 commented Jan 18, 2022

Could somebody translate this to sh/bash so I can include a not so fishy version? :)

Are you looking for | cut -d ':' - f 1 ?

@aidenlangley
Copy link
Author

Could somebody translate this to sh/bash so I can include a not so fishy version? :)

Are you looking for | cut -d ':' - f 1 ?

Awesome, yes ty. I've been spoiled by fish, the traditional stuff is not so easy. I also have to translate the string match and the iterator that follows then this one will be ready.

@aidenlangley
Copy link
Author

So I rewrote it in python for wider shell compatibility since I'm sure python is a lot more common than fish. Much less painful to write than pure sh, so I'm afraid that's the best I can do!

@x70b1
Copy link
Member

x70b1 commented Jan 19, 2022

No pressure.

Is there a way to replace the bspwn-node-flags script also with python? Or even better, combine them into one?

@aidenlangley
Copy link
Author

No pressure.

Is there a way to replace the bspwn-node-flags script also with python? Or even better, combine them into one?

Way ahead of you. :D

I agree, python was a better choice here, have included a sh script which is intended to be tailed. Could have moved the if arg.event == 'node_focus' stuff to the sh script in hindsight for a slight enhancement but I'll leave it at that. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants