Switch between monitors with dual display state [awesome wm]
I’m using Awesome Windows Manager and two display (LVDS-1
as the secondary display in left and HDMI-1
as the main display in right). Awesome, by default duplicates screens and I want to switch focus on my display using the keyboard. It’s now possible by moving the mouse cursor to each monitor.
Are there any hotkey commands or another way which does not require the mouse?
Yes there should be.
Try Mod+Ctrl+j to focus the next screen.
Then Mod+Ctrl+k should focus the previous screen.
The commands to move the mouse from one screen to the next one are :
awful.screen.focus_relative (offset)
or to a specific screen :
awful.screen.focus(_screen)
See : https://awesomewm.org/doc/api/classes/screen.html
Example of a key binding :
-- to go to next screen
awful.key({ modkey,}, "e", function () awful.screen.focus_relative(1) end)
-- to active screen 2
awful.key({ shift, }, "z", function () awful.screen.focus(2) end)