Created
December 14, 2017 23:46
-
-
Save adonig/815013b1ba49c8eb60c723d81a588b7d to your computer and use it in GitHub Desktop.
Start Microsoft Visual Studio Code maximised on Linux. Workaround for https://github.com/Microsoft/vscode/issues/422.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
code | |
while true; do | |
WINDOW_ID=$(xprop -root _NET_ACTIVE_WINDOW | cut -d ' ' -f 5 | cut -c 1-9) | |
WINDOW_CLASS=$(xprop -id $WINDOW_ID WM_CLASS | sed 's/.*= "\([^"]*\)".*/\1/') | |
if [ "${WINDOW_CLASS,,}" = "code" ]; then | |
break | |
fi | |
done | |
wmctrl -r :ACTIVE: -b toggle,maximized_vert,maximized_horz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment