[Awesome] réduire fenêtre (résolu)

Xorg, Compiz, KDE / Gnome / Xfce / Fluxbox / e17 / fvwm ... GDM/KDM/XDM...
Avatar de l’utilisateur
Gr3e
yeomen
Messages : 255
Inscription : dim. 11 janv. 2009, 19:23
Localisation : Dans la montagne

[Awesome] réduire fenêtre (résolu)

Message par Gr3e »

Bonjour, j'ai installé awesome - n'étant pas pleinement satisfait de xfce4 -
J'ai un peu pompé le dotfiles de rolinh en modifiant le thème et deux trois petites choses, je suis tout à fait comblé MAIS ! je n'arrive pas a faire fonctionner tous les raccourcis clavier :(

Code : Tout sélectionner

-- {{{ 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,           }, "Left",   awful.tag.viewprev       ),
    awful.key({ modkey,           }, "Right",  awful.tag.viewnext       ),
    awful.key({ modkey,           }, "Escape", awful.tag.history.restore),
 
    awful.key({ modkey,           }, "j",
        function ()
            awful.client.focus.byidx( 1)
            if client.focus then client.focus:raise() end
        end),
    awful.key({ modkey,           }, "k",
        function ()
            awful.client.focus.byidx(-1)
            if client.focus then client.focus:raise() end
        end),
    awful.key({ modkey,           }, "w", function () mymainmenu:show(true)        end),
 
    -- Multimedia keys
    awful.key({ }, "XF86AudioRaiseVolume", function () volume("up", tb_volume) end),
    awful.key({ }, "XF86AudioLowerVolume", function () volume("down", tb_volume) end),
    awful.key({ }, "XF86AudioMute", function () volume("mute", tb_volume) end),
    awful.key({ }, "XF86AudioNext", function () cmus_control("next") end),
    awful.key({ }, "XF86AudioPrev", function () cmus_control("previous") end),
    awful.key({ }, "XF86AudioStop", function () cmus_control("stop") end),
    awful.key({ }, "XF86AudioPlay", function () cmus_control("play_pause") end),
 
    -- Layout manipulation
    awful.key({ modkey, "Shift"   }, "j", function () awful.client.swap.byidx(  1)    end),
    awful.key({ modkey, "Shift"   }, "k", function () awful.client.swap.byidx( -1)    end),
    awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
    awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
    awful.key({ modkey,           }, "u", awful.client.urgent.jumpto),
    awful.key({ modkey,           }, "Tab",
        function ()
            awful.client.focus.history.previous()
            if client.focus then
                client.focus:raise()
            end
        end),
 
    -- Standard program
    awful.key({ modkey,           }, "Return", function () awful.util.spawn(terminal) end),
    awful.key({ modkey, "Control" }, "r", awesome.restart),
    awful.key({ modkey, "Shift"   }, "q", awesome.quit),
 
    awful.key({ modkey,           }, "l",     function () awful.tag.incmwfact( 0.05)    end),
    awful.key({ modkey,           }, "h",     function () awful.tag.incmwfact(-0.05)    end),
    awful.key({ modkey, "Shift"   }, "h",     function () awful.tag.incnmaster( 1)      end),
    awful.key({ modkey, "Shift"   }, "l",     function () awful.tag.incnmaster(-1)      end),
    awful.key({ modkey, "Control" }, "h",     function () awful.tag.incncol( 1)         end),
    awful.key({ modkey, "Control" }, "l",     function () awful.tag.incncol(-1)         end),
    awful.key({ modkey,           }, "space", function () awful.layout.inc(layouts,  1) end),
    awful.key({ modkey, "Shift"   }, "space", function () awful.layout.inc(layouts, -1) end),
 
    -- Prompt
    awful.key({ modkey },            "r",     function () mypromptbox[mouse.screen]:run() end),
 
    awful.key({ modkey }, "x",
              function ()
                  awful.prompt.run({ prompt = "Run Lua code: " },
                  mypromptbox[mouse.screen].widget,
                  awful.util.eval, nil,
                  awful.util.getdir("cache") .. "/history_eval")
              end),
 
    -- A simple calculator
    awful.key({ modkey }, "c", function ()
                awful.prompt.run({ prompt = "Calculate: " }, mypromptbox[mouse.screen].widget,
                        function (expr)
                                result = awful.util.eval("return (" .. expr .. ")")
                naughty.notify({text = expr .. ' = <span color="white">' .. result .. "</span>",
                            timeout = 10,
                            position = "top_left" })
            end)
        end)
)
 
clientkeys = awful.util.table.join(
    awful.key({ modkey,           }, "f",      function (c) c.fullscreen = not c.fullscreen  end),
    awful.key({ modkey, "Shift"   }, "c",      function (c) c:kill()                         end),
    awful.key({ modkey, "Control" }, "space",  awful.client.floating.toggle                     ),
    awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
    awful.key({ modkey,           }, "o",      awful.client.movetoscreen                        ),
    awful.key({ modkey, "Shift"   }, "r",      function (c) c:redraw()                       end),
    awful.key({ modkey,           }, "n",      function (c) c.minimized = not c.minimized    end),
    awful.key({ modkey,           }, "m",
        function (c)
            c.maximized_horizontal = not c.maximized_horizontal
            c.maximized_vertical   = not c.maximized_vertical
        end)--[[,
        awful.key({ modkey, "Shift"   }, "Left",
                function (c)
                        local curidx = awful.tag.getidx(c:tags()[1])
                        if curidx == 1 then
                                c:tags({screen[mouse.screen]:tags()[6]})
                        else
                                c:tags({screen[mouse.screen]:tags()[curidx - 1]})
                        end
                end),
        awful.key({ modkey, "Shift"   }, "Right",
                function (c)
                        local curidx = awful.tag.getidx(c:tags()[1])
                        if curidx == 6 then
                                c:tags({screen[mouse.screen]:tags()[1]})
                        else
                                c:tags({screen[mouse.screen]:tags()[curidx + 1]})
                        end
                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 }, "#" .. i + 9,
                  function ()
                        local screen = mouse.screen
                        if tags[screen][i] then
                            awful.tag.viewonly(tags[screen][i])
                        end
                  end),
        awful.key({ modkey, "Control" }, "#" .. i + 9,
                  function ()
                      local screen = mouse.screen
                      if tags[screen][i] then
                          awful.tag.viewtoggle(tags[screen][i])
                      end
                  end),
        awful.key({ modkey, "Shift" }, "#" .. 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, "Control", "Shift" }, "#" .. 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)
-- }}}
 

