Ask Your Question
1

how do I make focus follow the mouse?

asked 2017-12-27 14:12:32 -0600

scb gravatar image

I want the keyboard focus to be in whichever terminal window the mouse cursor is in. That has not been default behavior for many years, sadly, but at least there has usually been some sort of windows setting that could easily be set. I don't see one in Fedora 27.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2017-12-27 14:45:39 -0600

villykruse gravatar image

This depends very much on the window manager you are using. For example the xfce window environment with xfwm4 has a configuration setting for this.

edit flag offensive delete link more

Comments

so does cinnamon and I would also assume others have that feature.

SteveEbey73701 gravatar imageSteveEbey73701 ( 2017-12-28 14:06:10 -0600 )edit
1

answered 2017-12-31 09:54:28 -0600

markito3 gravatar image

updated 2017-12-31 10:01:18 -0600

Here is a session that does it for gnome shell from the command line:

#
# remember what gsettings does
#
> gsettings 
Usage:
  gsettings --version
  gsettings [--schemadir SCHEMADIR] COMMAND [ARGS?]

Commands:
  help                      Show this information
  list-schemas              List installed schemas
  list-relocatable-schemas  List relocatable schemas
  list-keys                 List keys in a schema
  list-children             List children of a schema
  list-recursively          List keys and values, recursively
  range                     Queries the range of a key
  describe                  Queries the description of a key
  get                       Get the value of a key
  set                       Set the value of a key
  reset                     Reset the value of a key
  reset-recursively         Reset all values in a given schema
  writable                  Check if a key is writable
  monitor                   Watch for changes

Use ?gsettings help COMMAND? to get detailed help.

#
# look for something that has to do with mouse focus
#
> gsettings list-recursively | grep focus
org.gnome.shell.overrides focus-change-on-pointer-rest true
org.gnome.desktop.wm.preferences focus-new-windows 'smart'
org.gnome.desktop.wm.preferences focus-mode 'sloppy'
org.freedesktop.IBus.Chewing clean-buffer-focus-out false
org.gnome.shell.extensions.classic-overrides focus-change-on-pointer-rest true
org.gnome.Empathy.notifications notifications-focus true
org.gnome.shell.keybindings focus-active-notification ['<super>n']
org.gnome.mutter focus-change-on-pointer-rest false
org.gnome.gnumeric.dialogs.rs unfocused false
org.gnome.desktop.a11y.magnifier focus-tracking 'proportional'
org.gnome.shell.keybindings focus-active-notification ['<super>n']
org.gnome.Empathy.notifications notifications-focus true
#
# show the options for org.gnome.desktop.wm.preferences focus-mode
#
> gsettings range org.gnome.desktop.wm.preferences focus-mode 
enum
'click'
'sloppy'
'mouse'
#
# set focus-mode to 'mouse'
#
> gsettings set org.gnome.desktop.wm.preferences focus-mode mouse
#
# see what was done
#
> gsettings get org.gnome.desktop.wm.preferences focus-mode
'mouse'

Personally, I prefer 'sloppy' to 'mouse'. That way when the mouse pointer is outside of all windows, focus remains with the last window in focus.

edit flag offensive delete link more

Comments

very good answer; especially explaining how to get there - teach a man how to fish

spacerfrog gravatar imagespacerfrog ( 2018-02-28 15:07:40 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-12-27 14:12:32 -0600

Seen: 1,216 times

Last updated: Dec 31 '17