Re: iTerm vs Terminal (was: ACS characters in Terminal.app)
On Thu, Nov 01, 2012 at 09:14:45PM +1100, Cameron Simpson wrote: > It relies on a feature of mutt: if you exit the editor having changed > nothing, mutt silently cancels the compose mode. So muttedit is invoked > as your editor. It: > > - takes a copy of the message composition file it is handed > > - computes a "screen" title from the time and message subject > > - invokes screen running > mutt -e 'set editor=$EDITOR' -e 'unset signature' -H "$filename" > i.e. it runs a separate mutt in "compose a message from this template > mode" > > So there you are in screen composing a message in a standalone mutt. > You can complete it right there and send, exiting the standalone mutt. > Or you can detach from screen and resume that process later. > > Either way, as far as your original mutt is concerned, muttedit exits > and the composition file is unchanged, so it queitly returns to your > index view or whatever. very cool. I may have to try this out :) Thanks! -Jeremy pgpMeTZsklDoc.pgp Description: PGP signature
Re: iTerm vs Terminal (was: ACS characters in Terminal.app)
/ Cameron Simpson wrote on Thu 1.Nov'12 at 21:14:45 +1100 / > On 31Oct2012 17:32, Jeremy Kitchen wrote: > | On Thu, Nov 01, 2012 at 10:28:09AM +1100, Cameron Simpson wrote: > | > [...] I've got mutt configured to automatically > | > compose replies in a detachable screen session named after a mangling of > | > the subject line, so I can reconnect later if disconnected (or if I just > | > decide to disconnect from screen and finish composition another time). > | > Thus: > | > > | > [/home/cameron]janus*> scr > | > 1 23168.BACKUP > | > 27237.DOVECOT > | > 3 12992.EMERGE > | > 48218.GETMAIL > | > 59000.MAILFILER > | > 6 31196.WD > | > 74915.WD_BEY2 > | > 84793.WD_BEYONWIZ > | > 9 14831.mutt-01nov2012-10:10 > | >10 16970.mutt-27oct2012-14:45 > | > > | > So I could detach right now and reconnect by saying "scr 10" to finish > | > the job. > | > | Hrm. I'd be very interested in seeing how this works. I like the idea, > | but mutt's email editing is modal, right? How does that work with > | essentially backgrounding an editor? > > I mentioned this briefly in: > > http://www.mail-archive.com/mutt-users@mutt.org/msg40856.html > > but more thoroughly: > > I have: > > set edit_headers=yes > set editor=muttedit > set autoedit=yes > > Muttedit is here: > > https://bitbucket.org/cameron_simpson/css/src/tip/bin/muttedit > > It relies on a feature of mutt: if you exit the editor having changed > nothing, mutt silently cancels the compose mode. So muttedit is invoked > as your editor. It: > > - takes a copy of the message composition file it is handed > > - computes a "screen" title from the time and message subject > > - invokes screen running > mutt -e 'set editor=$EDITOR' -e 'unset signature' -H "$filename" > i.e. it runs a separate mutt in "compose a message from this template > mode" > > So there you are in screen composing a message in a standalone mutt. > You can complete it right there and send, exiting the standalone mutt. > Or you can detach from screen and resume that process later. > > Either way, as far as your original mutt is concerned, muttedit exits > and the composition file is unchanged, so it queitly returns to your > index view or whatever. > > This is nearly seamless. Cheers, This is really great Cameron. I'll certainly give that a go. It should be trivial to use or tweak it for use in tmux.
Re: iTerm vs Terminal (was: ACS characters in Terminal.app)
On 31Oct2012 17:32, Jeremy Kitchen wrote: | On Thu, Nov 01, 2012 at 10:28:09AM +1100, Cameron Simpson wrote: | > [...] I've got mutt configured to automatically | > compose replies in a detachable screen session named after a mangling of | > the subject line, so I can reconnect later if disconnected (or if I just | > decide to disconnect from screen and finish composition another time). | > Thus: | > | > [/home/cameron]janus*> scr | > 1 23168.BACKUP | > 27237.DOVECOT | > 3 12992.EMERGE | > 48218.GETMAIL | > 59000.MAILFILER | > 6 31196.WD | > 74915.WD_BEY2 | > 84793.WD_BEYONWIZ | > 9 14831.mutt-01nov2012-10:10 | >10 16970.mutt-27oct2012-14:45 | > | > So I could detach right now and reconnect by saying "scr 10" to finish | > the job. | | Hrm. I'd be very interested in seeing how this works. I like the idea, | but mutt's email editing is modal, right? How does that work with | essentially backgrounding an editor? I mentioned this briefly in: http://www.mail-archive.com/mutt-users@mutt.org/msg40856.html but more thoroughly: I have: set edit_headers=yes set editor=muttedit set autoedit=yes Muttedit is here: https://bitbucket.org/cameron_simpson/css/src/tip/bin/muttedit It relies on a feature of mutt: if you exit the editor having changed nothing, mutt silently cancels the compose mode. So muttedit is invoked as your editor. It: - takes a copy of the message composition file it is handed - computes a "screen" title from the time and message subject - invokes screen running mutt -e 'set editor=$EDITOR' -e 'unset signature' -H "$filename" i.e. it runs a separate mutt in "compose a message from this template mode" So there you are in screen composing a message in a standalone mutt. You can complete it right there and send, exiting the standalone mutt. Or you can detach from screen and resume that process later. Either way, as far as your original mutt is concerned, muttedit exits and the composition file is unchanged, so it queitly returns to your index view or whatever. This is nearly seamless. Cheers, -- Cameron Simpson I'm tired. I stayed up all night trying to round off infinity. - Steven Wright
Re: iTerm vs Terminal (was: ACS characters in Terminal.app)
/ Patrick Shanahan wrote on Wed 31.Oct'12 at 20:07:03 -0400 / > * Cameron Simpson [10-31-12 19:31]: > > On 31Oct2012 15:17, Jeremy Kitchen wrote: > > | > > | You may want to look into tmux :) > > > > Oh, I do want to! > > > > I'm still a screen user on the whole and haven't yet wrapped my head > > around tmux' usage. > > > > But if you mean logically subdividing a single _terminal_ window with > > multiple session displays, no thanks. I've never found it works for > > me with vi or screen or other in-terminal dividers, including urxvt's > > internal tabbing support; they all devolve to focus follows mouse or > > arcane keystrokes to switch focus because the terminal doesn't see the > > mouse cursor, and they also all devolve to emulated terminals and curses > > support issues, and the control stuff gets in the way of being a "pure" > > terminal. Let us not get into cut/paste line ending issues:-) > > I have gone over to tmux for > a year now. I have 9 pages, some split. I > access my mail and webserver box remotely in a tmux session with pages > open to 3 other boxes. I upgraded boxes some years ago and left my web > server and mail on the original box. I read my mail via ssh'ing to a tmux > session running on the original box. This way I can access the tmux > session remotely from anywhere on anyone's box, including windoz running > vnc from a usb stick. > I ashamed to say i've never tried screen. I use tmux a lot because it is part of the base OpenBSD system and so use it on my Mac as well now. I also use and like my tiling WM such spectrwm and I mainly use cwm on OpenBSD as it's there as part of the system and I really like it. I prefer anything that allows me to use the keyboard all the time; having to reach out for a mouse is PITA these days :-) I still have my iTerm2 installed, perhaps I didn't give it enough of a chance. You've sold it very well Cameron, i'll give it another go. Jamie.
Re: iTerm vs Terminal (was: ACS characters in Terminal.app)
On Thu, Nov 01, 2012 at 10:28:09AM +1100, Cameron Simpson wrote: > On 31Oct2012 15:17, Jeremy Kitchen wrote: > | You may want to look into tmux :) > > Oh, I do want to! [...] > But if you mean logically subdividing a single _terminal_ window with > multiple session displays, no thanks. I've never found it works for > me with vi or screen or other in-terminal dividers, including urxvt's > internal tabbing support; they all devolve to focus follows mouse or > arcane keystrokes to switch focus because the terminal doesn't see the > mouse cursor, and they also all devolve to emulated terminals and curses > support issues, and the control stuff gets in the way of being a "pure" > terminal. Let us not get into cut/paste line ending issues:-) ugh. don't remind me about the cut/paste issues. in your case, screen is fine :) Really, screen is just fine, I just got into tmux because I wanted to see what all the hype was about and now I'm much better with tmux than I ever was with screen. > | Then again, nearly 100% of my in-terminal work is done from another, > | permanently-connected machine, and my mac is just a portal to my > | linux-box-du-jour. > > My mac is my portal like yours (though I do a lot of coding locally and > push changes out - far far snappier, and one can do it on a train or > otherwise offline, pushing later). This email is being written on my > home server via ssh, and I've got mutt configured to automatically > compose replies in a detachable screen session named after a mangling of > the subject line, so I can reconnect later if disconnected (or if I just > decide to disconnect from screen and finish composition another time). > Thus: > > [/home/cameron]janus*> scr > 1 23168.BACKUP > 27237.DOVECOT > 3 12992.EMERGE > 48218.GETMAIL > 59000.MAILFILER > 6 31196.WD > 74915.WD_BEY2 > 84793.WD_BEYONWIZ > 9 14831.mutt-01nov2012-10:10 >10 16970.mutt-27oct2012-14:45 > > So I could detach right now and reconnect by saying "scr 10" to finish > the job. Hrm. I'd be very interested in seeing how this works. I like the idea, but mutt's email editing is modal, right? How does that work with essentially backgrounding an editor? > Anyone wanting to see the code for any of the above is quite welcome, > BTW. Yes, please :) -Jeremy pgpJoc4m5LlbS.pgp Description: PGP signature
Re: iTerm vs Terminal (was: ACS characters in Terminal.app)
* Cameron Simpson [10-31-12 19:31]: > On 31Oct2012 15:17, Jeremy Kitchen wrote: > | > | You may want to look into tmux :) > > Oh, I do want to! > > I'm still a screen user on the whole and haven't yet wrapped my head > around tmux' usage. > > But if you mean logically subdividing a single _terminal_ window with > multiple session displays, no thanks. I've never found it works for > me with vi or screen or other in-terminal dividers, including urxvt's > internal tabbing support; they all devolve to focus follows mouse or > arcane keystrokes to switch focus because the terminal doesn't see the > mouse cursor, and they also all devolve to emulated terminals and curses > support issues, and the control stuff gets in the way of being a "pure" > terminal. Let us not get into cut/paste line ending issues:-) I have gone over to tmux for > a year now. I have 9 pages, some split. I access my mail and webserver box remotely in a tmux session with pages open to 3 other boxes. I upgraded boxes some years ago and left my web server and mail on the original box. I read my mail via ssh'ing to a tmux session running on the original box. This way I can access the tmux session remotely from anywhere on anyone's box, including windoz running vnc from a usb stick. -- (paka)Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2 http://en.opensuse.org openSUSE Community Member Registered Linux User #207535@ http://linuxcounter.net
Re: iTerm vs Terminal (was: ACS characters in Terminal.app)
On 31Oct2012 15:17, Jeremy Kitchen wrote: | On Thu, Nov 01, 2012 at 09:01:20AM +1100, Cameron Simpson wrote: | > | I tried iTerm2 but I didn't like it much. For me | > | the default Terminal in Mac OS X renders a nicer display IMO. But then i | > | spend little time on my Mac, mostly I just use my BSD machines and urxvt. | > | > I like iTerm2 for the following reasons: | > | > - horizontal and vertical pane tiling | > I've bound shift-%V to open a new vertical pane (splits the current | > pane vertically) and shift-%T to open a new horizontal pane (splits | > the current pane horizontally). | > This is outstandingly useful for working in multiple shells. | > I do a lot of remote admin and opening shells on a bunch of machines | > nicely arranged for coordinated work is very pleasing. | | You may want to look into tmux :) Oh, I do want to! I'm still a screen user on the whole and haven't yet wrapped my head around tmux' usage. But if you mean logically subdividing a single _terminal_ window with multiple session displays, no thanks. I've never found it works for me with vi or screen or other in-terminal dividers, including urxvt's internal tabbing support; they all devolve to focus follows mouse or arcane keystrokes to switch focus because the terminal doesn't see the mouse cursor, and they also all devolve to emulated terminals and curses support issues, and the control stuff gets in the way of being a "pure" terminal. Let us not get into cut/paste line ending issues:-) I find it far better to use a terminal emulator like iTerm2 to manage this stuff. Now, that said, I _do_ have use for easy ways to fork off a bunch of nicely split up windows/tabs/panes. I intend spending a day with AppleScript and my "@" convenience script to make it support this syntax: @ h1,2,3:h4,5,h6 h1,2,3 ... where each space separated chunk makes a new tab, each colon separated chunk a new vertical pane and each comma separated chunk a new horizontally split pane within that vertical pane. So that the above with open two tabs, the first with two vertical panes. The first vertical pane would have ssh sessions to hosts "h1" and "h2" and "h3". And so on. I've had the comma syntax for years via a handy script, so all that remains is the parsing for the rest (and figuring out what I have to say to iTerm2 via AppleScript to get it to obey). The other terminal related project on the backburner is a screen (or tmux) based session tracker so that when I lose my remote connections I can easily and intuitively reconnect to them. | Then again, nearly 100% of my in-terminal work is done from another, | permanently-connected machine, and my mac is just a portal to my | linux-box-du-jour. My mac is my portal like yours (though I do a lot of coding locally and push changes out - far far snappier, and one can do it on a train or otherwise offline, pushing later). This email is being written on my home server via ssh, and I've got mutt configured to automatically compose replies in a detachable screen session named after a mangling of the subject line, so I can reconnect later if disconnected (or if I just decide to disconnect from screen and finish composition another time). Thus: [/home/cameron]janus*> scr 1 23168.BACKUP 27237.DOVECOT 3 12992.EMERGE 48218.GETMAIL 59000.MAILFILER 6 31196.WD 74915.WD_BEY2 84793.WD_BEYONWIZ 9 14831.mutt-01nov2012-10:10 10 16970.mutt-27oct2012-14:45 So I could detach right now and reconnect by saying "scr 10" to finish the job. Anyone wanting to see the code for any of the above is quite welcome, BTW. Cheers, -- Cameron Simpson Are you experiencing more Windows95 crashes than the norm? How on earth would you _know_? - John Brook reporting about a new virus
Re: iTerm vs Terminal (was: ACS characters in Terminal.app)
On Thu, Nov 01, 2012 at 09:01:20AM +1100, Cameron Simpson wrote: > - focus follows mouse You can enable sloppy focus in Terminal.app too (though there's a long-standing and very annoying bug with the interaction between that and *other* applications, which don't have it). % defaults read com.apple.Terminal FocusFollowsMouse YES To set it, you can run: defaults write com.apple.Terminal FocusFollowsMouse -string YES You have to change focus to the app itself via the normal method, but once you're in it, you can use the mouse to focus windows without clicking. w
Re: iTerm vs Terminal (was: ACS characters in Terminal.app)
On Thu, Nov 01, 2012 at 09:01:20AM +1100, Cameron Simpson wrote: > | I tried iTerm2 but I didn't like it much. For me > | the default Terminal in Mac OS X renders a nicer display IMO. But then i > | spend little time on my Mac, mostly I just use my BSD machines and urxvt. > > I like iTerm2 for the following reasons: > > - horizontal and vertical pane tiling > I've bound shift-%V to open a new vertical pane (splits the current > pane vertically) and shift-%T to open a new horizontal pane (splits > the current pane horizontally). > This is outstandingly useful for working in multiple shells. > I do a lot of remote admin and opening shells on a bunch of machines > nicely arranged for coordinated work is very pleasing. You may want to look into tmux :) Then again, nearly 100% of my in-terminal work is done from another, permanently-connected machine, and my mac is just a portal to my linux-box-du-jour. > And of course I've spent some time tuning fonts and colours, and made > things slightly transparent with a slight brightening for the currently > focussed pane. iTerm2 has lots of features, but the ones above are the > real winners for me. I am pretty pleased with Terminal.app from Lion forward, but my work machine is sadly still on Snow Leopard (silly corp IT policy, don't ask) so I tried out iTerm2 again and now I use it primarily on both of my macs. -Jeremy pgpPjGTbftMMI.pgp Description: PGP signature