Created
February 24, 2017 13:04
-
-
Save murano500k/151dac6a42a21ab4a0b495cd013a6862 to your computer and use it in GitHub Desktop.
Here's a little script to really permanently set a window size, regardless of gnome-terminal profile that you are currently using. This works on all windows belonging to gnome-terminal To make it work, you need two things: 1) make sure you have wmctrl installed and 2) run this script as one of the Startup Applications. Notice that line with wmct…
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 | |
# Purpose: a script to permanently set | |
# terminal window, size | |
APP_CLASS="gnome-terminal.Gnome-terminal" | |
while [ 1 ]; do | |
WIN_ID=$(printf %x $(xdotool getactivewindow)) | |
WM_CLASS=$(wmctrl -lx | awk -v search=$WIN_ID '{ if($1~search) print $3 }') | |
WMCTRL_ID=$( wmctrl -lx | awk -v search2=$WIN_ID '$0~search2 {print $1}' ) | |
if [ $WM_CLASS = $APP_CLASS ]; then | |
wmctrl -i -r $WMCTRL_ID -e 0,0,0,650,650 | |
fi | |
sleep 0.25 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment