Re: change gnome-sound-applet icon in awesome

2012-08-27 Thread Mohan Sundaram
pyLemon leeway1985 at gmail.com writes:
 
 于Wed 18 Jul 2012 12:45:41 AM CST,Vincent Bernat写到:
 
  #v+
  gtk-icon-theme-name=yourtheme
  gtk-fallback-icon-theme=yourtheme
  #v-
 
  Another solution would be to uninstall those icons.
 
 thanks vincent,  your solution is awesome, and I have successfully 
 changed my icon white now. thank you very much!
 
 and thanks bryan, thank you for your help. this group is so nice. I 
 love awesome. : )

pyLemon - in which file are these entries made? I've the same problem as yours. 
Changing GTK+ themes using gnome-tweak-tool did not help. In my system, Faenza-
Dark is not showing up in the tweak tool eventhough it is available in 
/usr/share/icons.

Mohan


-- 
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.


Re: change gnome-sound-applet icon in awesome

2012-07-17 Thread David Gomes
I've had the same problem:
http://askubuntu.com/questions/105614/change-gnome-sound-applet-icon

I couldn't really get an answer, not sure if it's possible. I just ended up
using a textbox to display my sound, but I'd love to find a way around this
too.

On Tue, Jul 17, 2012 at 8:37 AM, pyLemon leeway1...@gmail.com wrote:

 hi:

 I use the gnome-sound-applet to control sound in my awesome settings, and
 it has a full black icon. However, my top panel is also black, so I can't
 see the icon.

 Is it possible to change the icon? Thanks!


 best regards,
 pylemon

 --
 To unsubscribe, send mail to 
 awesome-unsubscribe@naquadah.**orgawesome-unsubscr...@naquadah.org
 .



Re: change gnome-sound-applet icon in awesome

2012-07-17 Thread Abhijeet R
Well, I actually don't have a solution but you can use vicious to 
create a widget like this.


