• 0 Posts
  • 28 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle



  • of course sorry for delay.

    Requirements: wmctrl, xdotool

    My left screen is 1440p, second screen to the right is 1080 in portrait so you will have to swap the horz/vert locations to match your layout.

    #!/bin/bash
    
    # Time in seconds to wait after launch of program and manipulation of window
    timer=5
    
    # Launch FreeCAD maximized on the main screen
    freecad &
    sleep $timer  # Wait for FreeCAD to launch
    wmctrl -r "FreeCAD" -b add,maximized_vert,maximized_horz
    
    # Launch Cura on the second screen, top half
    cura &
    sleep $timer  # Wait for Cura to launch
    xdotool search --onlyvisible --name "Ultimaker Cura" windowsize 540 960 windowmove 2560 0
    
    # Launch Firefox on the second screen, bottom half
    firefox &
    sleep $timer  # Wait for Firefox to launch
    xdotool search --onlyvisible --name "Mozilla Firefox" windowsize 540 960 windowmove 2560 960
    
    echo "Applications have been launched and positioned."