Change Mac OS X Yosemite Green Fullscreen Button

With Mac OS X 10.10 (Yosemite), Apple decided to change the green button in the window title bar to trigger fullscreen mode (in most applications):

The behavior of this button in all versions of Mac OS X up to 10.9 (Mavericks), was to “zoom” the window, that is, make it as large as the content displayed in the window.

The new behavior of this button in Yosemite is not very useful, for several reasons explained in my post Why the New Fullscreen Button in Mac OS X Yosemite Is Bad.

So if you feel that you want to have the old Mavericks behavior back, read on.

Restore the Yosemite Fullscreen Button to a Zoom Button

There is a way to kind of restore the green button behavior of Mavericks in Yosemite.

  1. Install the free BetterTouchTool (BTT) – http://www.boastr.de/
  2. In BTT, switch to “Advanced” view
  3. In the tab “Other”
    1. Select Application: “Global”
    2. Create a trigger: “Leftclick Green Window Button” with Predifined Action “Zoom Window Below Cursor”
  4. You are finished now. To still be able to enter fullscreen mode:
    1. Create a second trigger: “Leftclick Green Window Button” with key modifier “ opt” and assign the Predefined Action “Enter Fullscreen (If Supported)”

BTT should now look like this:

Other Options of Zooming a Window in Yosemite

By default, Yosemite offers two options to zoom a window:

  • double click the title bar
  • Option (alt ) + left click the green fullscreen button

But really, these are just workarounds – having to always press a modifier key to achieve something that used to work with a single click of the mouse is really not practical.

If you know any other way of restoring the zoom button behavior from Mavericks, let me know in the comments!

Why the New Fullscreen Button in Mac OS X Yosemite Is Bad

In Mac OS X 10.10 (Yosemite), Apple changed the window interaction buttons. This change does not improve Mac OS X usability. This post explains why this is so.

Before Mac OS X 10.10 (Yosemite), Mac OS usually provided three buttons for window interactions:

mavericks-buttons-green-yellow-red

The green button was used to “zoom” the window, meaning that the window would enlarge to display all the window content. Because the application would decide how to handle the content, the zoom behaves a bit inconsistent: sometimes it would make the window as large as the whole screen (maximizing it), sometimes the window would only enlarge to fill a certain amount of the screen.

Mac OS X also displayed a fourth button to make the window fullscreen, for applications that supported this mode:

mavericks-fullscreen-button

Fullscreen Mode

Fullscreen mode did (and still does, as of Mac OS X 10.10 Yosemite) have the following negative effects:

  • The dock becomes inaccessible: Even if the dock was set to automatically display when the mouse cursor touches the bottom of the screen, the dock never displays in fullscreen mode.
  • Fullscreen breaks workspaces: Fullscreen doesn’t work well with Mac OS workspaces (it spawns a new workspace for each application that uses fullscreen), so if you’re using workspaces to structure your applications, that won’t work.

Other reasons against using fullscreen mode are outlined in the following sections.

Fullscreen Doesn’t Make Much Sense for Most Applications

I understand that a fullscreen mode does make sense in some cases:

  • Applications that display images or video content – avoiding clutter on the screen is nice in these cases.
    But: Most of these applications (e. g. Quicktime Player, Apple Preview, VLC) have always had their own fullscreen mode exacly for this reason, so a fullscreen mode centrally provided by the operating system is not necessary.
  • Applications that have huge user interfaces in a single window and are used for long periods of time exclusively. I can imagine a CAD/CAM (Autodesk) or image manipulation (Photoshop) software as an example.
    But: Most of these applications use several windows for their tools and pallettes, and fullscreen doesn’t make much sense then, because several small windows need to be managed anyway.

Except for the examples above, for most applications fullscreen doesn’t make much sense. Who needs a fullscreen mode for a Terminal window, for example? Or for Finder windows, which often require using several windows for dragging and dropping?

Fullscreen Doesn’t Save Much Space

Mac OS X’s fullscreen mode does not save much space if you have the dock set to hide automatically. It saves so little space that it is not worth using in my opinion.

To compare, here are two Finder windows, one is maximized, the other in fullscreen mode: maximized-fullscreen-compared

As you can see, going fullscreen saves 36 pixels of vertical space – on a 27″ Thunderbolt display this is only 2,5% of the screen height!

Fullscreen In Yosemite

