Command to display current terminal window's settings?
Hell All,
I was wondering if there is a command line command that will display the current terminal's settings? For example I would like to run the command and it will display the current window's settings, in order to view for instance the window's geometry size? Thanks in Advance, Matt |
Try 'xrandr'
|
Hey Allen, thanks for the reply.
I tried the command and this was the output: Code:
# xrandr I came across this command below which does display the correct stuff, but I have to click the window that I want to display the data for. Code:
# xwininfo There are 2 options that are to use a "name" or "id" instead of using the mouse. Do you know if there is a default "name" or "id" for the current window I am in? Or is there a way to get either of those? I ask because my goal is to do this programmatically, without any human interaction (so no one will be able to use the mouse to select the window). Thanks, Matt |
Ok so I think I found a way to do this.
If I do the following I can get the "Active" window's id. Code:
# xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" Thanks, Matt |
Nice catch:
Code:
xwininfo -id $(xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | cut -d " " -f5) | grep "geometry" | cut -d " " -f4 |
Hey Allen, thanks for your help.
This is my solution below. The result is to isolate the windows geometry so I can check and make sure it is a certain size. Below shows how I get the "Active Window's Geometry" so I can use it later in a script. Here's what I got: Code:
#!/bin/bash |
All times are GMT -5. The time now is 02:01 AM. |