You are not logged in.

#1 2014-07-05 21:17:42

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

New version of Light (control your laptops backlight easily).

This is a complete rewrite of my old pet project, as I felt the need to severely clean up the code. See the old thread here: https://bbs.archlinux.org/viewtopic.php?id=153210

Anyway, new version, completely new command line usage -- sorry, it was pretty much inevitable. More complete functionality as well: no more hacking when you want to set minimal brightness or specify a controller, it's all done in command line now. It's also installed with root capabilities directly, so no more hacking with that either. Just makepkg -si and off you go!

If you face any problems, don't forget to run it with the verbosity flag, -v 3, to get all the errors! You will probably get a lot of errors (if you get one), they are there to make it easier to trace the problem in code (you pretty much get a stack).

I want to make it clear that the changes to the command line usage was done for several good reasons, including the fact that it wasn't very intuitive before.

Github: https://github.com/haikarainen/light

UPDATE:

* The AUR package has been split up in 2, https://aur.archlinux.org/packages/light/ and https://aur.archlinux.org/packages/light-git/ .
* It also has an official website now (thanks to github): http://haikarainen.github.io/light/
* Even more functionality
* There are deb packages available.

Any feedback appreciated!

Last edited by Haikarainen (2014-07-14 21:34:56)

Offline

#2 2014-07-06 20:41:03

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: New version of Light (control your laptops backlight easily).

Here is an updated version (for pacman 4.1) of your PKGBUILD:

pkgname=light
pkgver=20140705
pkgrel=2
pkgdesc='Program to easily change brightness on backlight-controllers.'
arch=('any')
url="https://github.com/haikarainen/$pkgname"
license=('GPL3')
makedepends=('git')
conflicts=('lightscript')
provides=('lightscript')
replaces=('lightscript')
source=('git+https://github.com/haikarainen/light.git')
md5sums=('SKIP')

build() {
  cd "$srcdir/$pkgname"
  make
}

package() {
  install -d "$pkgdir/etc/light/mincap"

  install -Dm755 "$srcdir/$pkgname/light" "$pkgdir/usr/bin/light"
  install -Dm644 "$srcdir/$pkgname/LICENSE" "$pkgdir/etc/light/LICENSE"
  install -Dm644 "$srcdir/$pkgname/README" "$pkgdir/etc/light/README"
  install -Dm644 "$srcdir/$pkgname/CHANGELOG" "$pkgdir/etc/light/CHANGELOG"

  chmod a+s "$pkgdir/usr/bin/light"
}

Last edited by thiagowfx (2014-07-06 20:41:57)

Offline

#3 2014-07-06 20:43:59

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: New version of Light (control your laptops backlight easily).

I also believe it would be a good idea to move the doc files (LICENSE, etc) to /usr/share/light, or even /usr/share/doc/light, but I haven't changed this.

Offline

#4 2014-07-06 21:19:57

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

Re: New version of Light (control your laptops backlight easily).

thiagowfx wrote:

Here is an updated version (for pacman 4.1) of your PKGBUILD:

Thanks a ton for your response! Will take a look at the PKGBUILD (and AUR package process) when I have time and modernize it / make it proper!

Offline

#5 2014-07-07 15:34:59

mariojuniorjp
Member
Registered: 2014-07-06
Posts: 16

Re: New version of Light (control your laptops backlight easily).

Thank you very much for this application. \o/

Offline

#6 2014-07-07 15:37:28

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: New version of Light (control your laptops backlight easily).

The PKGBUILD needs more help than that. It's pulling from git master, so it should be called light-git and include a pkgver function.

Online

#7 2014-07-07 15:48:59

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: New version of Light (control your laptops backlight easily).

Scimmia wrote:

The PKGBUILD needs more help than that. It's pulling from git master, so it should be called light-git and include a pkgver function.

