You are not logged in.
Hi all
Is it possible to prevent mutt, emacs etc from being closed by a mistype ??
Sometimes in mutt I hit q by a mistake and it's irritating to start everything up again, because I like mutt to be on screen #2.
I wonder if it's possible to extend .screenrc with this feature (if it exist?)
My .screenrc looks like this:
screen -t Shell0 0
screen -t Shell1 1
screen -t Mutt 2 mutt
screen -t Emacs 3 emacs -nw
screen -t MC 4 mc
screen -t Cmus 5 cmus
screen -t ROOT 6 su -
vbell off
startup_message off
#change the hardstatus settings to give an window list at the bottom of the \
#screen, with the time and date and with the current window highlighted \
hardstatus alwayslastline \
hardstatus string '%{= kG}[%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %D\
%d %M %Y %{W}%c:%s %{g}]'
#'%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'
# bind F10 to Screen's quit command
bindkey -k F2 quit
Any hints is highly appreciated.
april fool
/Niels
Registered Linux user #133791
Get counted at http://counter.li.org
Offline
Well, you could always add...
quit=ask-yes
...to your .muttrc to have it prompt you if you hit "q." You can also configure emacs to prompt you before quitting.
it's irritating to start everything up again, because I like mutt to be on screen #2.
I hope you don't mean closing your whole screen session!
april fool
I'm choosing to assume you're not joking, in spite of this. If that means I've been had, so be it.
Offline
If it's just a matter of laziness, then I'd say just create a shortcut that opens a mutt for you... so that when you close it it's two keystrokes away:
bind 'm' screen -t Mutt 2 mutt
Offline
ctrl+a+c creates a new screen window. fire up mutt again. no need to close the screen session or (alternatively) start all those apps when screen starts. you can create new windows and start anything you want in them
There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums. That is why we avoid it. -- ewaller (arch linux forum moderator)
Offline
Well what I had in mind was a feature in .screenrc that prevented apps from being closed by a accident.
F.ex if I was mistyping something and screen says "Are you sure y/n ?" similar to when shutting down screen or something like that.
If it's just a matter of laziness, then I'd say just create a shortcut that opens a mutt for you... so that when you close it it's two keystrokes away:
bind 'm' screen -t Mutt 2 mutt
I guess this means CTRL+a+m ?? Hmm.. that might be the answer
/Niels
Registered Linux user #133791
Get counted at http://counter.li.org
Offline