Friday, March 27, 2015

Linux: search history by up/down arrow keys


In shell, if you want to access the last used commands you can use the up and down arrow keys.
But, if you want to search through the history you have to use the 'Page Up' and 'Page Down' keys. I find it very annoying to use two different set of keys which almost does the same purpose.

How to fix it ? Go to ~/.bashrc and stick these two lines...

bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'

Now you can go through the history sequentially using the up and down arrow keys and
if you type in a letter and press up/down arrow you will search the history for the commands starting with that letter you typed in. Have fun!

Thursday, March 26, 2015

Study # 8





Here is the link to the original photograph. Like how the light is playing around on this simple toy.
Spend 3 hours on this guy. Done in Mypaint 1.1.1-alpha on centos 7.

I recently compiled the latest version of mypaint from git on centos 7.
It is fantastic. Got some amazing new features.
Will explain the compilation process and the new feature in the next post.

Monday, March 23, 2015

back to studies # 7

Its been long i did any studies.
As usual, used mypaint, no color picking and grid. Try to get as much as i can visually. Spend roughly 2 hours.


Wednesday, March 4, 2015

Copy current working directory in shell using hotkey.

In Linux we constantly deal with file paths and moving stuff around in shell. One thing that I've always wished is to have a shortcut key for copying the current working directory. Traditionally I will be doing this...

> pwd
> returns/the/current/working/dir

Leave keyboard, double click the path to copy it using mouse then back to keyboard and move to another tab and paste it with ctrl+shift+v and resume with the work.

Because I do this all the time and will also be helpful for fellow artists at work I wrote a small shell script and stick it in my bash.

bind '"\eOR":"echo -n $(pwd) | xclip -selection clipboard \n"'

With this, I just press F3 and it copies the current working directory to clipboard and I move to the next tab and past it with out moving my hand from the keyboard. Yeah!!

Setup:

For centos you need to install xclip. Run Sudo yum install xclip

Copy the bind command above to your ~/.bashrc. My shortcut key is currently configured to function key F3. You can configure yours by replacing the OR with the escape code for the respective key combination you want.

Hope its of some help.