#!/bin/bash # # makes the cursor a lefty one # works on Debian etch with xorg # needs: pcf2bdf, xfonts-utils and gzip # execute as root # # by markus schnalke -- http://marmaro.de # cd /usr/share/fonts/X11/misc # create backup cp cursor.pcf.gz cursor.pcf.gz__`date +%F_%H-%M-%S` # copy to /tmp cp cursor.pcf.gz /tmp cd /tmp # extract cursor gunzip --stdout cursor.pcf.gz > cursor.pcf pcf2bdf cursor.pcf > cursor.bdf # patch # exchanges the code of left_ptr and right_ptr and their masks # the size in line 3 had to be positive, so I adjusted echo "--- cursor.bdf 2007-10-07 00:22:44.000000000 +0200 +++ cursor_lefty.bdf 2007-10-07 00:19:05.000000000 +0200 @@ -1,6 +1,6 @@ STARTFONT 2.1 FONT cursor -SIZE -1 78 78 +SIZE 1 78 78 FONTBOUNDINGBOX 31 31 -15 -16 STARTPROPERTIES 10 @@ -1548,46 +1548,46 @@ ENCODING 68 SWIDTH 548 0 DWIDTH 17 0 -BBX 8 14 0 -14 +BBX 8 14 -7 -14 BITMAP -80 -C0 -E0 -F0 -F8 -FC -FE +01 +03 +07 +0F +1F +3F +7F FF -F8 -D8 -8C -0C -06 -06 +1F +1B +31 +30 +60 +60 ENDCHAR STARTCHAR left_ptr_mask ENCODING 69 SWIDTH 548 0 DWIDTH 17 0 -BBX 10 16 -1 -15 +BBX 10 16 -8 -15 BITMAP -C000 -E000 -F000 -F800 -FC00 -FE00 -FF00 -FF80 +00C0 +01C0 +03C0 +07C0 +0FC0 +1FC0 +3FC0 +7FC0 FFC0 FFC0 -FE00 -EF00 -CF00 -0780 -0780 -0300 +1FC0 +3DC0 +3CC0 +7800 +7800 +3000 ENDCHAR STARTCHAR left_side @@ -2131,46 +2131,46 @@ ENCODING 94 SWIDTH 548 0 DWIDTH 17 0 -BBX 8 14 -7 -14 +BBX 8 14 0 -14 BITMAP -01 -03 -07 -0F -1F -3F -7F +80 +C0 +E0 +F0 +F8 +FC +FE FF -1F -1B -31 -30 -60 -60 +F8 +D8 +8C +0C +06 +06 ENDCHAR STARTCHAR right_ptr_mask ENCODING 95 SWIDTH 548 0 DWIDTH 17 0 -BBX 10 16 -8 -15 +BBX 10 16 -1 -15 BITMAP -00C0 -01C0 -03C0 -07C0 -0FC0 -1FC0 -3FC0 -7FC0 +C000 +E000 +F000 +F800 +FC00 +FE00 +FF00 +FF80 FFC0 FFC0 -1FC0 -3DC0 -3CC0 -7800 -7800 -3000 +FE00 +EF00 +CF00 +0780 +0780 +0300 ENDCHAR STARTCHAR right_side " | patch -N # pack bdftopcf cursor.bdf > cursor_lefty.pcf gzip --stdout cursor_lefty.pcf > cursor_lefty.pcf.gz # install cd - cp /tmp/cursor_lefty.pcf.gz cursor.pcf.gz