So in Mac OS X 10.10 (Yosemite) Apple decided to make this fullscreen mode, which is really not very useful as described above, the default for maximizing/zooming a window. Apple did this by changing the green button in the window title bar to trigger fullscreen mode (in most applications):

I understand that Apple often changes basic stuff around in its operating systems and apps, but this is again one thing where they have gone a bit too far.

As going fullscreen is now the default action for this button, this now has even more negative effects:

  • Inconsistent behavior: Not all applications support fullscreen mode. For those applications, the green button still zooms the window.
  • If you’re used to working a lot with maximized/zoomed windows, it interrupts your workflow. It’s really hard to get used to!
  • Slow animations: At least on “older” hardware (late 2012 Macbook Air) the fullscreen animation is choppy in many applications

Workarounds

There are some workarounds for the “Yosemite green button problem”, described in another post: Fix Mac OS X Yosemite Green Zoom/Maximize Button

But these are just workarounds. Please, Apple, give us an option to turn this feature off!

Dvorak Keyboard Layout

This post describes how to use the Dvorak keyboard on Windows, Mac OS, and Linux.

Basically, the standard qwerty/qwertz keyboard layout is bad. That’s why the Dvorak layout was developed. The only problem is that not all good things make it and become a standard.

Let’s take a look at a typical German Dvorak layout:
dvorak
This is a mixture of Dvorak German type 1 and typo 2 layouts, with minor other changes.

Setting up the German Dvorak layout on Windows (XP, Vista, 7)

Since Windows doesn’t come with a Dvorak layout for German keyrboards, you can download the layout shown above: Dvorak Type 2 German for Windows. The layout was created with Microsoft Keyboard Layout Creator. Simply unzip and run the setup.exe, a readme file is included. After installation the layout can be chosen from the task bar, for permananent usage you should make it the default layout in system settings (language/keyboard).

The keyboard layout file linked above may also work on Windows 8, 8.1 and 10 (untested).

How to enable Dvorak layout under Linux/X

Here are some instructions on how to convert your keyboard layout under Linux (X and console) to Dvorak (German variant). To do the same thing in Windows, or any other operating system, please check out the links at the bottom of this page.

Dvorak directly from x.org

Since xorg version 6.9 or so the keyboard layout described here is party of the X-server, which means that one can simply load it by using e.g. KDE’s Control Center. Unfortunately, the included layout is a variant without “nodeadkeys”, which makes it a lot harder to type special characters using AltGr (often needed on German keyboards).

Dvorak via Xmodmap

Download my xmodmap/keysym file containing a German Dvorak keyboard layout for Linux/X. Before enabling the new layout, you should save the old layout to a file:

xmodmap -pke > old-layout.xmodmap

(The old layout can then be reloaded via xmodmap old-layout.xmodmap.)
To temporarily enable the new layout, simply download the above file and then:

xmodmap de-dvorak-keysym.xmodmap

Note that this xmodmap file also contains (hardware) keycodes, which make it hardware dependent. This could cause problems when used with certain keyboards. I had to put these keycodes in to get my <alt gr> key working with the Dvorak layout as it did before. Please also note that my xmodmap file makes <caps lock> an additional left control key. If you really need <caps lock>, take a look at my xmodmap file, and uncomment the three lines that do that (they’re easy to find – somewhere around the middle of the file).

If you would like to go back to your old layout, simply load it (if you saved it before changing, as described above):

xmodmap old-layout.xmodmap

(Instead, you can always restart your x-server: logout and press ctrl+alt+backspace.)

To permanently enable the Dvorak layout on a user level basis, simply store the layout file you downloaded above as .Xmodmap in your home directory (~/.Xmodmap). This file is simply called by xmodmap each time you log in under X. You can easily go back to the console, rename the file and restart X to get back to your old layout.

Dvorak on your console

Thanks to Tobias who sent me a file that allows using a German Dvorak keyboard layout on the console (terminal, without X/GUI). This file can be be loaded by simly saying loadkeys dvorak_de_typeII.kmap.gz To load it at every boot you can copy it to /etc/console/boottime.kmap.gz if you’re on Debian. A user dependent setting can probably be easiest be achieved by adding the loadkeys command (above) to your ~/.bashrc.

German Dvorak layout for US keyboards

