Re: Naughty Notifications on multiple monitors

2015-06-04 Thread Alexis BRENON
Hum, well, you will have to update a little bit your config!

First, the default naughty.notify function returns a table representing the
notification, but your new notify function doesn't, so update it :

naughty.notify_ = naughty.notify
naughty.notify = function (args,...)
  notifications = {}
   for i = 1, screen.count() do
   args.screen = i
   notifications:insert(i, naughty.notify_(args,...))
   end
   return notifications
end

Then line 600 you update to something like :
local notifs = naughty.notify(args)
local id = {}
for notif in ipairs(notifs) do
  id:insert(notif.id)
end

Nevertheless, I think that you use the id value to replace the
notification, do you ? In this case, you will have to update again your
custom notification to handle the case if args.id is a table (instead of a
number) :

naughty.notify = function (args,...)
   notifications = {}
   naughty_args = args
   for i = 1, screen.count() do
   if args.replaces_id and type(args.replaces_id) == "table" then
  naughty_args.replaces_id = args.replaces_id[i]
   end
   naughty_args.screen = i
   notifications:insert(i, naughty.notify_(args,...))
   end
   return notifications
end

Or something like that.

Cheers,
Alexis

Le mer. 3 juin 2015 à 22:30, Abraham Baker  a
écrit :

> That actually works, but also generates an error (in the form of a
> critical notification on both screens) at the same time:
> /usr/share/awesome/lib/naughty.lua:600: attempt to index a nil value
>
> For context, line 600 is:
> local id = naughty.notify(args).id
>
> Looks like this is close to working right! Thanks!
>
> On Wed, Jun 3, 2015 at 2:24 PM, Elv1313 .  wrote:
>
>> This should help:
>>
>> local naughty = require('naughty')
>> naughty.notify_ = naughty.notify
>> naughty.notify = function (args,...)
>>for i = 1, screen.count() do
>>args.screen = i
>>naughty.notify_(args,...)
>>end
>> end
>>
>> On 3 June 2015 at 10:42, Abraham Baker  wrote:
>> > I tried adding that code right after the local naughty =
>> require("naughty")
>> > that was already there, but it didn't work and actually stopped any
>> > notifications from showing on any monitor.
>> >
>> > I doubt it was the cause, but some other functions in my rc.lua also use
>> > local i as a counter;  these shouldn't interfere with each other as
>> long as
>> > they are inside their own functions, right?
>> >
>> > Thanks,
>> > Abe
>> >
>> > On Wed, Jun 3, 2015 at 8:20 AM, Alexis BRENON 
>> > wrote:
>> >>
>> >> Hi Abraham,
>> >>
>> >> you have to call the anughty.notift() function twice, once for each
>> >> screen.
>> >> Maybe you can define a function which do it for you :
>> >>
>> >> local naughty = require('naughty')
>> >> naughty.notify = function (args)
>> >> local i = 1
>> >> while i <= screen.count() do
>> >> args.screen = i
>> >> naughty.notify(args)
>> >> end
>> >> end
>> >>
>> >> Or something like that
>> >>
>> >> Regards,
>> >> Alexis
>> >>
>> >> Le mer. 3 juin 2015 à 15:13, Abraham Baker 
>> a
>> >> écrit :
>> >>>
>> >>> Hi,
>> >>>
>> >>> I have a standing/sitting monitor arrangement on my desk that makes it
>> >>> hard to see notifications on the upper monitor while sitting and vice
>> versa.
>> >>> I've been trying to change the default naughty config so notifications
>> >>> appear on both monitors at once, but so far I'm only able to just
>> change
>> >>> which monitor it shows up on (not both).
>> >>>
>> >>> Is there an easy way to have notifications shown on all monitors?
>> >>>
>> >>> Thanks,
>> >>> Abe Baker
>> >
>> >
>>
>
>


Trouble building on Debian 7 (wheezy)

2015-06-04 Thread John Yates
I am trying to build the git tip.  Things seem to go fine until it is time
to build the man pages:

