![]() 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")) Well show you some apps that extend the functionality of tags in macOS to help you organize and find files at the time of need. I have been using LaunchBar for over 3 years and it has become so natural that I feel literally paralyzed when I approach a Mac without LaunchBar. "xrandr -output %s -pos %dx0 -rotate %s" % d for d in mydisplays]),ĭidi = dict()Įxe = os.readlink("/proc/%d/exe" % (w.pid)) LaunchBar is one of the ten light automation utilities (Macademic Ninja Kit), which make academic work on a Mac fast, smooth and enjoyable. # move the windows to their appropriate displays 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 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%). 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. If not, make the app active, then select the LaunchBar menu at the top of the screen, open Preferences, select the Shortcuts tab, and set the Search in LaunchBar command to whatever you prefer. It should automatically be configured to use Command + Space. The script lists the information for all screens. Open your Applications folder and double-click on the LaunchBar icon to launch the app. 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 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. ![]() Open another new file browser window, and navigate to Desktop folder. The shortcut files of most installed applications are there. How that is done is explained in the script and also further below. First open file browser and navigate to Other Locations > Computer > usr > share > applications. 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. |