Eh bien par exemple, en faisant Mod + n je suis censé minimiser une fenêtre, eh bien que nenni !
J'ai lu que awesome était préconfiguré pour avoir le clavier en querty j'imagine que c'est ce qui pose problème mais alors comment faire ? !

Edit : Enfait c'est les raccourcis contenus dans la rubrique clientkeys qui ne fonctionnent pas :p
Des idées ? ;)
Dernière modification par Gr3e le sam. 02 juin 2012, 15:43, modifié 1 fois.
Less is more
La perfection n'est pas atteinte quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher
"On fait des boulots qu'on déteste pour se payer des merdes qui nous servent à rien"
Avatar de l’utilisateur
MrMen
Chu Ko Nu
Messages : 479
Inscription : sam. 11 juil. 2009, 14:33
Localisation : (33)

Re: [Awesome] réduire fenêtre

Message par MrMen »

Salut, pour ton problème de langue, si tu a un clavier fr, la touche n correspond bien au n pas de soucis.
Si je comprends bien, tu ne peux donc pas non plus fermer de fenêtre avec Mod+Shift+C. Bizarre.
Excepté le fait qu'il semble y avoir une erreur dans ton rc.lua :

Code : Tout sélectionner

    awful.key({ modkey,           }, "m",
        function (c)
            c.maximized_horizontal = not c.maximized_horizontal
            c.maximized_vertical   = not c.maximized_vertical
        end)--[[,
devrait être

Code : Tout sélectionner

   awful.key({ modkey,           }, "m",
        function (c)
            c.maximized_horizontal = not c.maximized_horizontal
            c.maximized_vertical   = not c.maximized_vertical
        end),--[[,
Teste ça pour voir déjà. Si ça ne marche toujours, regarde sur le wiki à propos de Xephyr : ça permet de débuggé le rc.lua plus facilement.
Arch 64 | Awesome | Zsh | Bépo
Avatar de l’utilisateur
Gr3e
yeomen
Messages : 255
Inscription : dim. 11 janv. 2009, 19:23
Localisation : Dans la montagne

Re: [Awesome] réduire fenêtre

Message par Gr3e »

Résolu, erreur de syntaxe dans le rules.lua finalement, donc je n'avais pas mis les ressources nécessaires à votre disposition pour que vous puissiez trouver !!
Merci
Less is more
La perfection n'est pas atteinte quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher
"On fait des boulots qu'on déteste pour se payer des merdes qui nous servent à rien"
Avatar de l’utilisateur
cdemoulins
Chu Ko Nu
Messages : 310
Inscription : mar. 11 mars 2008, 04:15
Localisation : Paris

Re: [Awesome] réduire fenêtre (résolu)

Message par cdemoulins »

Pour éviter ce genre de problème, il faut avoir le réflexe :

Code : Tout sélectionner

awesome -k ~/.config/awesome/rc.lua
Répondre