I had a gander at johnywhy's 'Simple brightness slider' a couple of days ago. It's a neat idea, and it's something I was tinkering with the idea of 2-3 years ago, before I knew much at all of how Puppy works.
I haven't yet tried it on the old Dell lappie. But it doesn't work at all on the big old Compaq desktop.
Simple reason being, that the directory Johny's based this around, /sys/class/backlight, although it exists on a desktop install.....there's nothing in there. The cupboard is bare, boys & girls!
-------------------------------------
I still wanted to find summat that would work for me, so I started searching the 'net.
Tried 'xbacklight'. Nope. Didn't do anything.
Tried 'xgamma'. Weeell.....it kinda worked. Sort of. It's supposed to work very much the same way as RedShift's brightness slider does - by manipulating the gamma 'ramp'. Except where RedShift makes a half-way decent job of things, this just makes everything look very odd..!
Then I tried another one, which is (to the best of my knowledge) built-in to all Linux distros; 'xrandr'. Aha....
----------------------------------------
I got this from a thread on askubuntu.com, where I started poking around after one of Johny's links sent me there.
https://askubuntu.com/questions/149054/ ... via-script
We're looking at the second reply here. Essentially, you run this command:-
Code: Select all
xrandr -q | grep " connected"
Code: Select all
VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm
So; you take that first item. You insert it into the following command, like so (using my personal example):-
Code: Select all
xrandr --output VGA-0--brightness 0.5
To check whether this will work for you, we'll borrow a tip from johnywhy's thread. Open a terminal, enter:-
Code: Select all
yad --scale --print-partial
You should get a wee YAD box appear with a slider in it. Click on the slider and move it back & forth, and, as you do so, you should see a series of readouts in the terminal, showing rising & falling values as you move the slider up & down. If you do, YAD's behaving itself, and performing as we want it to.....this is the slider's 'output', printed to the terminal.
Fred's given invaluable help with this, and added some stuff to the script which runs the first command, extracts that first item and inserts it into the second command, running that at the appropriate time. Thus, no need to figure out what your monitor is designated as, since the script 'detects' it automatically.
------------------------------------------------
I've put together a slider and tray icon for this. No MenuEntry; at startup, the tray icon is placed in the notification area, and you simply click it to bring the control up, and click 'Done' when finished. I was going to use the '--close-on-unfocus' option with this, where you can click anywhere on your desktop and it'll close, but it seems the ROX 'pinboard' is not recognised as a viable 'window', the way most DEs are.....so, 'Done' it is.
The slider runs from the tray icon below; the black & yellow split circle:-
You won't need an up-to-date version of YAD for this; it works fine even with the elderly version included in most Pups by default. Bottom line; with YAD's backward compatibility, whatever version you have on your system, it'll run.
The Brightness Control .pet is attached below. If needed, you can find 'generic' versions of YAD 0.40.0 @ my G-Drive, as detailed below.
The .pet itself is architecture-independent.
---------------------------------------------------
Thanks to Johny for the inspiration, and to Fred for his usual patient & helpful assistance. Here's hoping some of you may find this useful; after all...
.....why should laptops have all the fun?
Enjoy.
Mike.
Attachments:-
'Generic' .pets of the current YAD (v0.40.0) available from my G-Drive.
32-bit & 64-bit.
All .pets from this thread attached below.....including a redshift 'backend' package (supplied by Fred) for those older Pups where you just cannot obtain it through the Package Manager. Modern 32- and 64-bit Pups won't have this problem.