Code Monkey home page Code Monkey logo

awesome-cyclefocus's People

Contributors

blueyed avatar glenvt18 avatar siebz0r avatar sigprof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awesome-cyclefocus's Issues

Can't get working on Gentoo

Hello.
I'm trying to use this extension on Gentoo, awesome 3.5.6. After following installation instructions, using Example 1 and restarting awesome, I get this:

error: /home/lock/.config/awesome/cyclefocus/init.lua:348: attempt to call method 'jump_to' (a nil value)

I've tried commenting the line mentioned in error message, but then I got even stranger error:

error: /home/lock/.config/awesome/cyclefocus/init.lua:662: attempt to call a table value

Please hälp!

Tag selection is not restored properly

When finishing the cycling, tags on the final client's screen are unselected, leaving only the client's first tag.

Relevant sections are in the exit_grabber() function (inside cyclefocus.cycle()).
Following part is supposed to restore the tags, but it does not actually handle the client's screen. A separate loop is needed to preserve the behaviour mentioned in the comment.

            -- Restore previously selected tags for screen(s).
            -- With a given client, handle other screens first, otherwise
            -- the focus might be on the wrong screen.
           if restore_tag_selected then
                for s in capi.screen do
                    if not c or s ~= c.screen then
                        for _,t in pairs(s.tags) do
                            t.selected = restore_tag_selected[s][t]
                        end
                    end
                end
+                if c then
+                    for _,t in pairs(c.screen.tags) do
+                         t.selected = restore_tag_selected[c.screen][t]
+                    end
+                end
            end

Tag selection is actually changed by raise_client_fn(), because the default implementation (cyclefocus.raise_client_without_focus()) actively selects client's first tag. This requires moving the block where it is called before the tag restoration logic. There don't seem to be any issues with doing that, but this probably needs further testing.

Change Direction / Previous Windows

Hi,

would it be somehow possible to setup this plugin in a way to cycle to the previous focus and then through all other windows?

For example the focus is on Windows W1 and when pressing 'modkey+Tab', the focus goes to W2:

>  W1
   W2
   W3
   W4

After a while, I would like to go back or to W1 or to other windows in the following order:

> W2
  W1
  W3
  W4

This would be interesting for the case, where somebody needs to switch frequently between to windows (W1 and W2 in the example above), and only sometimes to the others (W3 and W4).

Sticky mod key problem

    cyclefocus.key({ modkey, }, "Return", {
        cycle_filters = { cyclefocus.filters.same_screen, cyclefocus.filters.common_tag }
    })

