Hi, On Thu, Jan 22, 2015 at 08:23:51AM -0800, Александр Лозовской wrote: > Hello! > > At this time i use next function in my config (my groups name is '!', '@' > and so on, so i use it number from list in keys): > > <...> > prevGroup = '' > prevPrevGroup = '' > > def checkGroup(qtile): > global prevGroup, prevPrevGroup > currentGroup = qtile.currentGroup.name > if prevGroup == currentGroup: > subprocess.Popen(['xdotool', 'key', 'Super_L+Escape']) > else: > prevPrevGroup = currentGroup > > def storeGroup(qtile): > global prevGroup, prevPrevGroup > currentGroup = qtile.currentGroup.name > if prevGroup != currentGroup: > prevPrevGroup = prevGroup > prevGroup = currentGroup > else: > prevGroup = prevPrevGroup > > for index, grp in enumerate(groups[0:-1]): > keys.extend([ > Key([mod], str(index+1), lazy.function(storeGroup), > lazy.group[grp.name].toscreen(0), lazy.function(checkGroup)), > Key([mod], 'Escape', lazy.screen.togglegroup()), > ]) > <...> > > How i can use native Qtile function for it?
I don't understand the logic here. It looks like you're trying to only call togglegroup() in some cases, when the current group is the last one you stored? I can't think of a way to do this in qtile, but why not just use togglegroup directly? Tycho > Thanks for advices (and sorry for my bad english)! > > -- > You received this message because you are subscribed to the Google Groups > "qtile-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "qtile-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
