After I finished my work on my Ergodox keyboard a couple of months ago I also decided to change my layout. I knew very little about the whole keyboard layout madness out there, only that there are some and all of them claim to be better than QWERT. So I changed to DVORAK because this was the first layout which poped up in my mind. But after some typing sessions my right pinky was really stressed out after a couple of "ls -ltra". I had to give up on DVORAK, so much was clear, because this "ls -ltra" issue was a change to the worse compared to QWERT. I've researched a lot, even calculating a unique layout based on the regular stuff I'm typing. The result looked so alien that I didn't dare to try it.
I then found Workman and after reading his thoughts about it I thought that this is quite familiar with the situation I'm in and his approach of how a modern keyboard layout should look like, convinced my to use it.
I can only recommend it to give it a try. I practiced enough to do my daily job with it with only a small speed impact compared of QWERT.
So here is my layout for Ergodox keyboards.
There is one big thing that you can't avoid if you try learning a new keyboard layout. You will mess up your old one. The only advice I can give you is that you should use a different physical keyboard. Like having a black one for QWERT and a white one for WORKMAN. This will trick your mind and will anchor your brain to "oooh, that's the white keyboard. I need to type differently here".
Update:
Workman Firmware for Ergodox. Here is my firmware file
Oh No, Yet Another Yet Another
Wednesday, July 9, 2014
Get a hyper key on your ergo dox
Hi
Time passes quickly and I'm not really the blogger as it seems. Anyway!
I build my own ergo dox keyboard and wanted to have a "Hyper" modifier key for my emacs.
Since I couldn't figure out if there is a native key code for this I came up with following solutions.
Create a ~/.xmodmap with following content.
Of course that isn't every ones preferred way. The xmodmap commands are pretty self explaining for this simple task
The "remove" removes the control_R key from the control modifiers. Then I link/overwrite Control_R with Hyper_R. Mod3 modifieres were empty on my Debian default xmodmap layout. Check yours with just running xmodmap without any argument. And finally add it the the modifiers list. There is no particular reason why I chose Mod3. As said it was empty and I didn't want to make a mess on my keyboard config.
'keysym' is the most important command. If you need the right control as it is you might choose any other key you want. F12 or Home for instance. I also chose Hyper_R because I had an already configured Hyper_L but I don't know where this should be on my keyboard.
Little side note. xev helps a lot to find out what a key does if you press it.
Time passes quickly and I'm not really the blogger as it seems. Anyway!
I build my own ergo dox keyboard and wanted to have a "Hyper" modifier key for my emacs.
Since I couldn't figure out if there is a native key code for this I came up with following solutions.
Create a ~/.xmodmap with following content.
remove Control = Control_R keysym Control_R = Hyper_R clear Mod3 add Mod3 = Hyper_RThis will transform your right control key into a Hyper key which you can bind in emacs with H a.g. "(kbd "H-c")" is Hyper-c
Of course that isn't every ones preferred way. The xmodmap commands are pretty self explaining for this simple task
The "remove" removes the control_R key from the control modifiers. Then I link/overwrite Control_R with Hyper_R. Mod3 modifieres were empty on my Debian default xmodmap layout. Check yours with just running xmodmap without any argument. And finally add it the the modifiers list. There is no particular reason why I chose Mod3. As said it was empty and I didn't want to make a mess on my keyboard config.
'keysym' is the most important command. If you need the right control as it is you might choose any other key you want. F12 or Home for instance. I also chose Hyper_R because I had an already configured Hyper_L but I don't know where this should be on my keyboard.
Little side note. xev helps a lot to find out what a key does if you press it.
Friday, November 8, 2013
Change date and time the easy way
I recently had the task to simulate some time jumps on the system to test software features which only kick in when I certain amount of time has passed. In my case this was a month. Since I'm a bit lazy and hate to calculate with dates I found this command line to easily change the system date without a lot of thinking
The argument in the single quotes do the stuff I need to set the current clock to 1 month in the future and keeps the actual time. ( if you change the day alone date sets the time to 00:00)
date "+%Y%m%d %H:%M:%S" -s "$(date "+%Y%m%d" -s 'now + 1 month') $(date +%H:%M:%S)"
The argument in the single quotes do the stuff I need to set the current clock to 1 month in the future and keeps the actual time. ( if you change the day alone date sets the time to 00:00)
Friday, September 6, 2013
Make binaries static
This is the second time I need a static compiled executable and of course I forgot how to do it. Actually it is really easy just add "-static" to your build process. The tricky part is where to put it. Some configuration scripts provide a "--enable-static" or "--disable-shared" but this is rarely the case. So if you have some source first configure it as usual (autogen,configure,...) after that edit the Makefile and "-static" to the CFLAGS. That should do the trick. Following block is from emacs 24.3 lib-src Makefile to get a static linked emacsclient.
EMACS = ../src/emacs
EMACSOPT = -batch --no-site-file --no-site-lisp
# ==================== Things `configure' will edit ====================
CC=gcc -std=gnu99
CFLAGS=-g3 -O2 -static
version=24.3
## Used in $archlibdir.
configuration=x86_64-unknown-linux-gnu
EXEEXT=
C_SWITCH_SYSTEM=
Tuesday, September 3, 2013
BASH scripts and white spaces ...
Oh well, it happened again. I was crying of frustration and anger , bit into the desk and shouted wild curses through the office space. Reason for this was a small shell script which iterates through a list of database tables which should be dropped. To do so I called psql with some arguments and a very simple "DROP TABLE $i CASCADE;". This is how the initial attempt of the script looked like.
for i in $TABLES
do
${PSQL} -U ${PSQLUSER} -p ${PORT} -c "DROP TABLE ${i} CASCADE;" ${PGDB}
done
This exploded right into my face with
psql: warning: extra command-line argument "postgres.testtable" ignored
psql: warning: extra command-line argument "CASCADE;" ignored
psql: warning: extra command-line argument "postgres" ignored
psql: FATAL: database "TABLE" does not exist
Eeeek, of course it does that because BASH (in scripts,not command line) ignores my attempt to tell it that my SQL command is one argument and not four. The fact that used quotes is nice but futile. After a lot of try and only errors of escaping, quoting, variable encapsulating , forking shells, using eval and cursing I gave up and started to read documentation.
So finally the right way to do so ,without fiddling with $IFS, is to construct the command you want to run as an array. Following code works as expected.
for i in $TABLES
do
PSQLARGS=( -U ${PSQLUSER} -p ${PORT} -c )
PSQLARGS+=("DROP TABLE ${i} CASCADE;")
PSQLARGS+=(${PGDB})
${PSQL} "${PSQLARGS[@]}"
done
The first call of PSQLARGS defines the array with five elements (separated by spaces), then I add the SQL command as only one element to the array and finally the database. Now running psql with the array of arguments results in a working version of the whole command line.
Wednesday, August 21, 2013
Yet Another
Hi, I try it again with a blog but this time I have a clearly defined goal. Since I'm a Linux administrator I stumble upon all kind of little (or larger) bits of information. Some are really worth to remember and here is comes the problem. I forget things. This blog should help me to keep track of all this knowledge.
I'm now working for more than 14 years with Linux and it always surprises me what things I'm not aware of. Some are really embarrassing when I discover them and I ask myself "You call yourself Admin and don't know this". So be prepared :)
Maybe someone else out there might find a post here useful. Enjoy
Maybe someone else out there might find a post here useful. Enjoy
Greetings
Subscribe to:
Posts (Atom)
