kick my mouse away

69
Kick my mouse away! 聚乳酸 @SITCON 2013

Upload: xatierlike-lee

Post on 14-May-2015

412 views

Category:

Technology


4 download

DESCRIPTION

my slides at sitcon 2013 http://sitcon.org/2013/

TRANSCRIPT

Page 1: Kick my mouse away

Kick my mouse away!

聚乳酸 @SITCON 2013

Page 2: Kick my mouse away

隔壁棚的 raincole 是我的好朋友

希望這場 talk 不要把他的觀眾吸走了 :P

Page 3: Kick my mouse away

本議程獻給我最愛的小趴,沒有她我無法有足夠的勇氣

上台完成 20 min 的羞恥 play

Page 4: Kick my mouse away

台下 ______ 表示:

Page 5: Kick my mouse away
Page 6: Kick my mouse away

About me

● a.k.a. xatier● a geek, Perl lover● 來自中華台中,現居鬼城新竹● 專長:顧家

● 隨身攜帶的 MacBookAir 只是行動電源, Android 手機常常玩到沒電 :- \

● Plurk / twitter 重度成癮者

Page 7: Kick my mouse away

既然都來到了 118 ( 跪 )

Page 8: Kick my mouse away

既然都來到了 118 ( 跪 )

媽,我在這 ! .__.\~/

Page 9: Kick my mouse away

problem

Page 10: Kick my mouse away

We have a lot of works!

Page 11: Kick my mouse away

效率

Page 12: Kick my mouse away
Page 13: Kick my mouse away
Page 14: Kick my mouse away
Page 15: Kick my mouse away

Yes, we are LAZY!

Page 16: Kick my mouse away

Translation

● 程式設計師的美德:

– 懒惰– 急躁– 傲慢

Page 17: Kick my mouse away

What we need

Page 18: Kick my mouse away
Page 19: Kick my mouse away

Hotkeys!

Page 20: Kick my mouse away

日常操作中 ...

● 移動視窗● 關閉視窗● 切換視窗

● 切換 workspace● Maximize / Minimize● 調整視窗大小

Page 21: Kick my mouse away

More ...

● Launch a terminal● Launch a program● Run a piece of code● etc ...

Page 22: Kick my mouse away

平均幾秒鐘需要放下鍵盤去按滑鼠或觸控板 ?

Page 23: Kick my mouse away

重新思考日常的視窗操作

● 太多操作需要拿起滑鼠– 工作和思路 被打斷

– 手指必須被迫離開鍵盤

● 太多冗餘的操作– 時間的浪費

– 工作效率的降低

Page 24: Kick my mouse away

awesome window manager

Page 25: Kick my mouse away

效率

Page 26: Kick my mouse away
Page 27: Kick my mouse away
Page 28: Kick my mouse away

http://awesome.naquadah.org/

Page 29: Kick my mouse away

Why awesome?

● Very well documented source code and API● highly configurable (in Lua scripts)● No mouse needed:

– everything can be performed with keyboard;● Several screens / several tags support

●爽

Page 30: Kick my mouse away

The awesome's way

● 沒有華麗的特效

● 自動調整視窗大小 (tiling)– 不必手工解決重疊等問題

● 僅可能的減少滑鼠操作

– 讓你的雙手可以黏在鍵盤上

● 提供清楚的文件與 API– 撰寫自己的 extensions!

Page 31: Kick my mouse away

Common operations

● 移動視窗 / 調整視窗大小

– Don't need! – Automatic tiling layout

● 關閉視窗

– Mod4 + Shift + c (close)● 切換視窗

– Mod4 + j / k● 切換 tag (workspace)

– Mod4 + n (or ← & → )● 上一個 tag

– Mod4 + ESC

Page 32: Kick my mouse away

Common operations

● Maximize– Mod4 + m

● Minimize– Mod4 + n

● restore minimize– Mod4 + Ctrl + n

● Fullscreen– Mod4 + f

Page 33: Kick my mouse away

Common operations

● Focus next screen– Mod4 + Control + j / k

● Send to other screen– Mod4 + o

Page 34: Kick my mouse away

Switch layouts

● Next layout – Mod4 + space

● Previous layout– Mod4 + Shift + space

● Floating– Mod4 + Control + space

Page 35: Kick my mouse away

Run ...

● Run prompt

– Mod4 + r● Run Lua code prompt

– Mod4 + x● Open main menu

– Mod4 + w● Spawn terminal emulator

– Mod4 + Return

Page 36: Kick my mouse away

Write extensions!

● Lua– http://lua-users.org/wiki/LuaTutorial

● Awesome wiki– http://awesome.naquadah.org/wiki/Main_Page

● API documentations– http://awesome.naquadah.org/doc/api/

Page 37: Kick my mouse away

Move my mouse

https://github.com/xatier/rc-files/blob/master/rc.lua

Page 38: Kick my mouse away

Search The F*cking Web

