dux icon indicating copy to clipboard operation
dux copied to clipboard

Usage/configuration documentation?

Open pdf opened this issue 9 years ago • 9 comments

This definitely looks interesting, but I'm struggling to work out how to actually use it. Calling inc/dec/set works (after modifying the permissions on the brightness sysfs node), but changing modes, etc doesn't appear to do anything. There's mention of profiles, luminance settings, etc in the README, but it's not clear how to manage these.

pdf avatar Aug 20 '16 17:08 pdf

The usage section says you have to run dux adaptive in the background, either add it to your .xinitrc or run it from a shell with dux adaptive & and it will run in the background.

Then you control with the other command, and depending on the mode it will behave differently.

meh avatar Aug 20 '16 18:08 meh

That's what I was doing, but couldn't seem to get it to do anything useful :confused:

pdf avatar Aug 20 '16 23:08 pdf

I have the exactly same problem. I'm starting in adaptive, changing modes, but nothing seems to happen. Tried even a stack trace, but didn't found it very readable, except for writing an empty "default" section into a "cache.json" file (nb. a "verbose" mode would be nice).

EDIT: of course, if you need any logs/system infos then please ask away what you need.

DDzwiedziu avatar Aug 24 '16 18:08 DDzwiedziu

ok, I finally found out there's a subcommand help for adaptive:

% dux adaptive --help
OPTIONS:
    -c, --cache <cache>            The path to the cache file.
    -m, --mode <mode>              One of either `desktop`, `window`, `luminance`, `time` or `manual.
    -p, --profile <profile>        The profile name (default is `default`).
    -R, --refresh <refresh>        Distance in milliseconds within which damages are collapsed (default is 500).
    -s, --step <step>              Step to increase the brightness by (default is 1.0).
    -T, --threshold <threshold>    Minimum total number of pixels for damages to be collapsed (default is `160000` around `400x400`).
    -t, --time <time>              Time to sleep between each step (default is 5).

when started with -m luminance I get a change between my white webpages and my dark terminals. With -m desktop or -m window it did not budge (beyond changing the setting upon launch).

I tried playing around with very high and very low values of -T to see how it relates, but did not find any difference.

guyzmo avatar Jan 29 '17 00:01 guyzmo

desktop and window mode changes based on the current window or virtual desktop.

-T and -R are used to avoid computing huge areas of changes, for example a full screen browser scrolling.

You still have to change the backlight values through dux or it won't know it's happening, then it records your preferences for the current luminance and applies them back when it happens.

meh avatar Jan 29 '17 00:01 meh

oh, ok, so basically the process is:

  • launch dux adaptive
  • go to a globally dark desktop
  • dux inc to the desired value
  • dux save (?)
  • go to a globally light desktop
  • dux dec to the desired value
  • dux save (?)

and it should play ball?

guyzmo avatar Jan 29 '17 00:01 guyzmo

That's pretty much it, there's no save step, it's done internally by dux when changing the backlight from it.

You can have more than one setting for dark and one for bright too, it just takes the current luminance of the screen contents and saves the changed backlight value, and reinstates it when you get to the same luminance level.

I have it set up in my window manager to use dux instead of xbacklight to change the backlight value, and when I feel like the screen is too bright/dim for the content I change the luminance, then it just does its job after the initial setting.

meh avatar Jan 29 '17 01:01 meh

yay, it's working with luminance! ☺

guyzmo avatar Jan 29 '17 01:01 guyzmo

ok, I got it, it's way too automagical to be obvious ☺

I guess a note in the README or in the --help saying just that would be ♥

Thank you a lot for this code! If you come to the FOSDEM, I'll pay you a beer 🍻 for helping in my night coding sessions 😉

guyzmo avatar Jan 29 '17 01:01 guyzmo