If you don't want a -git package, than release a new version, e.g. create a version number tag v0.9.2 and add #tag=v0.9.2 to the git url.
You could also reference a certain git commit with commit=COMMITID, but that feels a bit unnatural when you are the owner of the git repository. This is something I'd only do if there were important bugfixes without a new version tag in the repo.

Last edited by progandy (2014-07-07 15:50:22)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#8 2014-07-07 17:49:47

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

Re: New version of Light (control your laptops backlight easily).

progandy wrote:
Scimmia wrote:

The PKGBUILD needs more help than that. It's pulling from git master, so it should be called light-git and include a pkgver function.

If you don't want a -git package, than release a new version, e.g. create a version number tag v0.9.2 and add #tag=v0.9.2 to the git url.
You could also reference a certain git commit with commit=COMMITID, but that feels a bit unnatural when you are the owner of the git repository. This is something I'd only do if there were important bugfixes without a new version tag in the repo.

Ah thanks for this, I just tagged versions on git 15 mins ago (or something), this seems like the best bet.


Sorry about the PKGBUILD, I haven't made one in almost 2 years and that one was the first I ever did so.. I appreciate all your feedback and help!

Offline

#9 2014-07-07 21:21:33

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: New version of Light (control your laptops backlight easily).

Haikarainen wrote:

Sorry about the PKGBUILD, I haven't made one in almost 2 years and that one was the first I ever did so.. I appreciate all your feedback and help!

No need to be sorry, all tips here are meant to improve your application. Keep up the good work smile

Offline

#10 2014-07-10 20:05:26

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

Re: New version of Light (control your laptops backlight easily).

Thanks a ton for your feedback and help, I have now created 2 packages instead;

light-git for latest master: https://aur.archlinux.org/packages/light-git/

light for latest tagged version: https://aur.archlinux.org/packages/light/

Also don't miss out on my latest commits; tons of small improvements(including proper makefile) and 2 added features; List controllers with -L, and save/restore your brightness (for reboots etc) with -I and -O

Offline

#11 2014-07-11 11:06:12

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

Re: New version of Light (control your laptops backlight easily).

Just gave the wiki a well needed update as well; https://wiki.archlinux.org/index.php/Light

Offline

#12 2014-07-14 21:35:26

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

Re: New version of Light (control your laptops backlight easily).

UPDATE: There are now debian packages available, more functionality and fixes, better documentation etc.

Offline

#13 2014-08-05 21:02:59

Nordic89
Member
Registered: 2014-05-07
Posts: 49

Re: New version of Light (control your laptops backlight easily).

Did you think about the possibility of automatically changing the brightness depending on an ambient light sensor?

Offline

#14 2014-08-15 12:30:02

erno
Member
Registered: 2009-08-24
Posts: 83

Re: New version of Light (control your laptops backlight easily).

have you considered adding some colour temperature adjustments? atm redshift does that for me but it isn't very good at setting the backlight...would be great not having to use 2 programs for this.

Offline

#15 2014-08-27 18:08:16

Quatro
Member
From: Portugal
Registered: 2013-06-14
Posts: 24

Re: New version of Light (control your laptops backlight easily).

When I try to install(with pacaur), this error appears:

==> Starting pkgver()...
==> Updated version: light-git v0.9.r3.g78fba9d-1
==> Starting build()...
gcc -std=c89 -O2 -pedantic -Wall -I"./include" -g -o light src/helpers.c src/light.c src/main.c
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/cc1: error while loading shared libraries: libisl.so.10: cannot open shared object file: No such file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/cc1: error while loading shared libraries: libisl.so.10: cannot open shared object file: No such file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/cc1: error while loading shared libraries: libisl.so.10: cannot open shared object file: No such file or directory
Makefile:8: recipe for target 'all' failed
make: *** [all] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
:: light-git cleaned

Any ideas?

Edit:Not light problem. Apparently my gcc install is having some problems. Disregard this.

Last edited by Quatro (2014-08-28 18:04:28)

Offline

Board footer

Powered by FluxBB