I am aware that this question is duplicated:
How to set window size and location of an application on screen via command line?
Resizing a maximized window from the command line
I was able to solve my question with the first link. But I am struggling to learn Bash language and I would like to know what is going wrong with the following script:
#!/bin/bash
xfce4-settings-manager & sleep 0.1
xwininfo -name "xfce4-settings-manager" | grep xwininfo: | awk {'printf$4'}
wmctrl -i -r $1 -b add,maximized_vert,maximized_horz &
After running the script I check "xwininfo" takes another ID Value of the app. I don't understand why. Can someone give me a hand with this issue?
Thanks in advance.