<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.ubuntu-fr.org/extern.php?action=feed&amp;tid=1031661&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / Widget dans Awesome]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=1031661</link>
		<description><![CDATA[Les sujets les plus récents dans Widget dans Awesome.]]></description>
		<lastBuildDate>Fri, 07 Sep 2012 13:30:10 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  Widget dans Awesome]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10674511#p10674511</link>
			<description><![CDATA[<div class="quotebox"><cite>Detah-Pixel a écrit&#160;:</cite><blockquote><div><p>Que veux tu dires par :&quot;Essaye en un autre &quot; ?</p></div></blockquote></div><p>Delightful au lieu de naughty : <a href="http://awesome.naquadah.org/wiki/Delightful#Battery_widget">http://awesome.naquadah.org/wiki/Deligh … ery_widget</a></p><p>@+<br />~ktr</p>]]></description>
			<author><![CDATA[dummy@example.com (Kooothor)]]></author>
			<pubDate>Fri, 07 Sep 2012 13:30:10 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10674511#p10674511</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Widget dans Awesome]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10673711#p10673711</link>
			<description><![CDATA[<p>Salut à toi, et je confirme dans mon crâne j&#039;ai en effet quelques pixels mort ;-). D&#039;où le pseudo :-).<br />Que veux tu dires par :&quot;Essaye en un autre &quot; ?<br />J&#039;ai également lu pas mal de doc et de tuto mais aucun n&#039;est vraiment clair sur le sujet et je dois dire que j&#039;en ai quelques peu ras le bol de ne pas comprendre...<br />Merci encore.</p><p>PS: le code n&#039;était pas complet. je le remet.</p><div class="codebox"><pre class="vscroll"><code>-- Standard awesome library
require(&quot;awful&quot;)
require(&quot;awful.autofocus&quot;)
require(&quot;awful.rules&quot;)
-- Theme handling library
require(&quot;beautiful&quot;)
-- Notification library
require(&quot;naughty&quot;)
require(&quot;precious.battery&quot;)

-- Load Debian menu entries
require(&quot;debian.menu&quot;)
-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
if awesome.startup_errors then
    naughty.notify({ preset = naughty.config.presets.critical,
                     title = &quot;Oops, there were errors during startup!&quot;,
                     text = awesome.startup_errors })
end

-- Handle runtime errors after startup
do
    local in_error = false
    awesome.add_signal(&quot;debug::error&quot;, function (err)
        -- Make sure we don&#039;t go into an endless error loop
        if in_error then return end
        in_error = true

        naughty.notify({ preset = naughty.config.presets.critical,
                         title = &quot;Oops, an error happened!&quot;,
                         text = err })
        in_error = false
    end)
end
-- }}}

-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
--beautiful.init(&quot;/usr/share/awesome/themes/default/theme.lua&quot;)
beautiful.init(&quot;/home/laurent/.config/awesome/themes/default/theme.lua&quot;)

-- This is used later as the default terminal and editor to run.
terminal = &quot;x-terminal-emulator&quot;
editor = os.getenv(&quot;EDITOR&quot;) or &quot;editor&quot;
editor_cmd = terminal .. &quot; -e &quot; .. editor

-- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt.
-- If you do not like this or do not have such a key,
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
-- However, you can use another modifier like Mod1, but it may interact with others.
modkey = &quot;Mod4&quot;

-- Table of layouts to cover with awful.layout.inc, order matters.
layouts =
{
    awful.layout.suit.floating,
    awful.layout.suit.tile,
    awful.layout.suit.tile.left,
    awful.layout.suit.tile.bottom,
    awful.layout.suit.tile.top,
    awful.layout.suit.fair,
    awful.layout.suit.fair.horizontal,
    awful.layout.suit.spiral,
    awful.layout.suit.spiral.dwindle,
    awful.layout.suit.max,
    awful.layout.suit.max.fullscreen,
    awful.layout.suit.magnifier
}
-- }}}

-- {{{ Tags
-- Define a tag table which hold all screen tags.
tags = {}
for s = 1, screen.count() do
    -- Each screen has its own tag table.
    tags[s] = awful.tag({ &quot;Principal&quot;, &quot;Internet&quot;, &quot;Musique&quot;,&quot;Python&quot; ,&quot;Shell&quot;,&quot;PHP&quot;, 7, 8, 9}, s, layouts[2])
end
-- }}}

