polybar-scripts icon indicating copy to clipboard operation
polybar-scripts copied to clipboard

bspwm-node-flags: script, module & preview

Open aidenlangley opened this issue 4 years ago • 6 comments

aidenlangley avatar Jan 18 '22 04:01 aidenlangley

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.

aidenlangley avatar Jan 18 '22 17:01 aidenlangley

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

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

x70b1 avatar Jan 18 '22 20:01 x70b1

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 avatar Jan 19 '22 00:01 aidenlangley

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!

aidenlangley avatar Jan 19 '22 22:01 aidenlangley

No pressure.

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

x70b1 avatar Jan 19 '22 22:01 x70b1

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. :)

aidenlangley avatar Jan 19 '22 22:01 aidenlangley