Posts

Showing posts from May 26, 2013

Linux, emacs: Symbols for Super, Hyper keys

Linux. Here's a proposal of a logo/symbol for the Super and Hyper key:Super Key ❖ (BLACK DIAMOND MINUS WHITE X, 10070, x2756)Hyper Key ✧ (WHITE FOUR POINTED STAR, 10023, x2727)For Ctrl, Opt, Alt, etc, see: Unicode: Keyboard Symbols, UI Icons ↹ ⌫ ⌘ ✉ ✍ ⌖

AutoScroll on Linux Google Chrome Browser

another mousing tip. For those of you on Linux, using Chrome, there's no mouse wheel scroll acceleration. Worse, there's no autoscroll. That is, you can't middle click on a area and move mouse to pan the page.Solution: install a AutoScroll extension. There's quite a number of them. But the first one i tried, and works fine, is this one: https://chrome.google.com/webstore/detail/autoscroll/occjjkgifpmdgodlplnacmkejpdionanOr, you can buy a Logitech mouse sporting Hyperscroll, that is, the wheel spins. Logitech Gaming Mouses Review or Logitech Mouse with Spin Wheel. (i recommend the gaming ones, because for the same money, they are better, more buttons.)

the myth qwerty dvorak keyboard layout

Image
there's a myth of myth about Dvorak layout being not much efficient than QWERTY.it's strange. Typically, they are made by people who never touch type any of the alternate layouts, OR, from a new layout creator selling his layout.It typically goes like this:Contrary to popular belief, the QWERTY layout was not designed to slow the typist down, but rather to speed up typing by preventing jams.—Wikipedia article on QWERTY as of 2013-05-31 at 〔QWERTY〕, citing from a passage on Maltron's website, which sells the Maltron layout. This: http://www.maltron.com/keyboard-info/technical-keyboard-information/academic-papers/236-lillian-malt-papers.htmlHere's another one, from the famous design critic, Donald Norman. Quote:Wrong. Crowley and Cohen perpetuate the false belief that qwerty was intended to slow typing. In fact, it is one of the fastest keyboards around. There's not enough space here to explain fully. But I have done experiments on and published a lot about this. Qwe…

Linux: gnome, xfce, where is trash location

Perm URL with updates: http://xahlee.info/linux/linux_trash_location.htmlWhat's the Linux command to put things in trash?You can do gvfs-trash ‹filepath›. Where is the trash folder?Example trash location:〔~/.local/share/Trash/〕 → on your local file system.〔/media/PENDRIVE/.Trash-1000/〕 → on a USB drive.〔/root/.local/share/Trash/〕 → if you are root, on your local file system. How does Linux Trash Work?In the trash dir, there are 3 dirs:〔expunged〕→ (this is not in spec.)〔files〕 → contains the actual trashed files.〔info〕 → contains text file that has info about trashed file.For example, if you have a file at 〔/home/jane/Downloads/cat.jpg〕 and you deleted to trash. Then, you'll have:〔~/.local/share/Trash/files/cat.jpg〕〔~/.local/share/Trash/info/cat.jpg.trashinfo〕and the file 〔cat.jpg.trashinfo〕 will have content like this:[Trash Info] Path=/home/jane/Downloads/cat.jpg DeletionDate=2013-05-29T00:09:26You can delete the trash dir. ⁖ rm -rf ~/.local/share/Trash/.Reference. 〔The FreeDes…

GUI vs Command Line — a Unified Design

Perm URL with updates: http://xahlee.info/comp/gui_vs_command_line_unified_scheme.htmlProblems of Graphics User InterfaceGUI is great, especially for new users. Though, there are many problems with GUI. Example:Instruction on using it becomes elaborate and imprecise. Also, the GUI changes overtime (just consider how to turn off cookies in web browser), so instruction becomes ineffective. When in a programing environment, GUI apps can't be precisely controlled, as API.For example, try to tell a newbie how to change mouse settings. It goes like this: go to the menu at lower left, then you should see a Control Panel menu somewhere, open it, click on upper right to list all items, then you should see a the one with mouse icon, double click it, then there should be a tab named xyz, in there, left panel, there's a sub tab, click that, then there's a slider….Problems of Command Line InterfaceCommand line is great, efficient, precise, but it suffers for many inherent problems in t…

ErgoEmacs Terminal Arrow Fix

Matthew L Fidler fixed a long-standing major bug in ErgoEmacs keybinding. See: https://code.google.com/p/ergoemacs/issues/detail?id=37In terminal, when you press arrow keys, ErgoEmacs will insert gibberish. This is a semi-bug in emacs.In emacs, put this in your init:(global-set-key (kbd"M-O") 'forward-char)nothing but just that line. Then, start emacs by emacs -nw. Then press any arrow key, you'll see that it insert gibberish.This is related to escape sequence in terminal. Kinda have to do with terminal history. The arrow keys actually send escape sequences, and somehow, so does emacs's 【Meta+O】. (this is why emacs's Meta can also be pressed by Esc)From user's perspective, this is clearly a emacs bug, but it might be such historical issue that it's hard to fix or can't be fixed. A related issue is that in emacs running in terminal, it can't distinguish between 【Ctrl+A】 and 【Ctrl+a】.

How to Stop Xfce from Loading Last Session

in the control panel, you can set whether to load last session when computer starts. There's a app named “Sessions and Startup”. However, it doesn't work well. I can't find a place where it says to stop loading last session. Then, in the Logout popup, there's a checkbox, but if you uncheck, it still loads old session.Here's how you can clean the session.run this:rm -rf ~/.cache/sessions/Then restart. sudo shutdown -r 0.