-- {{{ Menu
-- Create a laucher widget and a main menu
myawesomemenu = {
   { &quot;manual&quot;, terminal .. &quot; -e man awesome&quot; },
   { &quot;edit config&quot;, editor_cmd .. &quot; &quot; .. awesome.conffile },
   { &quot;restart&quot;, awesome.restart },
   { &quot;quit&quot;, awesome.quit }
}

mymainmenu = awful.menu({ items = { { &quot;awesome&quot;, myawesomemenu, beautiful.awesome_icon },
                                    { &quot;Debian&quot;, debian.menu.Debian_menu.Debian },
                                    { &quot;open terminal&quot;, terminal }
                                  }
                        })

mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
                                     menu = mymainmenu })
-- }}}

-- {{{ Wibox
-- Create a textclock widget
--mytextclock = awful.widget.textclock({ align = &quot;right&quot; })
os.setlocale(&quot;fr_FR.UTF-8&quot;) -- Français
mytextclock = awful.widget.textclock({ align = &quot;right&quot; },&quot; %a %d %b  %H:%M &quot;)
-- Create a systray
mysystray = widget({ type = &quot;systray&quot; })

-- Create a wibox for each screen and add it
mywibox = {}
mypromptbox = {}
mylayoutbox = {}
mytaglist = {}
mytaglist.buttons = awful.util.table.join(
                    awful.button({ }, 1, awful.tag.viewonly),
                    awful.button({ modkey }, 1, awful.client.movetotag),
                    awful.button({ }, 3, awful.tag.viewtoggle),
                    awful.button({ modkey }, 3, awful.client.toggletag),
                    awful.button({ }, 4, awful.tag.viewnext),
                    awful.button({ }, 5, awful.tag.viewprev)
                    )
mytasklist = {}
mytasklist.buttons = awful.util.table.join(
                     awful.button({ }, 1, function (c)
                                              if c == client.focus then
                                                  c.minimized = true
                                              else
                                                  if not c:isvisible() then
                                                      awful.tag.viewonly(c:tags()[1])
                                                  end
                                                  -- This will also un-minimize
                                                  -- the client, if needed
                                                  client.focus = c
                                                  c:raise()
                                              end
                                          end),
                     awful.button({ }, 3, function ()
                                              if instance then
                                                  instance:hide()
                                                  instance = nil
                                              else
                                                  instance = awful.menu.clients({ width=250 })
                                              end
                                          end),
                     awful.button({ }, 4, function ()
                                              awful.client.focus.byidx(1)
                                              if client.focus then client.focus:raise() end
                                          end),
                     awful.button({ }, 5, function ()
                                              awful.client.focus.byidx(-1)
                                              if client.focus then client.focus:raise() end
                                          end))

for s = 1, screen.count() do
    -- Create a promptbox for each screen
    mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
    -- Create an imagebox widget which will contains an icon indicating which layout we&#039;re using.
    -- We need one layoutbox per screen.
    mylayoutbox[s] = awful.widget.layoutbox(s)
    mylayoutbox[s]:buttons(awful.util.table.join(
                           awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
                           awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
                           awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
                           awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
    -- Create a taglist widget
    mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)

    -- Create a tasklist widget
    mytasklist[s] = awful.widget.tasklist(function(c)
                                              return awful.widget.tasklist.label.currenttags(c, s)
                                          end, mytasklist.buttons)

    -- Create the wibox
    mywibox[s] = awful.wibox({ position = &quot;top&quot;, screen = s })
    -- Add widgets to the wibox - order matters
    mywibox[s].widgets = {
        {
            mylauncher,
            mytaglist[s],
            mypromptbox[s],
            layout = awful.widget.layout.horizontal.leftright
        },
        mylayoutbox[s],
        mytextclock,
        s == 1 and mysystray or nil,
        mytasklist[s],
        layout = awful.widget.layout.horizontal.rightleft
    }
end
-- }}}

-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
    awful.button({ }, 3, function () mymainmenu:toggle() end),
    awful.button({ }, 4, awful.tag.viewnext),
    awful.button({ }, 5, awful.tag.viewprev)
))
-- }}}