At my university there are US keyboards, which bothered me. There are no Umlaute, and many keys are in different positions than on my own machine. So I wrote an xmodmap file that gives me a German Dvorak layout that is almost identical to my layout at home on these US keyboards. “Almost” because some keys simply have different positions. Download my German Dvorak layout on US keyboard file and install it as described above. Please note again that this file contains only keycodes which change the mapping of your keys directly, so this file is completely hardware dependent. This file will also make <Caps_Lock> an additional (left) control key, which I find very useful.

My experience with Dvorak so far

It’s now been about 12 years that I’ve switched my layout from QWERTZ/QWERTY to Dvorak. My experience has been very positive. I was able to touch type with qwerty/qwertz before. I think that with Dvorak I’m faster, and Dvorak definitely feels more comfortable and ergonomic to me. For me it requires notably less finger travel. Two weeks after my initial switch (not training, just normal usage) I was already able to take part in an online chat session, a thing that usually requires a good typing speed. Also, even though I use a German Dvorak layout, typing in English is better with it than typing with a standard English qwerty layout.
Concludingly I can only recommend everyone to give Dvorak a shot. It’s not that big of a hassle as you probably think it is to switch to a new layout.

Some links

Some TeX and LaTeX Tips

LaTeX is a great document description language that allows anyone to create documents and papers with a professionally looking layout.

Umlauts in your latex document

It can be a pain to type (German) Umlaute in you latex document. Traditionally, you would have to type something like \”a to get an ä, or something like \ss{} to get a ß. But if you put the following lines in the preamble of your tex-document:

\usepackage[german]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}

This will allow you to simply type “ä” and “ß” to get the appropriate special characters. Actually you don’t need the German babel package (the first line) but this will give you German typesetting (dates, hyphenation).

Nice fonts in your PDF documents produced on Linux using pdflatex

Analogous to $ latex document.tex, which will produce document.dvi, $ pdflatex document.tex will produce the file document.pdf. For some reason this will result in a pdf file that displays with extremely ugly fonts in acrobat reader. To circumvent this problem, put the following in your tex file:

\usepackage{aeguill}

This will use a different font, which displays nicely in acroread.

If you use LyX, simply choose “Format->Document->Font->ae” which has the same effect.

Using vi to efficiently work with latex

If you put the following line in your ~/.vimrc:

:map ^K :w!^M:!clear; echo Making Postscript % ...; latex %; xdvi %<.dvi&^M^M

you can simply press <ctrl>+k to save, compile the tex file you’re editing to dvi and then disply the output in xdvi.
This makes for a very nice WYSIWYG-experience: Simply edit your tex-file, press <ctrl>+k, look at xdvi, then press “q” to quit xdvi, and you’re back in your tex-file.

Please note: You cannot simply paste the above line into your ~/.vimrc. There are some special characters in it (^K = <ctrl>, ^M = <return>) that can’t be pasted. Instead, open the file ~/.vimrc in vi, scroll to the end, and paste the whole line into it. Then, delete these special characters (^K and ^M). To get them back, place your cursor where the ^K was, and (in input mode), press <ctrl>+k, which will display a “?”, i.e. it’s now waiting for a special character. Now, press <ctrl>+k twice, which will result in a “^K”, but this is now *one* (special) character.
Similarly, the “^M”: go into insert mode, then press <ctrl>+k, and when the “?” appears, press <return> twice. This should result in a “^M” as *one* character.

Some links

NHFS – nonhierarchical file system

This page is about NHFS, a nonhierarchical file system.
I developed NHFS for my bachelor’s thesis in Cognitive Science. In short, NHFS allows you to file any file into any number of directories. Likewise, you may place any directory into as many directories as you like. NHFS therefore allows you to create a nonhierarchical directory structure with polyhierarchically connected files. All this is mostly backward compatible – this means, you can use it from any file manager, any other application, and also the command line.

The idea behind NHFS is to enhance usability of the file system for basic file management tasks by allowing the same document to be categorized multiple times, without using impractical band-aid solutions, such as symbolic links.

NHFS has been tested on Linux. Compatibility with FreeBSD and Mac OS X is likely but untested. It requires FUSE (file system in user space), which allows to create a file system running as a user space program. FUSE is currently available for Linux, FreeBSD and Mac OS X.

Download NHFS 1.0

License

This software will be released under an open source license, I haven’t decided on a specific license yet.

Links

