harj0 / terminal-ide

Automatically exported from code.google.com/p/terminal-ide
0 stars 0 forks source link

limited exit options #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The only way to close all windows is from the application main menu.

Typing exit locks up a given window, but otherwise has no effect.

The window selection menu does not include an option to close the 
application/all windows.

I am using: (rooted) Evo 4G, Swag=on rom.

Original issue reported on code.google.com by roda.sl...@gmail.com on 7 Dec 2011 at 8:35

GoogleCodeExporter commented 9 years ago
same for me. Samsung galaxy tab 7.7 rooted.

Original comment by artem.pa...@gmail.com on 14 Jun 2012 at 6:55

GoogleCodeExporter commented 9 years ago
Same here.  Asus transformer tf300 non root.

Original comment by derek.be...@gmail.com on 14 Jun 2012 at 10:20

GoogleCodeExporter commented 9 years ago
Same for me... NEw Transformer tf300  :(  

Original comment by digiho...@gmail.com on 11 Jul 2012 at 5:32

GoogleCodeExporter commented 9 years ago
Same for me.. xperia pro :/ :/

Original comment by hsik...@gmail.com on 15 Jul 2012 at 10:32

GoogleCodeExporter commented 9 years ago
not being able to exit the application or kill it from the task manager is 
extremely lame.

Original comment by mes...@gmail.com on 28 Jul 2012 at 5:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
if you use tmux, then don't follow this first section.

*** not using tmux ***

add the following to your .bashrc:

alias exit="pkill com.spartacusrex.spartacuside"

if you use an exit alias, then either add the pkill command to the end of it, 
after a semicolon (;), or change it to a variable and add the alias, like so:

export preExit="previous exit alias commands"
alias exit="$preExit; pkill com.spartacusrex.spartacuside"

now it will drop you to the menu that has 'Terminal IDE' 'Keyboard' 'Install 
System' etc on it

*** using tmux ***

if you are using tmux then you will need to add a more complex version, to 
avoid killing Terminal IDE when you exit a tmux window. here's an example below 
(based on my existing tmux section). add this to your .bashrc:

# --- tmux section ---
# check if we're in it
if [ -n "$TMUX" ]; then
 # yes, run our automation
 alias exit="history -c; exit"
 up=$(uptime)
 tmuxVer=$(tmux -V)
 echo "$tmuxVer; $up" | sed 's|  | |g'
else
 alias exit='t=$(ps | grep tmux | grep -v grep); if [ -n "$t" ]; then killall tmux; fi; history -c; rm "$HOME/.bash_history"; rm "$HOME/.termpid"; pkill com.spartacusrex.spartacuside'
 # echo our pid into our test file
 echo "$$" >> "$HOME/.termpid"
 # wait a second to give all terminals a chance to write
 sleep 1
 cat "$HOME/.termpid" | while read p; do
 # check if we're the terminal with the lowest pid
  if [ "$$" -gt "$p" ]; then
   # no, wait a second
   sleep 1
  fi
 done
 w0="$(ps | grep tmux | grep -v grep)"
 # check if tmux is running
 if [ -n "$w0" ]; then
  # yes, attach
  tmux -u attach
 else
  # no, start a new session
  tmux -u new -n Main
 fi 
fi

I'm not going to trim this one down, I just added it to the end of my exit 
alias, so you can see how it should be. I always comment my scripts, so it 
should be easy to follow.

Original comment by tye...@gmail.com on 19 Oct 2013 at 10:05

GoogleCodeExporter commented 9 years ago
You should pull and add that alias then check it in. It's really helpful.

Original comment by ur.m...@gmail.com on 6 Feb 2014 at 11:34

GoogleCodeExporter commented 9 years ago
I agree. I found myself needing this today.

Original comment by bamartin...@gmail.com on 7 Feb 2014 at 2:04