Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus window on hovering #70

Open
leukipp opened this issue Aug 20, 2024 · 3 comments
Open

Focus window on hovering #70

leukipp opened this issue Aug 20, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request info General purpose information

Comments

@leukipp
Copy link
Owner

leukipp commented Aug 20, 2024

Starting with v2.5.2, there’s an optional feature that allows you to focus the currently active window based on the mouse position:

# When hovered for this duration [ms] windows are focused (0 = disabled).
window_focus_delay = 200

This can enhance your workflow, depending on how you currently use cortile. For example:

  • You won’t need to click on a window before using keybindings that rely on the active window.
  • Combined with hot corners, you can hover a window and move to a corner to make it the master window.
  • When switching between screens, the active workspace changes instantly (see below).

Why not use some build-in features (focus follow mouse, focus on hover, secondary click)?

  • Some operating systems have an option to focus the window by hovering them. However, this doesn't work great with cortile, especially when keyboard shortcuts want to be used to cycle through the next/previous window or to move a window between screens. With the internal cortile implementation those keyboard shortcuts are still usable.

Additionally, the overall logic for executing actions has been modified:

  • Before v2.5.2: The cursor position determined the current active workspace, where actions like enabling or changing layouts were executed.
  • With v2.5.2: The currently active window now defines the active workspace. This means you can move a window to another screen using shortcuts and perform actions there without moving the cursor to the other screen. If none of the tracked windows are focused (e.g., focus is on the desktop or on a window intentionally ignored by the configuration), the cursor position is again used to determine the active workspace.
@leukipp leukipp added the enhancement New feature or request label Aug 20, 2024
@leukipp leukipp self-assigned this Aug 20, 2024
leukipp added a commit that referenced this issue Aug 20, 2024
@thiswillbeyourgithub
Copy link

Btw I've been testing it and it works great. I did notice an issue : say I have two windows, split vertically, I toggle maximized (using gnome, NOT cortile) on the left window, then if my mouse cursor goes to the right side of the window (which was the left window previously) then the focus will make the right window jump in front of the maximized one. This might not be a cortile issue as you warn in the README that using features of the DE might cause issues with cortile but I'm reporting just in case.

Btw I tended to use gnome to fullscreen because there's no native way to toggle back and forth the fullscreen. I did find #41 though and will give it a go.

@leukipp
Copy link
Owner Author

leukipp commented Oct 28, 2024

The built-in window auto focus feature is for now 7ab7e74 disabled by default...

# When hovered for this duration [ms] windows are focused (0 = disabled).
window_focus_delay = 0

...as not everyone will want to use it and I also encountered some problems with GNOME-based desktop environments.

@thiswillbeyourgithub
Copy link

I just found out that in gnome tweaks on ubuntu 22 in section Windows there's the option Focus on hover. This might avoid those issues.

@leukipp leukipp closed this as completed Nov 2, 2024
@leukipp leukipp added the info General purpose information label Nov 2, 2024
@leukipp leukipp reopened this Nov 2, 2024
@leukipp leukipp pinned this issue Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request info General purpose information
Projects
None yet
Development

No branches or pull requests

2 participants