Sample Header Ad - 728x90

Script to maximize an app when it starts

2 votes
4 answers
3177 views
I am aware that this question is duplicated: https://unix.stackexchange.com/questions/43106/how-to-set-window-size-and-location-of-an-application-on-screen-via-command-line/283528#283528 https://unix.stackexchange.com/questions/159684/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.
Asked by joshsoj (61 rep)
Mar 4, 2017, 09:43 AM
Last activity: Jan 14, 2021, 01:45 PM