You are not logged in.

#1 2009-03-20 18:36:09

Shapeshifter
Member
Registered: 2008-03-11
Posts: 230

Two awesome questions

I tried googling and asking in #awesome on oftc.net but couldn't find any answers.

A) How can I set a window "sticky" so that it is part of all tags?

B) How can I set fixed width/height on a window? What about fixed placement?

and btw, is there some way to disable "incremental" resizing in urxvt?

Offline

#2 2009-03-20 18:53:28

jsgt
Member
Registered: 2009-03-16
Posts: 29

Re: Two awesome questions

Assuming you're using Awesome 3, you could write something along the lines of:

if c.name:find( "app name" ) then
  for s = 1, screen.count( ) do
    for t = 1, 9 do
      awful.client.toggletag( tags[ s ][ t ], c )
    end
  end
end

in the function that gets passed to awful.hooks.manage.register in your rc.lua file to make a window "sticky". I haven't tested the code so I don't know if it works (I'm quite new to Lua) but hopefully it does...

Offline

#3 2009-03-20 20:04:24

Shapeshifter
Member
Registered: 2008-03-11
Posts: 230

Re: Two awesome questions

thanks for the sample code! smile

edit: (forget what I said before if you read it)
actually, this works okay apart from the fact that it toggles, so that it appears on all other tags but disappears from the current tag. I did it like this binding it to a hot key:

keybinding({ modkey }, "s", function () 
    for s = 1, screen.count( ) do
        for t = 1, 8 do
            awful.client.toggletag ( tags[ s ][ t ], c )
        end
    end
end):add()

I guess I can fix the toggle part, there are enough samples of that in the config already. I'll post when I have a solution.

Any ideas about the fixed width thing?

Last edited by Shapeshifter (2009-03-20 20:12:38)

Offline

#4 2009-03-20 20:36:13

jsgt
Member
Registered: 2009-03-16
Posts: 29

Re: Two awesome questions

You can use the client.tags function (see capi in the API docs) to find out which tag the client starts out on, and then toggle all tags except that one.

Are you running tiling or floating mode? If you're tiling and know where your client will be placed, you can use the awful.tag.setmwfact function (make sure you know if your client is placed in the master column or not). If your layout is floating, you can simply use client.geometry.

And about the incremental sizing of rxvt, there is AFAIK no way to resize it by pixel. There is a way, however, to disable gaps between clients in Awesomes tiling mode (client.honorsizehints).

Offline

#5 2009-03-20 21:20:28

Shapeshifter
Member
Registered: 2008-03-11
Posts: 230

Re: Two awesome questions

Yep. This works for toggling sticky:

keybinding({ modkey }, "s", function ()
    for s = 1, screen.count( ) do
        tagtable = screen[s]:tags()
        for k,t in pairs(tagtable) do
            if t ~= awful.tag.selected() then
                awful.client.toggletag ( t, c )
            end
        end
    end
end):add()

Neat.
Now on to the fixed size thing. I'll edit this post once I have it. smile

Offline

#6 2009-03-20 21:24:55

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: Two awesome questions

Shapeshifter wrote:

A) How can I set a window "sticky" so that it is part of all tags?

B) How can I set fixed width/height on a window? What about fixed placement?

a) key({ modkey, "Shift" }, "0",   function (c) c.sticky = not c.sticky end),

b) if c.class == "MyApp" then c:geometry({ x = XXXX, y = YYY }) end


You need to install an RTFM interface.

Offline

Board footer

Powered by FluxBB