...
> Scanning dependencies of target lgi-check
> [ 55%] Built target lgi-check
> Scanning dependencies of target man
> [ 56%] Generating manpages/man1/awesome.1.xml
> [ 57%] Generating manpages/man1/awesome.1
> Note: Writing awesome.1
> make[3]: *** [manpages/man1/awesome.1] Error 1
> make[2]: *** [CMakeFiles/man.dir/all] Error 2
> make[1]: *** [all] Error 2
> make: *** [install] Error 2


Any suggestions?

/john


Re: advices for widget

2015-06-04 Thread mickael foucaux
thanks everybody!

@ivin, @jeferson, @Slawomoir, lain very good package to use

@Martin, yes I m using a PPA after this
http://linuxg.net/how-to-install-awesome-window-manager-3-5-6-on-ubuntu-14-10-ubuntu-14-04-and-derivative-systems/

@Abraham udiskie is perfect!

@alexis, good tips ;)

2015-06-03 14:12 GMT+02:00 Abraham Baker :

> For automatically mounting usb drives with an icon in the tray to control
> mounting/unmounting, installing udiskie and then running udiskie --tray
> works well.
>
> https://github.com/coldfix/udiskie
> https://awesome.naquadah.org/wiki/Automounting#Udiskie
>
> On Wed, Jun 3, 2015 at 3:28 AM, Sławomir Kowalewski <
> slawomir.kowalew...@gmail.com> wrote:
>
>> Hi Mickael,
>>
>> There is also very nice lain widget library and here you can see same
>> examples and ready to use configs
>> https://github.com/copycat-killer/awesome-copycats
>>
>> On 3 June 2015 at 08:45, Alexis BRENON  wrote:
>>
>>> Hi Mickael,
>>>
>>> For battery state and volume control, I use Vicious library (
>>> https://awesome.naquadah.org/wiki/Vicious)
>>> I use it also for clock but I implemented calendar manually, based on
>>> the work of Vincent Bernat (
>>> https://github.com/AlexisBRENON/awesome-configuration/blob/master/backend/datetime/calendar.lua
>>> ).
>>>
>>> For wifi and more generally network controller, I never found anything
>>> as good as NetworkManager with nm-applet. I tried all in this list
>>> https://wiki.archlinux.org/index.php/List_of_applications/Internet#Network_managers
>>> .
>>>
>>> I didn't use any easy drive mounter, as I don't have many external
>>> drives or USB key. Only one good rule in /etc/fstab a folder named
>>> /mnt/external, and I only have to type "mount /etc/external" to mount my
>>> USB drive when needed.
>>>
>>> Hope my experience can help.
>>>
>>> Kind regards,
>>> Alexis
>>>
>>> Le mar. 2 juin 2015 à 17:05, mickael foucaux 
>>> a écrit :
>>>
 Hi folks!

 I'm happy with new laptop running an Ubuntu 14.01 / Awesome 3.5.6.

 Now I'm looking for few useful / essentials widget as:
 - battery state
 - volume control
 - wifi controller
 - clock / calendar
 - easy drive mounter

 Ok I saw few of them in
 https://awesome.naquadah.org/wiki/User_Contributed_Widgets . However
 as I know not all of them are compatible with awesome 3.5.6, I would like
 some feedback and advice before to try randomly widgets.

 cheers,

 Mickael

>>>
>>
>


Re: Naughty Notifications on multiple monitors

2015-06-04 Thread Abraham Baker
Hi,

When I commented out 600 and 601 of naughty.lua *before* changing rc.lua, I
got:
naughty.lua:604: bad arg #1 to 'ipairs' (table expected, got nil)
on both screens.

Then, when I added the updated naughy.notify function to rc.lua, I got:
rc.lua:22 attempt to call a nil value (method 'insert')
on only one screen

Ironically, the previous solution would work perfectly if it wasn't for the
error messages (which are critical and have to be clicked away)!
Is there a way to selectively silence the error messages related to
naughty.lua without silencing all errors?

Thanks,
Abe


On Thu, Jun 4, 2015 at 2:08 AM, Alexis BRENON 
wrote:

> Hum, well, you will have to update a little bit your config!
>
> First, the default naughty.notify function returns a table representing
> the notification, but your new notify function doesn't, so update it :
>
> naughty.notify_ = naughty.notify
> naughty.notify = function (args,...)
>   notifications = {}
>for i = 1, screen.count() do
>args.screen = i
>notifications:insert(i, naughty.notify_(args,...))
>end
>return notifications
> end
>
> Then line 600 you update to something like :
> local notifs = naughty.notify(args)
> local id = {}
> for notif in ipairs(notifs) do
>   id:insert(notif.id)
> end
>
> Nevertheless, I think that you use the id value to replace the
> notification, do you ? In this case, you will have to update again your
> custom notification to handle the case if args.id is a table (instead of
> a number) :
>
> naughty.notify = function (args,...)
>notifications = {}
>naughty_args = args
>for i = 1, screen.count() do
>if args.replaces_id and type(args.replaces_id) == "table" then
>   naughty_args.replaces_id = args.replaces_id[i]
>end
>naughty_args.screen = i
>notifications:insert(i, naughty.notify_(args,...))
>end
>return notifications
> end
>
> Or something like that.
>
> Cheers,
> Alexis
>
> Le mer. 3 juin 2015 à 22:30, Abraham Baker  a
> écrit :
>
>> That actually works, but also generates an error (in the form of a
>> critical notification on both screens) at the same time:
>> /usr/share/awesome/lib/naughty.lua:600: attempt to index a nil value
>>
>> For context, line 600 is:
>> local id = naughty.notify(args).id
>>
>> Looks like this is close to working right! Thanks!
>>
>> On Wed, Jun 3, 2015 at 2:24 PM, Elv1313 .  wrote:
>>
>>> This should help:
>>>
>>> local naughty = require('naughty')
>>> naughty.notify_ = naughty.notify
>>> naughty.notify = function (args,...)
>>>for i = 1, screen.count() do
>>>args.screen = i
>>>naughty.notify_(args,...)
>>>end
>>> end
>>>
>>> On 3 June 2015 at 10:42, Abraham Baker 
>>> wrote:
>>> > I tried adding that code right after the local naughty =
>>> require("naughty")
>>> > that was already there, but it didn't work and actually stopped any
>>> > notifications from showing on any monitor.
>>> >
>>> > I doubt it was the cause, but some other functions in my rc.lua also
>>> use
>>> > local i as a counter;  these shouldn't interfere with each other as
>>> long as
>>> > they are inside their own functions, right?
>>> >
>>> > Thanks,
>>> > Abe
>>> >
>>> > On Wed, Jun 3, 2015 at 8:20 AM, Alexis BRENON >> >
>>> > wrote:
>>> >>
>>> >> Hi Abraham,
>>> >>
>>> >> you have to call the anughty.notift() function twice, once for each
>>> >> screen.
>>> >> Maybe you can define a function which do it for you :
>>> >>
>>> >> local naughty = require('naughty')
>>> >> naughty.notify = function (args)
>>> >> local i = 1
>>> >> while i <= screen.count() do
>>> >> args.screen = i
>>> >> naughty.notify(args)
>>> >> end
>>> >> end
>>> >>
>>> >> Or something like that
>>> >>
>>> >> Regards,
>>> >> Alexis
>>> >>
>>> >> Le mer. 3 juin 2015 à 15:13, Abraham Baker 
>>> a
>>> >> écrit :
>>> >>>
>>> >>> Hi,
>>> >>>
>>> >>> I have a standing/sitting monitor arrangement on my desk that makes
>>> it
>>> >>> hard to see notifications on the upper monitor while sitting and
>>> vice versa.
>>> >>> I've been trying to change the default naughty config so
>>> notifications
>>> >>> appear on both monitors at once, but so far I'm only able to just
>>> change
>>> >>> which monitor it shows up on (not both).
>>> >>>
>>> >>> Is there an easy way to have notifications shown on all monitors?
>>> >>>
>>> >>> Thanks,
>>> >>> Abe Baker
>>> >
>>> >
>>>
>>
>>