Then I learned vim and, when EDITOR is not set, I get dropped into nano and cannot exit.
Then I learned vim and, when EDITOR is not set, I get dropped into nano and cannot exit.
Instead I have the daemon call swayosd-client to make a pretty brightess level graphic on the monitor.
I like it... I may make that configurable.
Instead I have the daemon call swayosd-client to make a pretty brightess level graphic on the monitor.
I like it... I may make that configurable.
When it starts up it uses hyprctl to get the currently active monitor and assume this is the display whose brightness is to be adjusted.
I take the monitor value from there and directly feed it into the API.
When it starts up it uses hyprctl to get the currently active monitor and assume this is the display whose brightness is to be adjusted.
I take the monitor value from there and directly feed it into the API.
Requests come in and modify a desired state.
Single worker takes the desired state and makes it reality.
Requests come in and modify a desired state.
Single worker takes the desired state and makes it reality.
Writing, was trickier. I ended up doing some back and forth with codex and eventually *it* noticed the framing for the request was off and updated it and it all worked.
Wonderful!
Writing, was trickier. I ended up doing some back and forth with codex and eventually *it* noticed the framing for the request was off and updated it and it all worked.
Wonderful!
<display id> <op> [<value>]\n
It doesn't currently send a response back, b/c the script can't handle errors (nothing to do), and reacting to the new brightness level needs to happen in a synchronized, not parallelized like the script is expected to run as.
<display id> <op> [<value>]\n
It doesn't currently send a response back, b/c the script can't handle errors (nothing to do), and reacting to the new brightness level needs to happen in a synchronized, not parallelized like the script is expected to run as.
B/c of the 2 cable setup, I need to keep a mapping of devices that are the same display but different i2c buses.
I did this by reading the serial number of the edid and matching them up.
B/c of the 2 cable setup, I need to keep a mapping of devices that are the same display but different i2c buses.
I did this by reading the serial number of the edid and matching them up.
The API accepts 4 ops:
GET, SET, ADD, SUB (get/set for debug)
The API request updates the desired state based on the op.
And GET really becomes ADD(0).
Once accepted the writer is woken up to sync actual w/ desired state.
The API accepts 4 ops:
GET, SET, ADD, SUB (get/set for debug)
The API request updates the desired state based on the op.
And GET really becomes ADD(0).
Once accepted the writer is woken up to sync actual w/ desired state.
I considered setting up flock to deal with this, but the script was just so slow I went another route.
I considered setting up flock to deal with this, but the script was just so slow I went another route.
The detection is really slow, especially for something that's supposed to react to rapid key presses.
Static config would work, but is annoying (to me).
The detection is really slow, especially for something that's supposed to react to rapid key presses.
Static config would work, but is annoying (to me).
1. Determine the active display
2. Convert active display to the correct secondary HDMI connection
3. Read the current brightness value
4. Write the updated value back
Technically, ddcutil supports doing 3+4 in a single execution, but its still multiple DDC calls.
1. Determine the active display
2. Convert active display to the correct secondary HDMI connection
3. Read the current brightness value
4. Write the updated value back
Technically, ddcutil supports doing 3+4 in a single execution, but its still multiple DDC calls.
Especially slow in my script that reacts to the keyboard combo.
Especially slow in my script that reacts to the keyboard combo.
Right now I have 1 going DP -> HDMI and one going HDMI -> HDMI (both in addition to the DP->DP I already had).
I'll probably just get another DP->HDMI cable and just use 1 cable each.
For now I need to deal with 2.
Right now I have 1 going DP -> HDMI and one going HDMI -> HDMI (both in addition to the DP->DP I already had).
I'll probably just get another DP->HDMI cable and just use 1 cable each.
For now I need to deal with 2.
“Simple for whom” is the question
“Simple for whom” is the question