Score:0

How to store a variable for the config file in i3wm?

jp flag

I'm trying out i3wm and I've got the hang of it so far. I like it but my main issue is xbrightness, which I can't seem to figure out. I've tried the configuration and never got it to work even though it has my display folder. :/

To set the brightness I use xrandr --output eDP --brightness x where x is a number between 0 and 1. I actually like this solution a lot and I set it up with my keybindings in i3wm. I can make it so when I press the Brightness +/- button it makes it a certain brightness, but I can't figure out how to store the current value.

AFAIK I can't do like +0.1 - it has to be a hard-coded value. If I could store a value somewhere of the current brightness and just add/subtract 0.1 each time that would be perfect, but I'm not sure how to do that since it's just a config file and not like a bash script that I'm using to run commands.

How can I accomplish this?

Currently my command is bindsym XF86MonBrightnessUp exec xrandr --output eDP --brightness 1

vanadium avatar
cn flag
How can you make it "a certain brightness" if the intent is to increase or decrease the brightness? I don't understand your issue well, I am afraid. Or do you just want to set a fixed brightness with this key? Be aware that you can always call a shell script instead, that can do more trickery if needed than in a single command of a keybinding.
Michal Przybylowicz avatar
eg flag
You can create a bash script and bind a key in i3 config file to run it. The bash script can use environment variable to store current brightness value.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.