About Archive Tags RSS Feed

 

Entries tagged tscreen

Take a portable terminal, go out there and patch in manually.

18 October 2008 21:50

I might regret this later, but until I recant:

This features several changes already, and a few more are pending.

ObFilm: Aliens

| 8 comments

 

Well, personally, I'm here because I need a job.

18 October 2008 21:50

A busy few hours last night hacking at tscreen, and again today.

I'm now very pleased with the functional aliases:

#
#  Caption toggle
#
alias caption_off  eval "caption splitonly"
alias caption_on   eval "caption always"

#
#  Status toggle
#
alias status_off   eval "hardstatus ignore"
alias status_on    eval "hardstatus alwayslastline"

#
#  Disable both caption and status, and show a message.
#
alias fullscreen   eval "status_off" "caption_off" "echo 'fullscreen'"
alias captioned    eval "status_on"  "caption_on"  "echo 'captioned' "

#
#  Bind these functions to keys
#
bind f eval fullscreen
bind F eval captioned

I've made binary & source packages of a slightly earlier version of the code available for Etch and Sid - both AMD64 - and I'll release another update once I can drop the need for that eval usage in the "bind" and add TAB completion for aliases.

ObQuote: Passage To India

| 10 comments

 

May you live forever.

20 October 2008 21:50

This will be my last post on the topic of tscreen for at least a couple of days. People who want to follow tscreen work know where to get it.

Anyway this release exposes the notion of layouts - they allow you to save and restore window positions. i.e. If you split your window, detach and then reattach it will be back in the layout you had before!

Simply add "layout new default" to your ~/.tscreenrc file, and have fun.

The layout primitive allows:

  • layout [attach|autosave|next|new|number|prev|remove|save|select|show|title]"

Experimentation is fun, people!

I've added a couple of patches from other people which I found on the screen-devel mailing list:

Anyway sources and Debian packages for Etch, Lenny, & Sid are available in both i386 and AMD64 flavours.

Update: Fixed links to patches, and added if primitive.

ObFilm: 300.

| No comments

 

Please tell me what you're feeling.

24 October 2008 21:50

Twice, recently, people have commented on my post titles. I keep a real journal elsewhere where entries are either untitled, or are titled by quotations. In the past I used to keep a running total of who had guessed the source of the quote, but these days that game gets ignored.

Titles here used to be song lyrics, but these days they are film quotes.

When I started I intended to be a little interesting, and make "happy posts" contain quotes from films I enjoyed watching, and "ironic" or "ranty" posts contain quotes from films I disliked. But that didn't last for long, and I suspect nobody noticed anyway. (Why would they?!)

Regardless that's the only explaination I'll give.

Once or twice I've had people "complain" :

Your titles have no relationship to your posts.

I don't know if your post is a serious one I should read, or a trivial one I should ignore.

To those comments I have several potential response:

  • Either I believe the posts are serious, or I believe they are not. My opinion might coincide with yours, but frankly I have no expectation either way.
  • Read the body, ignore the title. Consider it an ironic commentry on the importance of fashion, where appearance is more important than content.
  • It quickly gets old making titles of the form "Hey, asql released. Again.".
  • I find your ideas intruiging and wish to subscribe to your newsletter.

In short, if you (dis)like what I have to say I'm sure that the title of the post you disagree with is the least important part of that. I'm sure I could say more either way, but since the recent reminder I figured I should write something.

I've almost done so several times but I find it hard to be specific. Regardless the summary is:

"I'll keep this up, whether you like it or not, until I get bored. Regardless of how much I might respect you, and your opinion."

PS. tscreen released. Again.

ObFilm: Star Trek #2 - Wrath of Khan

| 7 comments

 

Bring me everyone.

27 October 2008 21:50

Recently I've been hacking around on GNU screen. I've fixed a few bugs and added a few new features. One of the earliest features I added was the ability to source every file in a directory. One of the later additions was to add simple conditionals to the dotfile, via the new if primitive.

Today I had an epiphany moment. Rather than adding either of these two features I should have altered the behaviour in the far simpler manner.

If we allow ~/.tscreenrc to be an executable we immediately gain lots of things for free.

Consider this ~/.tscreenrc file:

#!/bin/sh

for i in ~/.tscreen/*; do
    if [ -e $i ];
       echo "source $i"
    fi
done

That gives us the effect of a "source directory/" primitive. Similarly I can do complex tests without the need for an if primitive if I were to write this:

#!/bin/sh

# common config
cat ~/.tscreenrc.common

# per host config?
file=~/.tscreenrc.$(hostname --fqdn)
if [ -e "$file" ]; then
   cat $file
fi

# if we have lynx define an alias for it + map it to a key
if [ -x /usr/bin/lynx ]; then
   cat <<EOF

# Surf the web with <Ctrl-a f>
alias web screen -F -t web /usr/bin/lynx
bind w web
EOF
fi

So as of v0.4.7 tscreen allows you to have your configuration file be:

A normal file:

In which case it is parsed as you'd expect.

An executable file:

In which case it is executed and the output is parsed.

The code change is trivial, just an extra stat call and the use of popen vs. fopen, but the payoff is significant.

ObFilm: Léon

| 7 comments

 

Well, are you sure you're using that thing correctly?

31 October 2008 21:50

In response to the comments left on my previous entry about executable configuration files I've changed the way that tscreen works.

There is still support for using an arbitrary shell script or binary as a configuration file, but you must be explicit to enable it:

#
#  Load the dynamic section, if it exists.
#
if -x ~/.tscreen.dynamic  'source ~/.tscreen.dynamic|'

The change here is the trailing "|" on the argument to the source command:

source ~/foo/bar

Opens ~/foo/bar and parses the contents. (Assuming it exists.)

source ~/bin/blah|

Executes ~/bin/blah and parses the output. (Assuming it exists)

I still see no security risk with the previous setup, but I'm happy to apply a little misdirection if that makes people feel better.

ObFilm: Ghostbusters

| 4 comments

 

My code makes it into GNU Screen, and now you can use it. Possibly.

21 March 2012 21:50

Via Axel Beckert I learned today that GNU Screen is 25 years old, and although development is slow it has not ceased.

Back in 2008 I started to post about some annoyances with GNU Screen. At the time I posted a simple patch to implement the unbindall primitive. I posted some other patches and fixed a couple of bugs, but although there was some positive feedback initially over time that ceased completely. Regretably I didn't have the feeling there was the need to maintain a fork properly, so I quietly sighed, cried, and ceased.

In 2009 my code was moved upstream into the GNU Screen repository (+documentation update).

We're now in 2012. It looks like there might be a stable release of GNU Screen in the near future, which makes my code live "for real", but in the meantime the recent snapshot upload to Debian Experimental makes it available to the brave.

2008 - 2012. Four years to make my change visible to end-users. If I didn't use screen every day, and still have my own local version, I'd have forgotten about that entirely.

Still I guess this makes today a happy day!

Wheee!

ObQuote: "Thanks. For a while there I thought you were keeping it a secret. " - Escape To Victory

| No comments