You are not logged in.
I've been using openbox for a while and now I'm going to try a tiling wm. I've already decided, how I'd like to organize my windows, so, I'm now looking for a tiling wm, which can do that with least effort.
I've started with "awesome". It looks nice, features a good panel and handy keyboard shortcuts, but I failed to do a couple of things, and I'm asking for help.
The first app to configure is gimp. So, there'll be a "gimp" tag. When gimp is started I'd like the toolbars to be docked to the left and right (well, both to the left or both to the right will also do), and the "workspace" to be maximized in the middle. The desired layout is as follows:
The same thing for chatting. So, a separate tag: "chat". I'd like to have pidgin contact list window docked to the left (or right - does not matter). Free space should be occupied by a maximized irc client or pidgin dialog window. So, when I switch between the windows, pidgin contact list always stays docked to the left and irc client, pidgin dialog and etc are switched in the rest of the screen.
Can I achieve this with awesome? Or any other tiling wm?
Offline
You need to look into the lua in rc.lua (~/.config/awesome/rc.lua). There you will find a hook that is run when a new app is registered for management with awesome (the Manage Hook). In this hook, you can apply any amount of customization, based on information about the app. So, you can place place specific apps on specific tags, size windows to certain dimensions, etc etc... In the default rc.lua the only arrangements being made are floating and tagging, but should be faily simple to expand on the syntax to include sizing. If you do need any help, I can post a rather involved manage hook, that will allow you to set up several rules per app.
So, yes, It can be accomplished.
.]
Offline
In xmonad you can achieve both thing with the IM layout (http://xmonad.org/xmonad-docs/xmonad-co … ut-IM.html). For chatting this should be quite straightforward, for the gimp have a look at http://nathanhowell.net/2009/03/08/xmonad-and-the-gimp/.
Offline
In xmonad you can achieve both thing with the IM layout (http://xmonad.org/xmonad-docs/xmonad-co … ut-IM.html). For chatting this should be quite straightforward, for the gimp have a look at http://nathanhowell.net/2009/03/08/xmonad-and-the-gimp/.
Thanks. I'll try xmonad as well... Wait it it haskell in your config?
Last edited by Mr.Cat (2009-08-17 15:09:25)
Offline
davvil wrote:In xmonad you can achieve both thing with the IM layout (http://xmonad.org/xmonad-docs/xmonad-co … ut-IM.html). For chatting this should be quite straightforward, for the gimp have a look at http://nathanhowell.net/2009/03/08/xmonad-and-the-gimp/.
Thanks. I'll try xmonad as well... Wait it it haskell in your config?
Yes, the whole configuration is in reality a haskell program. However you do not need to know haskell to configure it. I did not know it when I started using it, now I am learning a bit of it. The documentation is really good and by browsing it and taking code snippets from here and there you can achieve a high degree of customization. Of course, for more "advanced" stuff it is better if you know the language.
Offline
You need to look into the lua in rc.lua (~/.config/awesome/rc.lua)
That's the first thing I did, but I failed to achieve desired layout. For gimp I could just resize the windons, but that won't do for messengers, since I want the contact list window to be docked and always visible, while other windows should be stacked in the rest of the screen. I'm quite confused with the docs. It would be great if you could show me the right direction to search ar posted an example of how a complex layout isdone in rc.lua, like davvil did.
Xmonad's IM layout from davvil's post seems to do the right thing, so now my question is "is there a way to get something like IM layout in awesome".
Offline
"is there a way to get something like IM layout in awesome".
It depends. As far as I can understand from your description, you want to reserve a particular slot on the screen for the contact list manager, and then have x windows use the remain in space to tile. In my experience, this is not readily availabe in awesome (the problem would be "reserving" this space for a specific window). There might be a layout out there that does it, so either wait around and see if someone here mentions it, or pop on #awesome on oftc.
As for an example of how to have your manage hook here is some edited snippets from mine:
-- the following is some base config required for this sample to make sense,
-- and an example of the table that contains configurations for apps
base = {}
base.rule = {}
-- should clients float by default?
base.rule.float = false
-- should clients honor sizehints
base.rule.sizehints = false
-- define tags
tags = {}
tags.settings = {
{ name = "work", layout = 3 },
{ name = "surf" },
{ name = "design", layout = 3 },
{ name = "talk", layout = 4 },
{ name = "bluff", layout = 4 },
}
apps = {}
apps.rules = {
{
class = "Uzbl",
float = true,
size = {width = 800, height = 600},
place = "center",
tag = "web",
},
{
class = "Gimp",
float = true,
role = "gimp-image-window",
size = {width = 881, height = 760, x = 177, y = 30},
},
{
class = "Gimp",
float = true,
type = "dialog",
size = {x = 239, y = 122},
},
{
class = "Gimp",
float = true,
role = "gimp-toolbox",
size = {width = 175, height = 760, x = 2, y = 30},
},
{
class = "Gimp",
float = true,
role = "gimp-dock",
size = {width = 220, height = 760, x = 1058, y = 30},
},
}
-- here is the part of my manage hook where i apply the above rules
awful.hooks.manage.register(function (c)
-- [ snip default border setup etc...]
-- inherit base rules
local rule_float = base.rule.float
local rule_screen = mouse.screen
-- this means that by default we tag a new client
-- with the current selected tags
local rule_tag = "current"
local rule_size = nil
local rule_place = nil
-- check app rules for clients that match (basically we are checking class name, instance name, role, type or app name)
for index, rule in pairs(apps.rules) do
if (((rule.class == nil) or (c.class and c.class == rule.class))
and ((rule.instance == nil) or (c.instance and c.instance == rule.instance))
and ((rule.role == nil) or (c.role and c.role == rule.role))
and ((rule.type == nil) or (c.type and c.type == rule.type))
and ((rule.name == nil) or (c.name and string.find(c.name, rule.name, 1, true)))) then
-- override default rules if we have a client that matches
if rule.float ~= nil then rule_float = rule.float end
if rule.screen ~= nil then rule_screen = rule.screen end
if rule.tag ~= nil then rule_tag = rule.tag end
if rule.size ~= nil then rule_size = rule.size end
if rule.place ~= nil then rule_place = rule.place end
end
end
-- then we apply the rules
if rule_float then
awful.client.floating.set(c, true)
end
if rule_size then
c:geometry(rule_size)
end
if rule_place and rule_float then
if rule_place == "center" then
awful.placement.centered(c)
elseif rule_place == "mouse" then
awful.placement.under_mouse(c)
end
end
if rule_screen then
c.screen = rule_screen
end
if rule_tag then
if rule_tag == "current" then
awful.tag.withcurrent(c)
else
local target = rule_tag
if type(rule_tag) == 'string' then
-- loop through our taglist, and check if we have a
-- tag with said name. Else we set the tag to 1
for i, v in ipairs(tags.settings) do
if v.name == rule_tag then
target = i
break
else
target = 1
end
end
end
awful.client.movetotag(tags[rule_screen][target], c)
end
end
-- [ snip end ]
end)
If you can follow that, you can see that you can create practically any management scheme you like. This is only a selection of functionality of my own manage hook. In reality I am checking to add toolbars, to focus or not focus, and so on. Anything awesome can do with a window can be triggered in the manage hook base on some configuration you provide. I hope that helps (and not scares away). Either way, have fun configuring your WM, be it using lua or haskell (both excellent languages).
.]
Offline
As far as I can understand from your description, you want to reserve a particular slot on the screen for the contact list manager, and then have x windows use the remain in space to tile.
Yes.
And thanks for your help.
Offline