On Thu, Jan 31, 2013 at 10:46 AM, Yussi <[email protected]> wrote:
> Shifty had some nice fine tuning to it that I miss, however for the most
> part, I achieve the same results with the normal config, by doing something
> like this,
> I have some functions to handle tag creation/rename/deletion in my rc
>
> function add_tag(args)
> local screen = args.screen or mouse.screen or 1
> local text = args.name or "Aux"
> return awful.tag.add(text,{})
> end
>
> function rename_tag(tag)
> if tag then t=tag else t=awful.tag.selected(mouse.**screen) end
> awful.prompt.run(
> {prompt='rename:'}, -- args
> shared.promptbox.widget, --widget (you'd need change this)
> function(name) t.name=name end, --exe callback
> nil, --completion callback
> awful.util.getdir("cache").."/**history_eval" --history path
> )
> end
>
> --[[[
> Search if tag already exist, return tag or new tag
> @args a table of arguments
> @args.name The tag we want
> ]]--
> function move_to_tag(args)
> if not args then return end
> if not args.name then return end
> for i,t in ipairs(awful.tag.gettags(**mouse.screen)) do
> if t.name==args.name then
> return t
> end
> end
> return add_tag({name=args.name})
> end
>
> function delete_tag(args)
> awful.tag.delete()
> end
>
> In my rules, i have a few programs i like on separate tags:
>
> { rule={ class="Icedove",instance="**Mail"}, properties={tag =
> function() return move_to_tag({name='email'}) end} },
> { rule={ class="Iceweasel",instance="**Navigator"}, properties={tag =
> function() return add_tag({name='www'}) end} },
> { rule={ name="xbill"}, properties={tag = function()
> return move_to_tag({name='xbill'}) end} },
> { rule={ class="emulator-arm",instance=**"emulator-arm"},
> properties={tag = function() return move_to_tag({name='and-emu'}) end} },
>
> I have some key bindings for tags like this:
>
> awful.key({ config.modkey, },"n",function() add_tag({}) end),
> awful.key({ config.modkey, },"d",function() delete_tag({}) end),
> awful.key({ config.modkey,"Shift"},"n",**function() rename_tag() end),
>
>
> While it's not as nice as shifty was when it was working, it basically
> does everything i needed it to.
>
>
>
>
> On 31/01/13 09:08, David Soulayrol wrote:
>
>> Hello.
>>
>>
>> I appreciate those who have helped with pull requests and such but I
>>>> feel shifty has been
>>>> obsolete for some time now.
>>>>
>>>
>>> Could you lease elaborate on this? I am using shifty, but if I can
>>> achieve the same in similarly
>>> easy fashion, I would be really tempted to stick with "out of the box"
>>> awesome? Could you please
>>> give some examples?
>>>
>>
>> I'm also interested in this. What I like with Shifty is the automatic
>> creation and removal of tags when there are no more clients in it. Is it
>> possible to handle this in a simple way with a raw awesome
>> configuration?
>>
>>
>
> --
> To unsubscribe, send mail to
> awesome-unsubscribe@naquadah.**org<[email protected]>
> .
>
Sorry for my late reply - its kind of a reflection of why I can't keep up
with Shifty any more.
I don't think you can 'easily' replicate all the functionality. But you can
get pretty close without relying on Shifty at all.
As for examples or elaboration, I will try but my awesome-equipped laptop
is heading the way of e-cycling so code examples will be hard. Yussi has
some good pointers anyway, and probably more elaborate than I can come up
with off the top of my head.
The best utility of Shifty (to me) was always in shifty.match function. I
never have liked awful.rules, but I never really liked the bloated number
of options in shifty either.
But the shifty.match, and shifty.set, are monolithic functions that are a
nightmare to read.
The last thing shifty does that is not obvious in vanilla awesome would be
the sweeping stuff, but that is actually an easy read and easily
transferrable to someone's own config.
I suppose this is not a complete answer to your questions, but more
pointers for where to look into shifty code if you want to replicate the
features. I didn't want to be rude and not answer at all :D
and of course you can always fork and pick up the repository if you want to
keep Shifty alive. Actually if someone does become 'official' regarding
shifty please let me know and I will take down my repo to avoid confusion.
--
perry