Skip to content

Instantly share code, notes, and snippets.

@platan
Created January 12, 2015 16:10
Show Gist options
  • Save platan/e63b465c2fcfe3d0cccd to your computer and use it in GitHub Desktop.
Save platan/e63b465c2fcfe3d0cccd to your computer and use it in GitHub Desktop.
Maximize all windows from command line in linux (via wmctrl)
#!/bin/bash
window_ids=$(wmctrl -l | cut -f1 -d " ")
for window_id in $window_ids
do
wmctrl -i -r "$window_id" -b add,maximized_vert,maximized_horz
done
@stoufa
Copy link

stoufa commented May 5, 2021

Thanks for sharing, I was struggling to know how to start each one of my startup applications maximized until I found wmctrl and then this script. Now, I will only have to start all the applications I need then run this handy script. 😊

@ggallozz
Copy link

ggallozz commented Apr 1, 2022

very good! (y)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment