Mostrando entradas con la etiqueta screen. Mostrar todas las entradas
Mostrando entradas con la etiqueta screen. Mostrar todas las entradas

lunes, 23 de diciembre de 2019

Do not delete tmux dead panes

I've been using tmux for about a year. tmux-fingers and the feature that I helped add of instant pasting was what triggered the move.

Even I can't exactly replicate my screen workflow in tmux, I'm more than happy with the tradeoff.

Here's a nice option I didn't know about tmux: "remain-on-exit"

By default, tmux (like screen) kills the panes (or frames, or windows, or however they are called) when the process inside them dies. And usually, that's what you want.

But there's a case when you probably don't want this: "parallell --tmux"

I use GNU parallel as much as I can. I find it an awesome tool. Very hacker friendly and composable with everything you're already doing.

So I was recently using it to build packages for multiple distros. The command was something like  "parallel ./packager.sh --tmux {} ::: alpine ubuntu".  But when the processes finish (both successfully or not), the pane disappears, and doesn't let you review and debug the outputs.

Setting "set-option -g remain-on-exit on" on tmux, leaves every pane opened for your inspection.


miércoles, 25 de noviembre de 2009

lightweight window managers part 1

This is a post (maybe the start of a series of posts) that I was willing to do for some time.

It's related to light window managers. Those wm that do not have lots of dependencies, and that are quite well thought and let you get your job done in a fast and zen-y way.

They usually are a bit hard to get used to (for a wide range values of 'a bit'), but if you try them for some time, you can get hooked to them.

Most of them are made with programmers/geeks in mind, so if you don't feel like programming a bit to configure your wm, or editing a configuration file makes you cringe, you can definately skip this post.

Tiling vs non-tiling
If you don't know what are tiling window managers, it's probable that I won't convince you in this post, but anyway... When I started trying wm as crazy and say tiling window managers for the first time, I thought: "WTF?! I've lost my 'window' feeling" . It didn't convice me because your're too used to have to arrange windows by hand, so not being able to do it by yourself (at least with drag-n-drop) can make you feel caged. Just let time go by, and keep trying one of them from time to time, until you'll see they make you more productive.

Ratpoison wm

Ratpoison is the window manager I've been using for the last 4 years (more or less). It's the most minimalist one I've seen, and due to it's screen-ish keybindings, I just feel@home with it. It has no dependencies besides X, and the compiled binary is 116kb . ratpoison++;

It's a 100% tiling wm. with no window decorations, no menus, no icons, no nothing. It doesn't have a floating layer neither, so if you open multiwindow programs, like Gimp, you'll be probably srcewed until you know how to manage it. My recomendation for gimp is using Xnest and open gimp in a suboptimal wm. Another option is to use ratpoison's tmpwm command, that executes a wm temporally, and when you exit it, you're at your ratpoison home, with your session intact.

Basic usage of ratpoison is the same as GNU screen (click here for a chat-tutorial I did some years ago. Sorry for the bad formatting), but changing c-a for c-t (obviously, you can configure it). So ctrl-t c will open a new terminal, c-t n will show next window in the current frame.... just see 'man ratpoison', or type c-t :help, or info ratpoison.

Configuration
Configuring ratpoison is really easy (well, depending on your estimation for 'really easy').
You can fill your ~/.ratpoisonrc with as many commands as you want, in the same way you'd type them in the ratpoison prompt (when you press c-t : ).

One really nice thing is that you can send commands to ratpoison through the command line.

For example, when you're on it, open a terminal, and just type:
ratpoison -c "split"
Then your running wm will receive the split command, and execute that.

Imagine all the nice things you can do with it :). In your favourite programming/scripting language. :D . system("ratpoison -c 'echo ratpoison rulez' ");

It has also multiscreen support (not as good as I'd like but...).

Now a screenshot of my splitted screen, (although there's really nothing to see):


Ah, and some more screenshots and configs here.
That's all for now. Next to come (in no particular order):
awesome wm, stumpwm and evilwm.

Cya.

martes, 28 de octubre de 2008

Coloschemes en screen y ubuntu

Pues resulta que screen nunca me ha funcionado bien en ubuntu (vectorlinux es mejor ;). Empezando por que si tienes EDITOR="vim" en tu zshrc, dentro de screen, la consola no aceptará ni c-a, ni c-e, ni c-w ..... Se quita y punto.

Los coloschemes de vim o emacs en screen tb se ven jodidos en ubuntu.

Parte relevante de .screenrc para funcionar en rxvt-unicode
-----------------------------8<---------------------------
#a escojer una de estas 3 lineas
term rxvt-unicode
term screen-256color-bce
term screen-256color

attrcolor b ".I"
# tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# erase background with current bg color
defbce "on"


termcapinfo rxvt-unicode 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
terminfo rxvt-unicode 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
-----------------------------8<---------------------------

Aun asi, no funciona, pq ubuntu viene con los paquetes necesarios para un funcionamiento correcto de screen.... apt-get install ncurses-term y solucionao