-- {{{ Volume level
volicon = widget({ type = imagebox })
volicon.image = image(awful.util.getdir(config) .. /icons/vol.png)

volwidget = widget({ type = textbox })
vicious.cache(vicious.widgets.volume)
-- Register widgets
vicious.register(volwidget, vicious.widgets.volume,  $1%, 2, Master)
-- Register buttons
volwidget:buttons(awful.util.table.join(
  awful.button({ }, 1, function () exec(gnome-alsamixer) end),
  awful.button({ }, 4, function () exec(amixer -q set Master 2dB+, 
false) vicious.force({volwidget}) end),
  awful.button({ }, 5, function () exec(amixer -q set Master 2dB-, 
false) vicious.force({volwidget}) end)

))

In the above configuration, scrolling on the textwidget changes the 
sound too. Also, clicking on it opens gnome-alsamixer.


On Tue 17 Jul 2012 02:52:42 PM IST, David Gomes wrote:

I've had the same problem:
http://askubuntu.com/questions/105614/change-gnome-sound-applet-icon

I couldn't really get an answer, not sure if it's possible. I just
ended up using a textbox to display my sound, but I'd love to find a
way around this too.

On Tue, Jul 17, 2012 at 8:37 AM, pyLemon leeway1...@gmail.com
mailto:leeway1...@gmail.com wrote:

hi:

I use the gnome-sound-applet to control sound in my awesome
settings, and it has a full black icon. However, my top panel is
also black, so I can't see the icon.

Is it possible to change the icon? Thanks!


best regards,
pylemon

--
To unsubscribe, send mail to awesome-unsubscribe@naquadah.__org
mailto:awesome-unsubscr...@naquadah.org.




--
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.


Re: change gnome-sound-applet icon in awesome

2012-07-17 Thread pyLemon
thanks for your quick reply Abhijeet, and thanks David Gomes. I have 
google that page. haha, And I have seen someone has successful changed 
that icon. but I don't know how..


this is my volume applet config

-- Volume widget

volumecfg = {}
volumecfg.cardid  = 0
volumecfg.channel = Master
volumecfg.widget = widget({ type = textbox, name = 
volumecfg.widget, align = right })


volumecfg_t = awful.tooltip({ objects = { volumecfg.widget },})
volumecfg_t:set_text(Volume)

-- command must start with a space!
volumecfg.mixercommand = function (command)
  local fd = io.popen(amixer -c  .. volumecfg.cardid .. command)
  local status = fd:read(*all)
  fd:close()

  local volume = string.match(status, (%d?%d?%d)%%)
  volume = string.format(span color='#1793d1'%3d/span, 
volume)

  status = string.match(status, %[(o[^%]]*)%])
  if string.find(status, on, 1, true) then
  volume = volume .. span color='#1793d1'%/span
  else
  volume = volume .. span color='#ff5656'M/span
  end
  volumecfg.widget.text = volume
end
volumecfg.update = function ()
  volumecfg.mixercommand( sget  .. volumecfg.channel)
end
volumecfg.up = function ()
  volumecfg.mixercommand( sset  .. volumecfg.channel ..  2%+)
end
volumecfg.down = function ()
  volumecfg.mixercommand( sset  .. volumecfg.channel ..  2%-)
end
volumecfg.toggle = function ()
  volumecfg.mixercommand( sset  .. volumecfg.channel ..  
toggle)

end
volumecfg.widget:buttons({
  button({ }, 4, function () volumecfg.up() end),
  button({ }, 5, function () volumecfg.down() end),
  button({ }, 1, function () volumecfg.toggle() end)
})
volumecfg.update()

---EOF

the problem is , when I click the widget and it execute 
volumecfg.toggle() , the computer gets mute, and I can't get it unmute 
unless I use the gnome-sound-applet or something like that..   what do 
you think about that problem?


pylemon


于Tue 17 Jul 2012 05:36:36 PM CST,Abhijeet R写到:

Well, I actually don't have a solution but you can use vicious to
create a widget like this.

-- {{{ Volume level
volicon = widget({ type = imagebox })
volicon.image = image(awful.util.getdir(config) .. /icons/vol.png)

volwidget = widget({ type = textbox })
vicious.cache(vicious.widgets.volume)
-- Register widgets
vicious.register(volwidget, vicious.widgets.volume,  $1%, 2, Master)
-- Register buttons
volwidget:buttons(awful.util.table.join(
  awful.button({ }, 1, function () exec(gnome-alsamixer) end),
  awful.button({ }, 4, function () exec(amixer -q set Master 2dB+,
false) vicious.force({volwidget}) end),
  awful.button({ }, 5, function () exec(amixer -q set Master 2dB-,
false) vicious.force({volwidget}) end)
))

In the above configuration, scrolling on the textwidget changes the
sound too. Also, clicking on it opens gnome-alsamixer.

On Tue 17 Jul 2012 02:52:42 PM IST, David Gomes wrote:

I've had the same problem:
http://askubuntu.com/questions/105614/change-gnome-sound-applet-icon

I couldn't really get an answer, not sure if it's possible. I just
ended up using a textbox to display my sound, but I'd love to find a
way around this too.

On Tue, Jul 17, 2012 at 8:37 AM, pyLemon leeway1...@gmail.com
mailto:leeway1...@gmail.com wrote:

hi:

I use the gnome-sound-applet to control sound in my awesome
settings, and it has a full black icon. However, my top panel is
also black, so I can't see the icon.

Is it possible to change the icon? Thanks!


best regards,
pylemon

--
To unsubscribe, send mail to awesome-unsubscribe@naquadah.__org
mailto:awesome-unsubscr...@naquadah.org.








--
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.


Re: change gnome-sound-applet icon in awesome

2012-07-17 Thread Vincent Bernat
 ❦ 17 juillet 2012 09:37 CEST, pyLemon leeway1...@gmail.com :

 I use the gnome-sound-applet to control sound in my awesome settings,
 and it has a full black icon. However, my top panel is also black, so
 I can't see the icon.

 Is it possible to change the icon? Thanks!

While I think you should use a widget for this, you can fix the icon
color of most gnome applets with the following snippet:

#v+
-- The systray is a bit complex. We need to configure it to display
-- the right colors. Here is a link with more background about this:
--  http://thread.gmane.org/gmane.comp.window-managers.awesome/9028
xprop = assert(io.popen(xprop -root _NET_SUPPORTING_WM_CHECK))
wid = xprop:read():match(^_NET_SUPPORTING_WM_CHECK.WINDOW.: window id # 
(0x[%S]+)$)
xprop:close()
if wid then
   wid = tonumber(wid) + 1
   os.execute(xprop -id  .. wid ..  -format _NET_SYSTEM_TRAY_COLORS 32c  ..
  -set _NET_SYSTEM_TRAY_COLORS  ..
  65535,65535,65535,65535,8670,8670,65535,32385,0,8670,65535,8670)
end
#v-

You need to restart the applet after that due to a bug in GTK. More
information here:
 http://thread.gmane.org/gmane.comp.window-managers.awesome/9028
 https://bugzilla.gnome.org/show_bug.cgi?id=679592
 https://bugzilla.gnome.org/show_bug.cgi?id=679591

Once the last bug has been solved, I'll propose a patch for awesome
systray implementation.
-- 
printk(KERN_ERR msp3400: chip reset failed, penguin on i2c bus?\n);
2.2.16 /usr/src/linux/drivers/char/msp3400.c

--
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.


Re: change gnome-sound-applet icon in awesome

2012-07-17 Thread Bryan Gardiner
On Tue, 17 Jul 2012 15:37:02 +0800
pyLemon leeway1...@gmail.com wrote:

 hi:
 
 I use the gnome-sound-applet to control sound in my awesome settings, 
 and it has a full black icon. However, my top panel is also black, so
 I can't see the icon.
 
 Is it possible to change the icon? Thanks!
 
 
 best regards,
 pylemon

You might also be able to get around this by switching to an icon
theme that's meant for dark backgrounds, such as Faenza-Dark.  Here's
how to create the .gtkrc files that override the default
gtk-icon-theme-name:

http://awesome.naquadah.org/wiki/Customizing_GTK_Apps

Cheers,
Bryan

-- 
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.


Re: change gnome-sound-applet icon in awesome

2012-07-17 Thread Vincent Bernat
 ❦ 17 juillet 2012 18:07 CEST, Bryan Gardiner b...@khumba.net :

 I use the gnome-sound-applet to control sound in my awesome settings, 
 and it has a full black icon. However, my top panel is also black, so
 I can't see the icon.
 
 Is it possible to change the icon? Thanks!
 
 
 best regards,
 pylemon

 You might also be able to get around this by switching to an icon
 theme that's meant for dark backgrounds, such as Faenza-Dark.  Here's
 how to create the .gtkrc files that override the default
 gtk-icon-theme-name:

 http://awesome.naquadah.org/wiki/Customizing_GTK_Apps

Unfortunately, applets using those symbolic icons are specifically
requesting them. I did not check for the volume applet, but I got the
problem with the bluetooth applet. You have something like this:

 icon_enabled = g_themed_icon_new_with_default_fallbacks 
(ACTIVE_ICON_NAME-symbolic);

This result that an icon ending by -symbolic will be favored over all
other icons. Only if such an icon is not found, it will try without the
-symbolic suffix (and again, if not found, it will remove one suffix).

However, I don't remember whay I have tested exactly. Maybe something
like this would work (with `yourtheme` being a theme without symbolic
icons):

#v+
gtk-icon-theme-name=yourtheme
gtk-fallback-icon-theme=yourtheme
#v-

Another solution would be to uninstall those icons.
-- 
printk(KERN_WARNING Multi-volume CD somehow got mounted.\n);
2.2.16 /usr/src/linux/fs/isofs/inode.c

--
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.


Re: change gnome-sound-applet icon in awesome

2012-07-17 Thread pyLemon

于Wed 18 Jul 2012 12:45:41 AM CST,Vincent Bernat写到:

  ❦ 17 juillet 2012 18:07 CEST, Bryan Gardiner b...@khumba.net :


I use the gnome-sound-applet to control sound in my awesome settings,
and it has a full black icon. However, my top panel is also black, so
I can't see the icon.

Is it possible to change the icon? Thanks!


best regards,
pylemon


You might also be able to get around this by switching to an icon
theme that's meant for dark backgrounds, such as Faenza-Dark.  Here's
how to create the .gtkrc files that override the default
gtk-icon-theme-name:

http://awesome.naquadah.org/wiki/Customizing_GTK_Apps


Unfortunately, applets using those symbolic icons are specifically
requesting them. I did not check for the volume applet, but I got the
problem with the bluetooth applet. You have something like this:

  icon_enabled = g_themed_icon_new_with_default_fallbacks 
(ACTIVE_ICON_NAME-symbolic);

This result that an icon ending by -symbolic will be favored over all
other icons. Only if such an icon is not found, it will try without the
-symbolic suffix (and again, if not found, it will remove one suffix).

However, I don't remember whay I have tested exactly. Maybe something
like this would work (with `yourtheme` being a theme without symbolic
icons):

#v+
gtk-icon-theme-name=yourtheme
gtk-fallback-icon-theme=yourtheme
#v-

Another solution would be to uninstall those icons.


thanks vincent,  your solution is awesome, and I have successfully 
changed my icon white now. thank you very much!


and thanks bryan, thank you for your help. this group is so nice. I 
love awesome. : )




--
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.


RE: change gnome-sound-applet icon in awesome

2012-07-17 Thread David Sorkovsky
Try changing

This...

   volumecfg.mixercommand( sset  .. volumecfg.channel ..  
toggle)

To this...

   volumecfg.mixercommand( sset  .. volumecfg.channel ..  toggle) 


PS: Here's my version which has 4 different icons depending on the level,
click toggles mute, wheel up/down over icon changes volume  tool tip gives
actual value...

-- Volume widget
myvolume = {}
myvolume.cardid  = 0
myvolume.channel = Headphone  -- edit as appropriate [often Master]
myvolume.widget = widget({ type = imagebox, name = myvolume.widget })
myvolume.tooltip = awful.tooltip({ objects = { myvolume.widget },})

myvolume.mixercommand = function (command)
local fd =
io.popen(amixer -c  .. myvolume.cardid ..   .. command)
local status =
fd:read(*all)
fd:close()

local volume =
string.match(status, (%d?%d?%d)%%)

status =
string.match(status, %[(o[^%]]*)%])
if
string.find(status, on, 1, true) then
if
tonumber(volume)  50 then 

myvolume.widget.image = image(awful.util.getdir(config) ..
/icons/audio-volume-low.png)
elseif
tonumber(volume)  100 then 

myvolume.widget.image = image(awful.util.getdir(config) ..
/icons/audio-volume-medium.png)
else 

myvolume.widget.image = image(awful.util.getdir(config) ..
/icons/audio-volume-high.png)
end
else

myvolume.widget.image = image(awful.util.getdir(config) ..
/icons/audio-volume-muted.png)
end


myvolume.tooltip:set_text(volume .. %)
end

myvolume.update = function () myvolume.mixercommand(sget  ..
myvolume.channel) end
myvolume.up = function () myvolume.mixercommand(sset  .. myvolume.channel
..  1%+) end
myvolume.down = function () myvolume.mixercommand(sset  ..
myvolume.channel ..  1%-) end
myvolume.toggle = function () myvolume.mixercommand(sset  ..
myvolume.channel ..  toggle) end
myvolume.widget:buttons({
button({ },
4, function () myvolume.up() end),
button({ },
5, function () myvolume.down() end),
button({ },
1, function () myvolume.toggle() end)
})

myvolume.update()


David Sorkovsky

+61 468 478 438


-Original Message-
From: pyLemon [mailto:leeway1...@gmail.com] 
Sent: Tuesday, 17 July 2012 11:21 PM
To: Abhijeet R
Cc: awesome@naquadah.org; David Gomes
Subject: Re: change gnome-sound-applet icon in awesome

thanks for your quick reply Abhijeet, and thanks David Gomes. I have google
that page. haha, And I have seen someone has successful changed that icon.
but I don't know how..

this is my volume applet config

-- Volume widget

volumecfg = {}
volumecfg.cardid  = 0
volumecfg.channel = Master
volumecfg.widget = widget({ type = textbox, name = volumecfg.widget,
align = right })

volumecfg_t = awful.tooltip({ objects = { volumecfg.widget },})
volumecfg_t:set_text(Volume)

-- command must start with a space!
volumecfg.mixercommand = function (command)
   local fd = io.popen(amixer -c  .. volumecfg.cardid .. command)
   local status = fd:read(*all)
   fd:close()

   local volume = string.match(status, (%d?%d?%d)%%)
   volume = string.format(span color='#1793d1'%3d/span,
volume)
   status = string.match(status, %[(o[^%]]*)%])
   if string.find(status, on, 1, true) then
   volume = volume .. span color='#1793d1'%/span
   else
   volume = volume .. span color='#ff5656'M/span
   end
   volumecfg.widget.text = volume
end
volumecfg.update = function ()
   volumecfg.mixercommand( sget  .. volumecfg.channel) end
volumecfg.up = function ()
   volumecfg.mixercommand( sset  .. volumecfg.channel ..  2%+) end
volumecfg.down = function ()
   volumecfg.mixercommand( sset  .. volumecfg.channel ..  2%-) end
volumecfg.toggle = function ()
   volumecfg.mixercommand( sset  .. volumecfg.channel ..  
toggle)
end
volumecfg.widget:buttons({
   button({ }, 4, function () volumecfg.up() end),
   button({ }, 5, function () volumecfg.down() end),
   button({ }, 1, function () volumecfg.toggle() end)
})
volumecfg.update()

---EOF

the problem is , when I click the widget