I have this. modkey == "Modkey4" which == super.
I want to use my right hand so that would be the right super and the Enter (return)
This works, the problem is that if I use the right super, cyclefocus sticks (doesn't close when the keys are released).
This also happens if I use right alt instead of left alt for instance, it's not bound to super.
I'm not sure if this is a problem with cyclefocus or awesome or my keyboard.

Normal cycle option?

I'm wondering if it would be possible to alter cyclefocus to have the focused item move up/down instead of being fixed. I think I'm too used to alt+tab working like that. Would be a nice option

Alt + ` functionality (after Alt-Tab)

So some window managers let you switch between the most recently focused programs with alt+tab and then the most recently focused windows of that program with at+`. Often these windows managers also work as follows: if you are using alt+tab and freeze over a particular program with multiple windows open (while continuing to hold alt), the selection of that program will be replaced with the selection of the most recently focused window of that program. Then the following options will be the other window(s) of that program and you can continue to cycle through them with alt+tab. Once you have passed the range of the windows of that program, they will shrink back down into the program item and if you go back over to it you have to freeze for a second again before it will once again expand like so. You have likely seen this before.

It would be great if you could add this as a separate option to the config file so users can choose to operate in this mode or the one you have already developed.

How to change font size?

The default font size (8) is too small for me. How can it be easily changed on my awesome configuration?

I have tried

cyclefocus.default_preset = { font = "sans 12" }

without success.

List dependencies in the README

Hello,

I couldn't get this working because I was still running v3.4.X which doesn't have the gears module introduced in v3.5. For me not updating was voluntary but I see that even Ubuntu repos are still at v3.4.X.

So it would be good to list the dependencies in the "Installation" section of the README:

awesomewm 3.5 and upwards

alt + tab resets fullscreen mode

alt + tab resets fullscreen mode and does not get back up.
Reproduce the problem:
I opened the video player in full-screen mode and pressed alt + tab.

Cycle windows of the same class: attempt to index local 'source_c' (a nil value)

I'm trying to cycle between clients of the same class using thise code:

    cyclefocus.key({ modkey, }, "`", 1, {
            cycle_filter = cyclefocus.filters.same_class
    }),

but it results in the following error:
W: awesome: event_handle_key:586: error running function: /home/lars/.config/awesome/cyclefocus/init.lua:133: attempt to index local 'source_c' (a nil value)

It seems source_c is always nil.
Awesome is 3.5.6.

Problem with quake dropdown terminal from copycats/lain

Hi,
I ran into the following problem. When I do "Alt-tab" (focus previous window), that is already closed dropdown terminal window (native quake dropdown terminal from copycats/lain) then an error happened:

"../awesome/cyclefocus/init.lua:604: attempt to index a nil value (local 'c_tag')"

If there is any way to fix this issue ?

Call cyclefocus with Alt+Escape

I'm trying to invoke cyclefocus using Alt+Escape. For some reason this does not seem to work:

awful.key({ "Mod1",           }, "Escape",
    function (c)
        cyclefocus.cycle({modifier="Alt_L"})
    end,
    {description = "cyclefocus", group = "client"}),

When I replace Escape with Tab it works as expected.
Am I missing anything?

Thanks

Merge awesome-cyclefocus upstream?

I found this module from a Stackoverflow question, and to my mind it fixes the very limited meta-tab / meta-j/k functionality that awesomewm ships with. The default functionality seems particularly strange for a tiling window manager, because meta-j/k make it quite hard to find two windows to quickly switch between with meta-tab (at least using the keyboard only, whereas it is easy with this module, as it should be).

awesome-cyclefocus seems like essential functionality to me, and I think the default configuration for it is very sensible. Is there any possibility to get this included in awesomewm by default?

How the end cycling in the last focussed/raised window?

Hi,

Thanks for cyclefocus. I'm trying it just now, but seems that I don't understand its default behavior.

I just commented the default Alt + Tab, and enabled the new one as proposed in the Readme's example 1. I can cycle to all windows using Alt + Tab, as expected, and each window raises and gets the focus, as expected, but I would expect also that the last window raised and focused is the one I'm going, if I stop cycling. Instead it brings me to the window/client where the cycling started. There is any way to change the defaults for ending the cycling in the last focused/raised client?

Cycling unminimized by default ?

Hello there.
I'm running this plugin for years now, and if I remember well,
the first thing I did after installing it was to remove the rule L.103,
that states it should cycle only among unminimized windows.
I don't see the point in that. Wouldn't be more rational to provide
a very standard behavior and then let users customize it to their needs ?

    -- Default builtin filters.
    -- (meant to get applied always, but you could override them)
    cycle_filters = {
        --function(c, source_c) return not c.minimized end,  --luacheck: no unused args
    },

Configured like so to avoid excessive flashing displays

   cyclefocus.key({ "Mod1", }, "Tab", { show_clients = false, focus_clients = true, }),

IMO, this plugin lands in the domain of
"the functions users are very used to have on a WM"
and that, when missing, may lead them to look somewhere else.
Thanks a lot for writing it !

Next and prev count might not be respected

cyclefocus.display_next_count = 3
cyclefocus.display_prev_count = 3

I have this. I have 3 items on the screen, and the selected one is at the top. I would expect it to be in the middle

Throw mouse pointer to new focused windows

Hi, it'd be nice to have an option that throws mouse pointer to the newly focused windows. I'm new to awesome (and lua) and my attempt seems to be broken:

awful.key({ modkey,           }, "Tab",
   function (c)
      local filters = {
         cyclefocus.filters.same_screen,
         cyclefocus.filters.common_tag,
         function (c)
            return c.instance ~= c.screen.quakeconsole.name
         end,
      }
      cyclefocus.cycle({modifier="Super_L", cycle_filters = filters})
      --awful.client.focus.history.previous()
      if client.focus then
         client.focus:raise()
         local npos = client.focus:geometry()
         npos.x = npos.x + npos.width / 2
         npos.y = npos.y + npos.height / 2
         mouse.coords(npos)
      end
   end,
   {description = "go back", group = "client"}),

Filter for all windows except from current tag

I have cyclefocus set up with the code from the readme, with alt-tab for cycling windows on the current tag, and meta-tab for cycling all windows. Is it possible to use meta-tab to cycle between all windows except for those windows on the current tag (but obviously still including the window with focus)? I find that I never want to cycle current tag windows with meta-tab, because alt-tab already does that. Thanks!

Right Alt - Tab is not working

Right Alt - Tab is not working, it shows the list but the list does not disappear after the the release of the combination.

cyclefocus.key needs to have the modifier option if not using Mod1

First at line 1071 you have :

    args.modifier = args.modifier or mods[0]

In lua the index of an array start by default at 1, so it should be :

    args.modifier = args.modifier or mods[1]

But that break the release as modifiers are like Mod1 or Mod4 or Shift and the key event that you listen to correspond to Super_L or Alt_L. So if you don't use Mod1 (and get the default value of Alt_L as the modifier keysym) as your modifier, you need to specify the keysym of your modifier in your options.

cyclefocus.key({ "Mod4", }, "Tab", {
   modifier = "Super_L",
   -- cycle_filters from the default filters:
   cycle_filters = { cyclefocus.filters.same_screen, cyclefocus.filters.common_tag }
 })

nil value due to definition issue

While trialling your plug-in I encountered a problem.
The error message was:

W: awesome: event_handle_key:567: error running function: ~/.config/awesome/cyclefocus/init.lua:49: attempt to index global 'cyclefocus' (a nil value)

I followed the instructions in the readme, to summarize my config:

local cyclefocus = require("cyclefocus")
clientkeys = awful.util.table.join(
    awful.key({ "Mod4" }, "Tab",
        function (c)
            cyclefocus.cycle(1, { modifier = "Super_L" })
        end)
)

This is causes by a definition problem, the cyclefocus variable is referred to at definition time. This causes the variable to be always nil.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.