Tag: screen
Nice irssi theme to fit with my fancy screen status bar
by mmnicolas on Nov.09, 2009, under gnu/linux
As another part of my basic setup, here is my irssi theme file:
And my precious key bindings, see this post to understand why it is from F7 to F10.
For this to work, just copy/paste this into your irssi:
GNU Screen scroll fix
by mmnicolas on Nov.08, 2009, under gnu/linux
The GNU Screen manual tells you that to use scrolling, you must first enter “Copy mode” with C-a [.
You can easily fix this and use regular PgUp/PgDn by simply adding a line to your ~/.screenrc. I really don’t know why this isn’t a default setting except that it seems to mess with Vim scrollback.
Here’s the line:
termcapinfo xterm ti@:te@
Enjoy.
Auto-reattaching terminal multiplexor with tabs
by mmnicolas on Oct.21, 2009, under gnu/linux
Typically, from a single ssh connection comes a single shell, let’s improve this situation.
We will use a terminal multiplexor GNU Screen, which provide multiple terminals. We will also implement a neat tab bar to allow naming/showing tabs and automatic session re-attachment capability.
Follow these steps to significantly enhance your distant shell experience, you will need to install screen and ssh, mutt and irssi are optional.
The first step involves using environment variables in order to detect if the login is locally originating or not. If the user is logging from a distant machine, we will reattach an existing detached screen session or create a new one.
When logging in remotely, the most evident distinction i’ve found between a local and remote shell is the environment variable SSH_CONNECTION=, with this var we have a way of detecting remote logins easily and launch something else accordingly.
Useful and nice looking shell with GNU Screen
by mmnicolas on Jul.28, 2009, under gnu/linux
This is how i got my linux shell looking so wonderful, using GNU Screen of course and its famous ~/.screenrc configuration file.
Let’s create it and paste this into it:
#hardstatus string ” %wb%-w%wr%n %t%-%+w %=%D %d %M %y %c”
#hardstatus string “%r%c%k | %w% ? (%h)% ?”
#hardstatus string “%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m/%d %{W}%c %{g}]“
hardstatus string ‘%{= c}[ %{W}%H %{c}][%= %{= w}%?%-Lw%?%{c}(%{W}%n*%f%t%?(%u)%?%{c})%{w}%?%+Lw%?%?%= %{c}][%{W} %d/%m %{W}%c %{c}]‘bindkey -k F1 prev
bindkey -k F2 nextscreen -t irssi 1 irssi -c irc.freenode.net
screen -t mutt 2 mutt
screen -t monitor 0 lwatch -i /dev/xconsolehardstatus alwaysignore hardstatus alwayslastline
The whole aesthetic thing reside in the first uncommented line, this is where it sets what is displayed in the hardstatus line which is always the last line. You can find documentation about the variables that can be used to display different types of information in the screen man page. ($ man screen).
As for the bindkey, you’ve guessed they bind keys to go forward and backward in your terminal tabs, and yes F1 means F11, don’t ask me why. I use F11 and F12 because i intend to use F9 and F10 in irssi to move between windows.