laser mouse is inferior to optical mouse!

Perm URL with updates: http://xahlee.info/kbd/mouse_optical_vs_laser.htmlBoth optical and laser mouse use light technology.Optical mouse uses LED, while laser uses laser.Optical is earlier tech, laser is more “advanced” tech.Optical mouse has a big red light at bottom. Laser ones are invisible.Laser tech can track on more surfaces, such as on glass, and with higher frequency.Laser mouse jitters when you lift the mouse, optical doesn't.For gamers, laser mouse may actually be worse.Here's a simple test you can do.Lift your mouse slowly up, but try not to move the mouse.If you are using a laser mouse, you'll see that the pointer jitters.If you are using a optical LED mouse, the pointer does not move.A even more spectacular test is just to pick up your mouse and stick your finger in the laser hole. You'll see your pointer jitters randomly, yet your finger is absolutely still.See also:What's Mouse DPI? Does Mouse DPI Matter in Gaming?Logitech Mouse with Spin WheelWhy Yo…

color model conversion in emacs lisp

For emacs lisp coders, there's a newish color package 〔color.el〕, bundled with emacs 24.3 at least.the package lets you convert colors from various models and formats. ⁖ RGB, HSL, HSV, named color values, and things like finding the color complement.call describe-function on color-rgb-to-hex and you'll have a link to it.it's written by Julien Danjou, Drew Adams. Superb. Thanks guys.For more info and sample code, see: http://ergoemacs.org/emacs/elisp_convert_rgb_hsl_color.html

emacs tip: save cursor position across sessions

Perm URL with updates: http://ergoemacs.org/emacs/emacs_save_cursor_position.htmlYou can save the cursor position for every file you opened. So, next time you open the file, the cursor will be at the position you last opened it.Put this code in your emacs init file:;; turn on save place so that when opening a file, the cursor will be at the last position. (require 'saveplace) (setq save-place-file (concatuser-emacs-directory"saveplace.el") ) ; use standard emacs dir (setq-default save-place t)This mode is ancient, from 1993. 〔saveplace.el〕 is written by Karl Fogel, who is active on emacs dev mailing list as of 2013-05-26. Karl is also famous as the one who wrote one of the first open source book (if i recall correctly, it became the offical cvs documentation for many years). Karl is also the author of Emacs's Bookmark Feature. Thanks Karl.

logitech mouse free-spin scroll wheel

Image
Perm URL with updates: http://xahlee.info/kbd/mouse_with_spinning_flywheel.htmlLogitech came up with mouse wheel that spins freely.Logitech mouse spin wheelIts wheel has 2 modes. Notched vs Free-spin. There's a button below the wheel that lets you toggle the mode.In spin mode, it will keep spinning. (if you push it hard, it can maintain spinning for 28 seconds!) This is very useful for scrolling long pages.Logitech MX1100 mouse wheel spinning. “Logitech Anywhere Mouse MX” amazon1500×1500“Logitech Performance Mouse MX” 1500×1500amazonMost models of their gaming mouse also has flywheel feature. See: Logitech Gaming Mouses Review.If you are buying them, i recommend their gaming model, because, for the same price, the gaming models are often more feature rich, because the market customers there are more tech savvy.10'000 RPM Mouse wheel spin - Logitech Performance MXWhy Spinwheel is Good?Spinning is extremely useful when you don't have accelerated scroll.If you have accelerate…

why you need a 9 buttons mouse

Image
Perm URL with updates: http://xahlee.info/kbd/why_you_need_a_9_buttons_mouse.htmlBasic mouse today has 3 buttons: left, middle (wheel), right. Many mouses today have 5 buttons, by adding 2 extra buttons for the thumb. Usually for browser forward/backward.But many gaming mouses sports 9 or more buttons. Why do you need it?3 standard left/middle/right buttons.2 buttons for browser back/forward.2 buttons for prev/next tab. This is incredibly useful.1 button for closing tab (【Ctrl+w】). Again, extremely useful.That's 8 buttons already. To be luxurious, you'll also want:2 button to switch window or workspace.1 button to close window. (【Alt+F4】)Then, there's desire. You desire:Side scroll wheel is useful. Saves you from scrolling side-to-side that's sometimes handy. Mouse makes count them as 2 buttons.Logitech's flywheel. This is actually critical in Linux, because X11 doesn't support accelerated scroll. Usually, there's a button to toggle this.Resolution switch. …

Logitech G300 mouse. (review for programer)

Image
Perm URL with updates: http://xahlee.info/kbd/logitech_g300_gaming_mouse.html “Logitech G300 Gaming Mouse” amazon1332×13921232×4601168×660Features:WiredSymmetric shape.Optical. (not laser)9 programable buttons. 6 are practically customizable. (the left/middle/right standard ones doesn't count.)On-board memory. (3 profiles for storage of settings)Mouse lights up! Color changes depending on current profile!Instant sensitivity (DPI) change.This mouse is on the small side, good for people with small hands.See also:What's the Difference Between Optical Mouse and Laser Mouse?Why You Need a 8 Buttons Mouse?Logitech G300 Gaming Mouse ReviewOn Linux, you need to run this script to get it to work.#!/bin/shG300_XINPUT_ID=$(xinput list | egrep --color=never "G300.*keyboard" | sed -r 's/.*id=([0-9]+).*/\1/') xinput set-mode ${G300_XINPUT_ID} RELATIVEreferences:https://wiki.archlinux.org/index.php/All_Mouse_Buttons_Workinghttps://wiki.archlinux.org/index.php/Logitech_G300