Wmctrl: Difference between revisions

From wikinotes
 
Line 11: Line 11:
wmctrl -d    # ${desktop_id} ${star_current_desktop} DG: ${width}x${height} VP: ${viewport_y},${viewport_y} WA: ${pos_x}x${pos_y} ${width}x${height}
wmctrl -d    # ${desktop_id} ${star_current_desktop} DG: ${width}x${height} VP: ${viewport_y},${viewport_y} WA: ${pos_x}x${pos_y} ${width}x${height}


wmctrl -l -G  # list window-id by desktop-id
wmctrl -a 'STRING'  # focus window whose name contains 'STRING'
wmctrl -a 'STRING'  # focus window whose name contains 'STRING'
</source>
</source>
</blockquote><!-- Usage -->
</blockquote><!-- Usage -->

Latest revision as of 14:29, 18 July 2021

A tool to control linux UI from the terminal.

Usage

# list all window-ids by desktop-id
wmctrl -l     # ${window_id} ${desktop_id} ${hostname} ${window_title}
wmctrl -l -G  # ${window_id} ${desktop_id} ${x_offset} ${y_offset} ${width} ${height} ${hostname} ${window_title}

# list desktops
wmctrl -d     # ${desktop_id} ${star_current_desktop} DG: ${width}x${height} VP: ${viewport_y},${viewport_y} WA: ${pos_x}x${pos_y} ${width}x${height}

wmctrl -a 'STRING'  # focus window whose name contains 'STRING'