3

I recently discovered the amazing xdotool command and was going to make a bash-script to open four windows, resize, and reposition them for work.

Before, I could use the command xdotool key ctrl+alt+t to create a new terminal, but now when i try and use this command it simply just prints ^[^T to the terminal... Is there some subtlety that I am missing with xdotool, and if so could someone please assist me? If not and this is just a bug, does anyone have any advice for opening new terminals through bash so I can create the script desired? Thanks in advance!

Note: I just discovered gnome-terminal command

Further Note: Also xdotool key ctrl+shift+n works, but for some reason ctrl+alt+t doesn't.. wierd

Most Furtherest Note: here is the script for those interested, some changes I might make in the future, adding an option for a path to open windows into (currently just does current window).

#!/bin/bash
gnome-terminal
sleep .1
id1="$(xdotool getwindowfocus)"
xdotool windowsize $id1 48% 50%
xdotool windowmove $id1 0 0
gnome-terminal
sleep .1
id2="$(xdotool getwindowfocus)"
xdotool windowsize $id2 48% 50%
xdotool windowmove $id2 0% 50%
gnome-terminal
sleep .1
id3="$(xdotool getwindowfocus)"
xdotool windowsize $id3 50% 50%
xdotool windowmove $id3 50% 50%
gnome-terminal
sleep .1
id4="$(xdotool getwindowfocus)"
xdotool windowsize $id4 50% 50%
xdotool windowmove $id4 50% 0%
ctrl-alt-delor
  • 27,473
  • 9
  • 58
  • 102
Brandon
  • 31
  • 3
  • See https://askubuntu.com/questions/909305/make-ctrl-alt-t-to-open-a-terminal-tab-if-any-terminal-was-open and https://unix.stackexchange.com/questions/38867/is-it-possible-to-retrieve-the-active-window-process-title-in-gnome/81898#81898 – K7AAY Aug 20 '19 at 23:43
  • You say "before, I could use the command..." . Before *what*? How long ago, and what did you change? Did you eg. upgrade your system? – JigglyNaga Aug 21 '19 at 12:29

0 Answers0