Page 39: Kick my mouse away

Debugging

● Redirector awesome's stdout & stderr

● naughty – the notification librarynaughty.notify( {title='Ouch!!', text="something broken Q_____Q", timeout=10})

In ~/.xinitrc:

exec awesome >> ~/.cache/awesome_stdout 2>> ~/.cache/awesome_stderr

Page 40: Kick my mouse away

工作效率革新

Page 41: Kick my mouse away

Part 2Play with my keyboard

Page 42: Kick my mouse away

Editor war

http://en.wikipedia.org/wiki/Editor_war

Page 43: Kick my mouse away

arrow keys

Page 44: Kick my mouse away

Shells: emacs mode

● C-a / C-e● C-p / C-n● C-b / C-f● M-f / M-b● C-j / C-k● C-r / C-t● C-u / C-w (?

Page 45: Kick my mouse away

Shells: emacs mode

● C-a / C-e Home / End● C-p / C-n ↑ / ↓● C-b / C-f ← / →● M-f / M-b ←[w] / [w]→● C-j / C-k [Enter] / [del]→● C-r / C-t search / exchange● C-u / C-w (? ←[del] / [del] [w]

Page 46: Kick my mouse away

Shells: emacs mode

● C-a / C-e Home / End● C-p / C-n ↑ / ↓● C-b / C-f ← / →● M-f / M-b ←[w] / [w]→● C-j / C-k [Enter] / [del]→● C-r / C-t search / exchange● C-u / C-w (? ←[del] / [del] [w]

set -o vi

Page 47: Kick my mouse away

Vimium

● The Hacker's Browser● In fact, a browser extension● https://github.com/philc/vimium● MIT Licensed

Page 48: Kick my mouse away

dwb

Page 49: Kick my mouse away

dwb

● Wizard's Browser (?● a lightweight browser based on webkit and gtk

with vim key binding● highly configurable● Extensions and userscripts support● Ad / flash blocking● http://portix.bitbucket.org/dwb/● GPL Licensed

Page 50: Kick my mouse away

w3m

● text-based web browser ● highly configurable● http://w3m.sourceforge.net/● Emacs-w3m● Lynx● w3m -dump google.com

● MIT Licensed

Page 51: Kick my mouse away

How to become a hacker

感謝 Irvin 學長圖片提供! <(_ _)>

Page 52: Kick my mouse away

Yahoo weather 的故事 ( 三倍速

Page 53: Kick my mouse away

696 lines of html!

● wget http://tw.weather.yahoo.com/today.html -O - | wc -l

Page 54: Kick my mouse away

696 lines of html!

● wget http://tw.weather.yahoo.com/today.html -O - | wc -l

Page 55: Kick my mouse away

w3m make the work so easy!

● w3m -dump http://tw.weather.yahoo.com/today.html

Page 56: Kick my mouse away

w3m make the work so easy!

● w3m -dump http://tw.weather.yahoo.com/today.html

Page 57: Kick my mouse away

parse the result with shell tools

awk '{print $1 $2 $3 $4}' |

grep -P "\[\d\d\]" | sed -e 's/\[..\]/ /'

Page 58: Kick my mouse away

parse the result with shell tools

awk '{print $1 $2 $3 $4}' |

grep -P "\[\d\d\]" | sed -e 's/\[..\]/ /'

Page 59: Kick my mouse away

ranger

● a console file manager with VI key bindings● Python● highly configurable● file previews

– Img2txt, pdftotext ...● http://ranger.nongnu.org/● GPLv3 Licensed

Page 60: Kick my mouse away

apvlv

● PDF/HTML/TXT viewer with vim-like behaviour● Common settings are configurable in ~/.apvlvrc● http://naihe2010.github.com/apvlv/● GPL Licensed

Page 61: Kick my mouse away

cmus

● C* Music Player● a small, fast and powerful console music

player● remote with Unix socket● highly configurable and beautiful themes● man cmus(1) cmus-tutorial(7)● http://cmus.sourceforge.net/● GPLv2 Licensed

Page 62: Kick my mouse away

cmus

● C* Music Player● a small, fast and powerful console music

player● remote with Unix socket● highly configurable and beautiful themes● man cmus(1) cmus-tutorial(7)● http://cmus.sourceforge.net/● GPLv2 Licensed

Page 63: Kick my mouse away

mplayer

● 神器,不解釋 (X

$ mplayer -vo matrixview$ mplayer -vo aa -monitorpixelaspect 0.5$ mplayer -vo caca

Page 64: Kick my mouse away

但是最終的神器 ...

Page 65: Kick my mouse away

但是最終的神器 ...

以上你通通都有了!(誤

Page 66: Kick my mouse away

More tricks and hacks?

Page 67: Kick my mouse away
Page 68: Kick my mouse away

Q&A?

Page 69: Kick my mouse away

Never Live Demo

如果講到這張 slides 還有時間的話 ...