BunsenLabs / bunsen-utilities

https://pkg.bunsenlabs.org/debian/pool/main/b/bunsen-utilities/
GNU General Public License v3.0
31 stars 21 forks source link

Ignore empty line on loading tint2-sessionfile #74

Closed samwhelp closed 9 months ago

samwhelp commented 9 months ago

Ignore empty line on loading tint2-sessionfile

Description

See issue #75.

johnraff commented 9 months ago

@samwhelp thank you for your helpful contribution. I'm now wondering if we should also add a test for an empty sessionfile? Anyway I will merge this PR.

samwhelp commented 9 months ago

@johnraff

From my point of view, an empty sessionfile means not launching any tint2 panel.

So i think there is nothing to do whih this situation.

johnraff commented 9 months ago

@samwhelp you are correct that dealing with an empty sessionfile is a slightly different issue, but it in the code it is very close. I have commited a fix: 4031ae1 Just ignoring the empty line will allow existing tint2s to be killed. That's acceptable if other lines in the file do launch tint2s, but not if it's completely empty, so I added the file check before going through the lines.