Talk:Shifty
patch against shifty master to make tag creating/renaming work with latest awesome
--- shifty.lua.orig 2010-08-11 10:24:15.000000000 +0300
+++ shifty.lua 2010-08-11 10:26:26.000000000 +0300
@@ -106,7 +106,7 @@
awful.prompt.run( {
fg_cursor = fg, bg_cursor = bg, ul_cursor = "single",
text = text, selectall = not no_selectall },
- taglist[scr][tag2index(scr,t)][1],
+ taglist[scr][tag2index(scr,t) * 2],
function (name) if name:len() > 0 then t.name = name; end end,
completion,
awful.util.getdir("cache") .. "/history_tags", nil,
patch against shifty master to use recent matching routines from awful.rules
--- shifty.lua.orig 2011-08-16 17:05:04.259371348 +0200
+++ shifty.lua 2011-08-16 19:24:52.680501656 +0200
@@ -407,54 +407,44 @@
-- try matching client to config.apps
for i, a in ipairs(config.apps) do
- if a.match then
- for k, w in ipairs(a.match) do
- if
- (cls and cls:find(w)) or
- (inst and inst:find(w)) or
- (name and name:find(w)) or
- (role and role:find(w)) or
- (typ and typ:find(w))
- then
- if a.screen then target_screen = a.screen end
- if a.tag then
- if type(a.tag) == "string" then
- target_tag_names = { a.tag }
- else
- target_tag_names = a.tag
- end
- end
- if a.startup and startup then a = awful.util.table.join(a, a.startup) end
- if a.geometry ~=nil then geom = { x = a.geometry[1], y = a.geometry[2], width = a.geometry[3], height = a.geometry[4] } end
- if a.float ~= nil then float = a.float end
- if a.slave ~=nil then slave = a.slave end
- if a.border_width ~= nil then c.border_width = a.border_width end
- if a.nopopup ~=nil then nopopup = a.nopopup end
- if a.intrusive ~=nil then intrusive = a.intrusive end
- if a.fullscreen ~=nil then c.fullscreen = a.fullscreen end
- if a.honorsizehints ~=nil then c.size_hints_honor = a.honorsizehints end
- if a.kill ~=nil then c:kill(); return end
- if a.ontop ~= nil then c.ontop = a.ontop end
- if a.above ~= nil then c.above = a.above end
- if a.below ~= nil then c.below = a.below end
- if a.buttons ~= nil then c:buttons(a.buttons) end
- if a.nofocus ~= nil then nofocus = a.nofocus end
- if a.keys ~= nil then keys = awful.util.table.join(keys, a.keys) end
- if a.hidden ~= nil then c.hidden = a.hidden end
- if a.minimized ~= nil then c.minimized = a.minimized end
- if a.dockable ~= nil then awful.client.dockable.set(c, a.dockable) end
- if a.urgent ~= nil then c.urgent = a.urgent end
- if a.opacity ~= nil then c.opacity = a.opacity end
- if a.run ~= nil then run = a.run end
- if a.sticky ~= nil then c.sticky = a.sticky end
- if a.wfact ~= nil then wfact = a.wfact end
- if a.struts then struts = a.struts end
- if a.skip_taskbar ~= nil then c.skip_taskbar = a.skip_taskbar end
- if a.props then
- for kk, vv in pairs(a.props) do awful.client.property.set(c, kk, vv) end
- end
+ if awful.rules.match(c, a.match) or awful.rules.match_any(c, a.match_any) then
+ if a.screen then target_screen = a.screen end
+ if a.tag then
+ if type(a.tag) == "string" then
+ target_tag_names = { a.tag }
+ else
+ target_tag_names = a.tag
end
end
+ if a.startup and startup then a = awful.util.table.join(a, a.startup) end
+ if a.geometry ~=nil then geom = { x = a.geometry[1], y = a.geometry[2], width = a.geometry[3], height = a.geometry[4] } end
+ if a.float ~= nil then float = a.float end
+ if a.slave ~=nil then slave = a.slave end
+ if a.border_width ~= nil then c.border_width = a.border_width end
+ if a.nopopup ~=nil then nopopup = a.nopopup end
+ if a.intrusive ~=nil then intrusive = a.intrusive end
+ if a.fullscreen ~=nil then c.fullscreen = a.fullscreen end
+ if a.honorsizehints ~=nil then c.size_hints_honor = a.honorsizehints end
+ if a.kill ~=nil then c:kill(); return end
+ if a.ontop ~= nil then c.ontop = a.ontop end
+ if a.above ~= nil then c.above = a.above end
+ if a.below ~= nil then c.below = a.below end
+ if a.buttons ~= nil then c:buttons(a.buttons) end
+ if a.nofocus ~= nil then nofocus = a.nofocus end
+ if a.keys ~= nil then keys = awful.util.table.join(keys, a.keys) end
+ if a.hidden ~= nil then c.hidden = a.hidden end
+ if a.minimized ~= nil then c.minimized = a.minimized end
+ if a.dockable ~= nil then awful.client.dockable.set(c, a.dockable) end
+ if a.urgent ~= nil then c.urgent = a.urgent end
+ if a.opacity ~= nil then c.opacity = a.opacity end
+ if a.run ~= nil then run = a.run end
+ if a.sticky ~= nil then c.sticky = a.sticky end
+ if a.wfact ~= nil then wfact = a.wfact end
+ if a.struts then struts = a.struts end
+ if a.skip_taskbar ~= nil then c.skip_taskbar = a.skip_taskbar end
+ if a.props then
+ for kk, vv in pairs(a.props) do awful.client.property.set(c, kk, vv) end
+ end
end
end
@@ -801,4 +791,4 @@
Woju 06:31, 17 August 2011 (CEST)
old devel section
Contents |
DONE
- enable add+rename (mod+t) to use config.tags - requires spliting off tag settings from add() - this will allow mod+t w<tab>(ww)<enter> and you have browser tag (+ spawn="firefox" in config.tags and you have a browser) done!.
- tag add+focus+rename at once causes the prompt not to be initially drawn, currently worked-around by adding '_'
- make getpos() cycle through all existing tags with given position +across screens if feasible done - refocusing across screens currently works only if there's one tag of the position at each screen.
- rename detects first char to see if it's a digit (eg 1:lala) and assign position done
- name completion done
18:05 farhaven: if the active tag is removed, no tag is selected 18:05 koniu: yeah ive noticed that 18:06 farhaven: that is kind of not good if tags get removed by closing clients :P 18:06 koniu: only when you're on first tag and there's nothing in history (no switching)
- make use of awesome-next wonders of awful.tag.{get,set}property():
- shifty is currently compatible with next through a layout-related hack
- should use *property() instead of data[t]
- backport taglist icons to awful.widget
- externalize tags{} (requires screen.tags() usage to reposition)
- this will allow to drop semi-duplicated code from awful.widget
- add 'kill' option to client flags to allow "banning" annoying popups in some applications (qjackctl when closing to tray)
- config.apps to take 'minimize' and 'hide' (i looked into this and focus messes it up, gonna try)
- make shifty enabled version of default rc done
- http://awesome.naquadah.org/bugs/index.php?do=details&task_id=385
- luadoc
TODO
- make client matching something like { match = { class = "Class", inst = "instance", role = "role", title = "window title", geom = "WxH", type }, flags, ... }. also class = "Class" or class = {Class}. this would change config api.
- autonumbering duplicate tags (www1, www2)
- add 'preserve unused' config option to control whether tag that never had clients will be swept up or not.
- make name2tag support multiple tags with same name and return a table instead of first one (?)
- in config.tags make 'screen' into a table allowing sticky tags (?)
- in config.apps make 'tag' into a table allowing matching a client to multiple tags
- allow different completion selection/order in the config
- better wiki with more detailed usage section discussing various approaches possible with shifty
- strictly preconfigured "number" tags by position, maybe created by mod+keynumber, maybe named in config.tags maybe matching certain clients. smart emulation of static approach.
- mixed: selective usage of position and majority of clients mapped to task-based tags
- fully dynamic: - create, rename, reorder and dispose on demand. etc etc
TODO from the file header:
- init: if awesome reloads, some stray tags are initialized (eg urxvt ) but
their properties are left blank
- fix multi-headed setups. i want one set of tags across all monitors, be able to move across any of them on either monitor, combine them from either monitor, etc etc.
---
- awful.tag history is stupid, deleted tags are not removed from history so switching mod+esc after deleting takes to nil tag
Add stophere=true to application matches
Hi there,
I'd like to suggest you add continue=true to allow something like this:
{ match = { "Gvim" }, honorsizehints=false },
{ match = { "codeEditorRole" }, tag="code", stophere=true },
(note the stophere=true) A GVim window with the role "codeEditorRole" would match both rules, but rule matching would stop after the rule with stophere=true.
AndreasKloeckner 22:21, 17 May 2009 (UTC)
Can you say what you'd need/use that for - that would be pretty easy to implement using break, but I'm wondering what benefits you see. Is it for optimization?
--fe57c0f205fe5317b783 01:56, 1 June 2009 (UTC)
allow maximized clients in shifty.config.apps
Hi, currently, it's possible to set many client options via shifty.config.apps: fullscreen, minimized, etc but it's not possible to set a client maximized at startup. Is it possible to add that option, either with:
if a.maximized_horizontal ~=nil then c.maximized_horizontal = a.maximized_horizontal end
if a.maximized_vertical ~=nil then c.maximized_vertical = a.maximized_vertical end
or both in a row:
if a.maximized ~=nil then c.maximized_horizontal = a.maximized; c.maximized_vertical = a.maximized end
Arenevier 13:18, 14 April 2010 (UTC)
allow more fine grained control when matching clients
Hi, currently, when matching clients at opening, all we can feed to shifty is a list of expressions, and shifty will check those expressions against, in that order: - classname - instance name - name - role - type
As soon as one of those is matching, shifty considers client is matching. Then, it's not possible to have different handlings for an iceweasel main window (classname = Iceweasel; instance name = Navigator), and an iceweasel alert dialog (classname = Iceweasel; instance name = Dialog) because for both, classname will match, and instance name will not be checked. Arenevier 22:00, 14 April 2010 (UTC)