Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 07 Feb 2016, 22:26
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Change Luminosity, simple and effective
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
fabrice_035

Joined: 28 Apr 2014
Posts: 285

PostPosted: Tue 01 Dec 2015, 16:40    Post subject:  Change Luminosity, simple and effective  

Hello,

Cool

Code:

#!/bin/sh

# mini tool ! Easy change luminosity (mouse wheel)
# Fabrice (fxc) 1/12/15

b=`cat /sys/class/backlight/intel_backlight/brightness`
pth="/sys/class/backlight/intel_backlight/brightness"


lumi () {
if [ "$hs" -lt "50" ] ; then
hs="50"
echo $(( $b + $hs )) > /sys/class/backlight/intel_backlight/brightness
exit 0
fi

echo $(( $b + $hs )) > /sys/class/backlight/intel_backlight/brightness

}
export -f lumi


GTKDIALOG=gtkdialog



MAIN_DIALOG='
<window title="Lum" decorated="false"  skip_taskbar_hint="true"  window_position="2">
   
<vbox border-width="1" spacing="1">
   <hbox homogeneous="true">
<button use-stock="true" >  <input file stock="gtk-quit"></input> </button>

   
            <hscale space-expand="true" space-fill="true" range-min="10"  range-max="2000" range-value="'$b'"  range-step="10" tooltip-text="change luminosity">
               <variable>hs</variable>
            <action>lumi</action>
            </hscale>
         </hbox>
         </vbox>

   <variable>MAIN_DIALOG</variable>

</window>
'
export MAIN_DIALOG

case $1 in
   -d | --dump) echo "$MAIN_DIALOG" ;;
   *) $GTKDIALOG  --program=MAIN_DIALOG ;;
esac

Shocked

Bye..
lum.png_2015-12-01_214247.png
 Description   
 Filesize   3.76 KB
 Viewed   152 Time(s)

lum.png_2015-12-01_214247.png

Back to top
View user's profile Send private message 
uio

Joined: 31 Aug 2015
Posts: 58

PostPosted: Tue 01 Dec 2015, 23:25    Post subject:  

I like the idea !
But I just tried it, and it didn't work...
would this be the same thing as brightness ??
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 7115
Location: Charleston S.C. USA

PostPosted: Tue 01 Dec 2015, 23:31    Post subject:  

Specifically what device are you doing this on?

Code:
b=`cat /sys/class/backlight/intel_backlight/brightness`
pth="/sys/class/backlight/intel_backlight/brightness"


This indicates to me, it is for a specific device, that uses intel drivers.

_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
fabrice_035

Joined: 28 Apr 2014
Posts: 285

PostPosted: Wed 02 Dec 2015, 02:40    Post subject:  

Hi,
My laptop is a Dell E6420.

Search with Google (or other Rolling Eyes ) with "/sys/class/backlight/intel_backlight/brightness" , found solutions i think.

A+
Back to top
View user's profile Send private message 
phat7

Joined: 05 Jun 2015
Posts: 31

PostPosted: Wed 02 Dec 2015, 09:23    Post subject:  

Simple and not effective Shocked
Bye..
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0337s ][ Queries: 12 (0.0040s) ][ GZIP on ]