Reply to topic

How to change the default window for new tabs in scripts?

Reg
Registered Member
Posts
3
Karma
0
I have a script, the relevant part of which I am showing below. What I would like to do is every few tabs start a new window. E.g., say I get to 20 tabs then I set LINUX_NEW_WINDOW=y and that opens a new window. So far so good however when next clear LINUX_NEW_WINDOW such as LINUX_NEW_WINDOW='' then I would expect the next tab to go into the new window I just created but instead the next tab goes back to the first window I created. How do I get all new tabs to appear in the newly created 2nd window? Is this possible to control at all?

Code: Select all
if [ -n "$LINUX_NEW_WINDOW" ]; then
  konsole --noclose -e "./includes/spawned.sh $1 $2 $3 $4 $5 $6 $7 $8 $9" 2>/dev/null &
else
  konsole --new-tab --noclose -e "./includes/spawned.sh $1 $2 $3 $4 $5 $6 $7 $8 $9" 2>/dev/null &
fi
airdrik
Registered Member
Posts
1758
Karma
5
OS
While I don't have an answer for the question you are asking, I can offer a workaround for you, depending on what you need these scripts to do.
If they don't need any interactive input and you are popping them open in different tabs so that you can examine their (stdout) output after they've completed, then you could just as well redirect their output to files that you can examine later and run them in the background of the current window.
Depending on the nature of the task(s) being performed, additional suggestions can be provided.


airdrik, proud to be a member of KDE forums since 2008-Dec.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], ronthomas, Sogou [Bot]