-- {{{ Key bindings
globalkeys = awful.util.table.join(
    awful.key({ modkey,           }, &quot;Left&quot;,   awful.tag.viewprev       ),
    awful.key({ modkey,           }, &quot;Right&quot;,  awful.tag.viewnext       ),
    awful.key({ modkey,           }, &quot;Escape&quot;, awful.tag.history.restore),

    awful.key({ modkey,           }, &quot;j&quot;,
        function ()
            awful.client.focus.byidx( 1)
            if client.focus then client.focus:raise() end
        end),
    awful.key({ modkey,           }, &quot;k&quot;,
        function ()
            awful.client.focus.byidx(-1)
            if client.focus then client.focus:raise() end
        end),
    awful.key({ modkey,           }, &quot;w&quot;, function () mymainmenu:show({keygrabber=true}) end),

    -- Layout manipulation
    awful.key({ modkey, &quot;Shift&quot;   }, &quot;j&quot;, function () awful.client.swap.byidx(  1)    end),
    awful.key({ modkey, &quot;Shift&quot;   }, &quot;k&quot;, function () awful.client.swap.byidx( -1)    end),
    awful.key({ modkey, &quot;Control&quot; }, &quot;j&quot;, function () awful.screen.focus_relative( 1) end),
    awful.key({ modkey, &quot;Control&quot; }, &quot;k&quot;, function () awful.screen.focus_relative(-1) end),
    awful.key({ modkey,           }, &quot;u&quot;, awful.client.urgent.jumpto),
    awful.key({ modkey,           }, &quot;Tab&quot;,
        function ()
            awful.client.focus.history.previous()
            if client.focus then
                client.focus:raise()
            end
        end),

    -- Standard program
    awful.key({ modkey,           }, &quot;Return&quot;, function () awful.util.spawn(terminal) end),
    awful.key({ modkey, &quot;Control&quot; }, &quot;r&quot;, awesome.restart),
    awful.key({ modkey, &quot;Shift&quot;   }, &quot;q&quot;, awesome.quit),

    awful.key({ modkey,           }, &quot;l&quot;,     function () awful.tag.incmwfact( 0.05)    end),
    awful.key({ modkey,           }, &quot;h&quot;,     function () awful.tag.incmwfact(-0.05)    end),
    awful.key({ modkey, &quot;Shift&quot;   }, &quot;h&quot;,     function () awful.tag.incnmaster( 1)      end),
    awful.key({ modkey, &quot;Shift&quot;   }, &quot;l&quot;,     function () awful.tag.incnmaster(-1)      end),
    awful.key({ modkey, &quot;Control&quot; }, &quot;h&quot;,     function () awful.tag.incncol( 1)         end),
    awful.key({ modkey, &quot;Control&quot; }, &quot;l&quot;,     function () awful.tag.incncol(-1)         end),
    awful.key({ modkey,           }, &quot;space&quot;, function () awful.layout.inc(layouts,  1) end),
    awful.key({ modkey, &quot;Shift&quot;   }, &quot;space&quot;, function () awful.layout.inc(layouts, -1) end),

    awful.key({ modkey, &quot;Control&quot; }, &quot;n&quot;, awful.client.restore),

    -- Prompt
    awful.key({ modkey },            &quot;r&quot;,     function () mypromptbox[mouse.screen]:run() end),

    awful.key({ modkey }, &quot;x&quot;,
              function ()
                  awful.prompt.run({ prompt = &quot;Run Lua code: &quot; },
                  mypromptbox[mouse.screen].widget,
                  awful.util.eval, nil,
                  awful.util.getdir(&quot;cache&quot;) .. &quot;/history_eval&quot;)
              end)
)

clientkeys = awful.util.table.join(
    awful.key({ modkey,           }, &quot;f&quot;,      function (c) c.fullscreen = not c.fullscreen  end),
    awful.key({ modkey, &quot;Shift&quot;   }, &quot;c&quot;,      function (c) c:kill()                         end),
    awful.key({ modkey, &quot;Control&quot; }, &quot;space&quot;,  awful.client.floating.toggle                     ),
    awful.key({ modkey, &quot;Control&quot; }, &quot;Return&quot;, function (c) c:swap(awful.client.getmaster()) end),
    awful.key({ modkey,           }, &quot;o&quot;,      awful.client.movetoscreen                        ),
    awful.key({ modkey, &quot;Shift&quot;   }, &quot;r&quot;,      function (c) c:redraw()                       end),
    awful.key({ modkey,           }, &quot;t&quot;,      function (c) c.ontop = not c.ontop            end),
    awful.key({ modkey,           }, &quot;n&quot;,
        function (c)
            -- The client currently has the input focus, so it cannot be
            -- minimized, since minimized clients can&#039;t have the focus.
            c.minimized = true
        end),
    awful.key({ modkey,           }, &quot;m&quot;,
        function (c)
            c.maximized_horizontal = not c.maximized_horizontal
            c.maximized_vertical   = not c.maximized_vertical
        end)
)

-- Compute the maximum number of digit we need, limited to 9
keynumber = 0
for s = 1, screen.count() do
   keynumber = math.min(9, math.max(#tags[s], keynumber));
end

-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it works on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, keynumber do
    globalkeys = awful.util.table.join(globalkeys,
        awful.key({ modkey }, &quot;#&quot; .. i + 9,
                  function ()
                        local screen = mouse.screen
                        if tags[screen][i] then
                            awful.tag.viewonly(tags[screen][i])
                        end
                  end),
        awful.key({ modkey, &quot;Control&quot; }, &quot;#&quot; .. i + 9,
                  function ()
                      local screen = mouse.screen
                      if tags[screen][i] then
                          awful.tag.viewtoggle(tags[screen][i])
                      end
                  end),
        awful.key({ modkey, &quot;Shift&quot; }, &quot;#&quot; .. i + 9,
                  function ()
                      if client.focus and tags[client.focus.screen][i] then
                          awful.client.movetotag(tags[client.focus.screen][i])
                      end
                  end),
        awful.key({ modkey, &quot;Control&quot;, &quot;Shift&quot; }, &quot;#&quot; .. i + 9,
                  function ()
                      if client.focus and tags[client.focus.screen][i] then
                          awful.client.toggletag(tags[client.focus.screen][i])
                      end
                  end))
end

clientbuttons = awful.util.table.join(
    awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
    awful.button({ modkey }, 1, awful.mouse.client.move),
    awful.button({ modkey }, 3, awful.mouse.client.resize))

-- Set keys
root.keys(globalkeys)
-- }}}

-- {{{ Rules
awful.rules.rules = {
    -- All clients will match this rule.
    { rule = { },
      properties = { border_width = beautiful.border_width,
                     border_color = beautiful.border_normal,
                     focus = true,
                     keys = clientkeys,
                     buttons = clientbuttons } },
    { rule = { class = &quot;MPlayer&quot; },
      properties = { floating = true } },
    { rule = { class = &quot;pinentry&quot; },
      properties = { floating = true } },
    { rule = { class = &quot;gimp&quot; },
      properties = { floating = true } },
    -- Set Firefox to always map on tags number 2 of screen 1.
    -- { rule = { class = &quot;Firefox&quot; },
    --   properties = { tag = tags[1][2] } },
}
-- }}}

-- {{{ Signals
-- Signal function to execute when a new client appears.
client.add_signal(&quot;manage&quot;, function (c, startup)
    -- Add a titlebar
    -- awful.titlebar.add(c, { modkey = modkey })

    -- Enable sloppy focus
    c:add_signal(&quot;mouse::enter&quot;, function(c)
        if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
            and awful.client.focus.filter(c) then
            client.focus = c
        end
    end)

    if not startup then
        -- Set the windows at the slave,
        -- i.e. put it at the end of others instead of setting it master.
        -- awful.client.setslave(c)

        -- Put windows in a smart way, only if they does not set an initial position.
        if not c.size_hints.user_position and not c.size_hints.program_position then
            awful.placement.no_overlap(c)
            awful.placement.no_offscreen(c)
        end
    end
end)

client.add_signal(&quot;focus&quot;, function(c) c.border_color = beautiful.border_focus end)
client.add_signal(&quot;unfocus&quot;, function(c) c.border_color = beautiful.border_normal end)
-- }}}
os.execute(&quot;dropbox start&quot;)</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Detah-Pixel)]]></author>
			<pubDate>Fri, 07 Sep 2012 12:36:13 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10673711#p10673711</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Widget dans Awesome]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10673661#p10673661</link>
			<description><![CDATA[<p>Salut l&#039;pixel mort,</p><p>J&#039;ai utilisé Awesome par le passé (Openbox maintenant) et si y&#039;a bien une chose dont je me souviens : c&#039;est que la syntaxe de config avait tendance à changer tous les deux ou trois updates. Donc ça ne m&#039;étonnerait pas que la page du wiki que tu linkes soit complètement obsolète.</p><p>Mon conseil : lire la doc anglophone, souvent plus à jour.<br />Lire la doc officielle, y&#039;a souvent pas mieux.<br />Tu trouveras plein d&#039;autres tutos : <a href="https://www.google.fr/search?q=awesome+wm+widget+battery">https://www.google.fr/search?q=awesome+ … et+battery</a><br />Essaie-en un autre <img src="http://forum.ubuntu-fr.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>@+<br />~ktr</p>]]></description>
			<author><![CDATA[dummy@example.com (Kooothor)]]></author>
			<pubDate>Fri, 07 Sep 2012 12:33:07 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10673661#p10673661</guid>
		</item>
		<item>
			<title><![CDATA[Widget dans Awesome]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10673551#p10673551</link>
			<description><![CDATA[<p>Bonjour à tous,<br />Je me permet de vous écrire car je suis un peu bloqué au niveau de awesome.<br />Je me permet pour commencer de vous mettre mon fichier rc.lua :</p><div class="codebox"><pre class="vscroll"><code>  
1 -- Standard awesome library
  2 require(&quot;awful&quot;)
  3 require(&quot;awful.autofocus&quot;)
  4 require(&quot;awful.rules&quot;)
  5 -- Theme handling library
  6 require(&quot;beautiful&quot;)
  7 -- Notification library
  8 require(&quot;naughty&quot;)
  8&#039; require(&quot;precious.battery&quot;)
  9 
 10 -- Load Debian menu entries
 11 require(&quot;debian.menu&quot;)
 12 -- {{{ Error handling
 13 -- Check if awesome encountered an error during startup and fell back to
 14 -- another config (This code will only ever execute for the fallback config)
 15 if awesome.startup_errors then
 16     naughty.notify({ preset = naughty.config.presets.critical,
 17                      title = &quot;Oops, there were errors during startup!&quot;,
 18                      text = awesome.startup_errors })
 19 end
 20 
 21 -- Handle runtime errors after startup
 22 do
 23     local in_error = false
 24     awesome.add_signal(&quot;debug::error&quot;, function (err)
 25         -- Make sure we don&#039;t go into an endless error loop
 26         if in_error then return end
 27         in_error = true
 28 
 29         naughty.notify({ preset = naughty.config.presets.critical,
 30                          title = &quot;Oops, an error happened!&quot;,
 31                          text = err })
 32         in_error = false
 33     end)
 34 end
 35 -- }}}
 36 
 37 -- {{{ Variable definitions
 38 -- Themes define colours, icons, and wallpapers
 39 --beautiful.init(&quot;/usr/share/awesome/themes/default/theme.lua&quot;)
 40 beautiful.init(&quot;/home/laurent/.config/awesome/themes/default/theme.lua&quot;)
&quot;rc.lua&quot; 379L, 15676C                                             1,1          Haut</code></pre></div><p>Voila, comme je le déclare en ligne 8&#039;(j&#039;ai ajouté cette ligne à la main à la seconde même :-)) j&#039;aimerai utiliser le widget de batterie présenté ici : <a href="http://doc.ubuntu-fr.org/awesome">Widget Awesome</a>. Cependant et après de multiple essais, je n&#039;arrive pas à juste ajouter un affichage du niveau de la batterie à la gauche de l&#039;heure (située elle même en haut à droite.)<br />Pouvez vous reprendre mon rc.lua et le modifier dans ce but ? Et si possible m&#039;expliquer pour m&#039;éclairer quelque peu et que je puisse sans aide extérieure continuer à modifier mon awesome ?<br />Merci beaucoup<br />Death-Pixel</p>]]></description>
			<author><![CDATA[dummy@example.com (Detah-Pixel)]]></author>
			<pubDate>Fri, 07 Sep 2012 12:26:58 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10673551#p10673551</guid>
		</item>
	</channel>
</rss>
