On 30/11/06, Hannes Wyss <[EMAIL PROTECTED]> wrote: > Hello All Hello,
> the following is an alternative to Ludovic Rousseau's > keyboard_brigthness shell-script (1). > Advantages: > - slightly shorter name Not relevant if you use xbindkeys. My script is easy to rename :-). You can even rename it as "k" if you like short names. > - allows toggle Good idea. I just implemented it in my script. Now committed in SVN. > - can be set SUID and bound to keyboard shortcuts via xbindkeys Why do you need the SUID bit? On my machine the device is rw for everybody: $ ls -l /sys/class/leds/smc\:kbd_backlight/brightness -rw-rw-rw- 1 root root 4096 2006-11-30 13:04 /sys/class/leds/smc:kbd_backlight/brightness But since you use /var/lib/keylight to store the old value you _have_ to be root to write in /var/lib. My script uses /tmp/keyboard_brigthness_old_value so do not need to be root. > Let me know what you think! Thanks for the idea. My version is 42 lines of shell script. Your version is 113 lines of C (I used sloccount to just count the lines of code). -- Dr. Ludovic Rousseaummm ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mactel-linux-users mailing list Mactel-linux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mactel-linux-users