My Bachelor’s Thesis

File Systems and Usability – the Missing Link

Abstract:

Usability has never been a priority in file system design. Instead, developers focus mainly on technical aspects, such as speed, reliability, and security. But in recent decades, technological innovations have created a modern information crisis. This is characterized by an ever-growing abundance of easily accessible information. Additionally, the user is able to create and store continuously increasing amounts of digital data. This data is usually managed on the user’s personal computer. Conventional file systems, however, which constitute the most important systems for document management tasks, impose a strict monohierarchy onto the user’s document collection. The user is constrained by the file system’s inability to represent multiple categorizations of documents without utilizing band-aid solutions such as shortcuts. As a possible approach to these issues, a file system prototype is portrayed that permits a nonhierarchical directory structure and polyhierarchical file categorizations while maintaining backward compatibility with existing applications. Furthermore, suggestions are made for carrying out a usability evaluation which could be used to measure the achieved improvement compared to conventional file systems.

Download thesis: File Systems and Usability – the Missing Link

Links

Solutions for the exercises in the book: Haskell – The Craft of Functional Programming

I took a course that used the book: Haskell – The Craft of Functional Programming by Simon Thompson, Second Edition.

Solutions to exercises

Although most of the exercises in the book are not hard if you know some programming, maybe it’s still good to look up somebody else’s solutions to the exercises in Haskell – Craft of Functional Programming.

Note that the correctness of these solutions is not verified. Most of them should be correct, though.

I don’t have access to the book anymore though and will not be able to help you with any of the exercises not in my solutions. Please talk to your tutor :)

Why use email encryption?

This page describes some reasons why email encryption is good and should be used by everyone. It is not about how encryption works technically.

What is encryption?

Encryption is a mechanism that ensures that only the correct recipient of a message is able to read it. When I send a message to Thomas, it is encrypted, that means it is changed in a way that nobody can read it. Only Thomas is able to change it back to the original message (decrypt it), and will then be able to read it.

The mechanism used for this nowadays is called public key cryptography. It eliminates the need to exchange a secret key that makes many traditional encryption schemes much less secure.

It is secure

Have you ever put an envelope around a letter?

Using encryption is a bit like using an envelope. You get the message and you know it has not been read by anybody. (The only difference is that encryption is actually secure; most people could open an envelope and close it with simple technical help. This is not feasible with proper encryption.)

Sending an unencrypted email is much less secure than sending a postcard. Like a postcard, anyone who can get a hold of an email can read it, copy it, and even change the content. An email usually passes through a large number of computers and other network nodes. At all times can it be read by the people who are in charge of these computers and network equipment.
But unlike a postcard, emails can easily be both automatically stored and also screened for certain types of content, which makes them very easy to harvest as a source of information.

Encryption makes sure only the addressee of the email is able to read it. Good encryption (like GPG) is so secure that it would not be possible for an attacker to read a message not addressed to him even if he had access to today’s largest computers for his attack. In fact, a properly encrypted message will not be readable for many years (even decades) to come, unless one is in the possession of the decryption key.

So basically, encryption is not at all about sending secret messages (even though it can be used for it), but about putting envelopes around your messages.

Do you respect your correspondent’s privacy?

Maybe you do not care about your own privacy (even though you should). But any email you send contains information about the person(s) you send it to. So if you are sending unencrypted (insecure) email, you might very well be revealing information about your correspondent. Your correspondent may not like this! What is public information for you may be personal for other people.

It is easy to use secure email

Using a plugin for your email program (Microsoft Outlook, Mozilla Thunderbird, etc.), using encryption becomes very easy. Properly set up, you do not even notice that emails are encrypted during everyday usage.

It can verify the sender and the correctness of the message

One of the uses of public-key cryptography is signing. Signing a message enables the recipient to verify that it is really coming from the sender it seems to be coming from. Signing also ensures that the message has not been changed on its way.

Do you know who is interested in your mail now? In 10 years?

I administrate the email server for a webhosting company. We have both business and private customers. As the administrator, it is very easy for me to read all their mail. With the knowledge gained I could probably ruin businesses and relationships. Some of it could probably be sold profitably.

You may trust your government now, but times are changing quickly today. With laws on the way (in the EU and Germany) that will force providers to store customer emails for several years, now is the time to make sure that their content could never be turned against you, or your correspondents.

Links