649
you are viewing a single comment's thread
view the rest of the comments
[-] Zeoic@lemmy.world 3 points 4 months ago

Would you mind sharing that script? That sounds incredibly useful lol. I'm new-ish to linux as my daily driver and love customizing it!

[-] ATDA@lemmy.world 1 points 4 months ago

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."
this post was submitted on 04 Jul 2024
649 points (95.8% liked)

Technology

59736 readers
754 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 2 years ago
MODERATORS