You are not logged in.

#26 2012-10-23 08:18:02

angelfalls
Member
Registered: 2012-03-26
Posts: 139

Re: LightScript - Lightweight script to easily change screen brightness.

Very nice, it's work perfect with my mac air mid2012 - i work almost with console so xbacklight, xcalib doesn't help.

Offline

#27 2012-10-23 17:20:19

Haikarainen
Member
Registered: 2012-09-04
Posts: 93

Re: LightScript - Lightweight script to easily change screen brightness.

https://aur.archlinux.org/packages.php?ID=63879

It is now packaged! Get it while its hot!

Also it will replace lightscript

Offline

#28 2012-10-24 14:41:51

illusionist
Member
From: localhost
Registered: 2012-04-03
Posts: 498

Re: LightScript - Lightweight script to easily change screen brightness.

Hello Haikarainen,
  Nice work there, but I am having some issues
1. The script needs root privileges now . ( is that what you intended ? if so i am ok with it )
2. When decreasing brightness, at some point when the script reaches to the lowest value , it again starts with the max brightness , this was not the case with the previous version of the script.

Apart from these little issues, your script works exactly the way it should. smile


  Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github

Offline

#29 2012-10-24 19:46:45

Haikarainen
Member
Registered: 2012-09-04
Posts: 93

Re: LightScript - Lightweight script to easily change screen brightness.

illusionist wrote:

Hello Haikarainen,
  Nice work there, but I am having some issues
1. The script needs root privileges now . ( is that what you intended ? if so i am ok with it )
2. When decreasing brightness, at some point when the script reaches to the lowest value , it again starts with the max brightness , this was not the case with the previous version of the script.

Apart from these little issues, your script works exactly the way it should. smile


Thanks for your feedback..

1. I'm working on it, currently trying to figure out how to create udev rules for permissions as an alternative to the auto-sudo thingy(which is harder now since its an executable).

2. Ah crap, I thought I had this fixed. I noticed it in development. It's an unsigned integer in C89 that underflows. I will look this up and make sure it cannot happen. It is actually the only FIXME in the source atm xD

Also it isnt a script anymore wink

Offline

#30 2012-10-24 23:55:49

silverrocker
Member
Registered: 2012-10-24
Posts: 1

Re: LightScript - Lightweight script to easily change screen brightness.

I have a small suggestion for your program. I have noticed some weird behavior. Whenever I do light --help. it returns the current brightness. The expected behavior for both --help and -h should be the output when light is ran without arguments. You can easely do this with getops.
I also have the same problems with root.

Offline

#31 2012-10-25 03:10:04

illusionist
Member
From: localhost
Registered: 2012-04-03
Posts: 498

Re: LightScript - Lightweight script to easily change screen brightness.

Haikarainen wrote:

Also it isnt a script anymore wink

Oh..my bad . It is a program now. wink You should consider changing the thread title too. smile
And about udev you may try

 MODE="666"

in udev rule, I am no expert but saw something like this a while back.

Last edited by illusionist (2012-10-25 03:10:28)


  Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github

Offline

#32 2012-10-25 15:26:38

Haikarainen
Member
Registered: 2012-09-04
Posts: 93

Re: LightScript - Lightweight script to easily change screen brightness.

silverrocker wrote:

I have a small suggestion for your program. I have noticed some weird behavior. Whenever I do light --help. it returns the current brightness. The expected behavior for both --help and -h should be the output when light is ran without arguments. You can easely do this with getops.
I also have the same problems with root.


That is REALLY weird. I have custom code to parse arguments, of course --help and -h should show usage..  Will put this in the next commit.

Regarding root: Still working on this.

EDIT: It's not really that weird, since I havent implemented --args yet it basically parses is as tags: "-", "h", "e", "l", "p". p is the tag for precise current brightness. Fixing this now

Last edited by Haikarainen (2012-10-25 15:28:40)

Offline

#33 2012-10-25 15:56:30

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: LightScript - Lightweight script to easily change screen brightness.

Haikarainen wrote:
Shinryuu wrote:

Oh, this looks pretty easy to use and it's nice you filled information in to Wiki as well. I'll test it with my laptop when I next time launch it up wink I wonder if this thread can be moved to "Community Contributions" section, I believe administrators will do that if necessary.

Thanks, appreciate the feedback! I thought about that myself, but I found 3 different places to post this on the forum (1 was the contributions, 1 here, and 1 in the sticky for small programs). We'll see what the mods think, hopefully they have mercy upon my soul and doesn't delete the whole post.

*twiddles thumbs*

Better late than never. smile

Moving from Programming & Scripting to Community Contributions.

If you want to open a new thread for your C port, you know where to. smile


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#34 2012-11-18 22:11:33

Haikarainen
Member
Registered: 2012-09-04
Posts: 93

Re: LightScript - Lightweight script to easily change screen brightness.

fsckd wrote:
Haikarainen wrote:
Shinryuu wrote:

Oh, this looks pretty easy to use and it's nice you filled information in to Wiki as well. I'll test it with my laptop when I next time launch it up wink I wonder if this thread can be moved to "Community Contributions" section, I believe administrators will do that if necessary.

Thanks, appreciate the feedback! I thought about that myself, but I found 3 different places to post this on the forum (1 was the contributions, 1 here, and 1 in the sticky for small programs). We'll see what the mods think, hopefully they have mercy upon my soul and doesn't delete the whole post.

*twiddles thumbs*

Better late than never. smile

Moving from Programming & Scripting to Community Contributions.

If you want to open a new thread for your C port, you know where to. smile

Done and done smile You guys should probably abandon lightscript for light as I will no longer work on this!

Offline

Board footer

Powered by FluxBB