With the above my display will switches between three states: 100%, 50% & OFF.
How can I test the current state of backlightctl so that I can toggle between 100% and 50%?
Its much easier if you just think about what you want to happen step by step.
Your also using “relative brightness” which if you read the documentation dims a light by the % you set so, at 50% if you press it again it will keep going down by -50%.
How do you get from 50% to 100%? Not by setting relative brightness-50%.
Also, it looks like your setting this up wrong. Anytime you touch the screen then it will toggle tour brightness. That doesnt make a “touch” screen very useful if it bounces between 100% and 50% each time you use it.
Seeing as were in 2024, a lot has changed since April of 2021 and those old posts arent all that helpful for thing, especially simple things like changing brightness.