![]() ![]() You would need to use wmctrl version 0.3 or later (because of my pull request). Return subprocess.check_output(cmd).splitlines() W.set_properties(("add","maximized_vert","maximized_horz")) W.set_properties(("remove","maximized_vert","maximized_horz")) "xrandr -output %s -pos %dx0 -rotate %s" % d for d in mydisplays]),ĭidi = dict()Įxe = os.readlink("/proc/%d/exe" % (w.pid)) # move the windows to their appropriate displays Apple Menu > System Preferences : Fig.01: Rearrange the position of the dock and menu bar Choose Displays > Select the Arrangement tab: Fig. To change these settings, choose Apple menu > System Settings, then click Desktop & Dock in the sidebar. To configure multiple monitor click on Settings i.e. If you might run into exceptions, please mention.įor the record, here is what I use for the combination of this question and Restore multiple monitor settings: # configure multiple displays and Select version: Table of Contents Change Desktop & Dock settings on Mac On your Mac, use Desktop & Dock settings to change the appearance of the Dock, and to select items to show in the menu bar and in Control Center. Using wmctrl, and even xdotool, on Unity can have some stubborn peculiarities however that sometimes need to be solved by experiment rather than reasoning. The script worked fine on the tests I ran it with. ![]() Subsequently, the script moves all windows, one by one, to a position on the targeted screen (using wmctrl -ir -e 0,) and maximizes it (with xdotool windowsize 100% 100%). Here is a screenshot of my configuration, whereas Cmd+Ctrl+W moves a window to the next monitor. Overall I found it to be the most configurable. When the script is run with the screen and the window class as arguments, it looks up the (x-) position of the screen, looks up all windows (-id's) of a certain class (with the help of wmctrl -l and the output of xprop -id. I ended up using BetterTouchTool to do this. The script lists the information for all screens. ![]() This line gives us information on the screen's position and its name, as explained here. In the output of xrandr, for every connected screen, there is a string/line, looking like: VGA-1 connected 1280x1024+1680+0 This happens for instance when you have a > screen below the menu bar screen: the dock will be on the bottom screen and > the menu bar on the top screen. The explanation is mostly on the concept, not so much on the coding. The screen's name needs to be the exact and complete name. The script assumes the screens are arranged horizontally, and more or less top- aligned (with a difference įor example: python3 /path/to/move_wclass.py gnome-terminal VGA-1įor the WM_CLASS, you may use part of the WM_CLASS, like in the example. Or, if the app has a Window menu, choose. How that is done is explained in the script and also further below. Control-click the app’s Dock icon and select the window from the menu that appears. The script below will send windows, belonging to a specific WM_CLASS (application), to a specific screen, by the screen's name. Moving all windows of a specific window class to a specific screen by (screen-) name ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |