kick my mouse away

Post on 14-May-2015

412 Views

Category:

Technology

4 Downloads

Preview:

Click to see full reader

DESCRIPTION

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

TRANSCRIPT

Kick my mouse away!

聚乳酸 @SITCON 2013

隔壁棚的 raincole 是我的好朋友

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

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

上台完成 20 min 的羞恥 play

台下 ______ 表示:

About me

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

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

● Plurk / twitter 重度成癮者

既然都來到了 118 ( 跪 )

既然都來到了 118 ( 跪 )

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

problem

We have a lot of works!

效率

Yes, we are LAZY!

Translation

● 程式設計師的美德:

– 懒惰– 急躁– 傲慢

What we need

Hotkeys!

日常操作中 ...

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

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

More ...

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

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

重新思考日常的視窗操作

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

– 手指必須被迫離開鍵盤

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

– 工作效率的降低

awesome window manager

效率

http://awesome.naquadah.org/

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

●爽

The awesome's way

● 沒有華麗的特效

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

● 僅可能的減少滑鼠操作

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

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

Common operations

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

– Don't need! – Automatic tiling layout

● 關閉視窗

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

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

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

– Mod4 + ESC

Common operations

● Maximize– Mod4 + m

● Minimize– Mod4 + n

● restore minimize– Mod4 + Ctrl + n

● Fullscreen– Mod4 + f

Common operations

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

● Send to other screen– Mod4 + o

Switch layouts

● Next layout – Mod4 + space

● Previous layout– Mod4 + Shift + space

● Floating– Mod4 + Control + space

Run ...

● Run prompt

– Mod4 + r● Run Lua code prompt

– Mod4 + x● Open main menu

– Mod4 + w● Spawn terminal emulator

– Mod4 + Return

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/

Move my mouse

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

Search The F*cking Web

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

工作效率革新

Part 2Play with my keyboard

Editor war

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

arrow keys

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 (?

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]

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

Vimium

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

dwb

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

w3m

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

● MIT Licensed

How to become a hacker

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

Yahoo weather 的故事 ( 三倍速

696 lines of html!

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

696 lines of html!

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

w3m make the work so easy!

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

w3m make the work so easy!

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

parse the result with shell tools

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

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

parse the result with shell tools

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

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

ranger

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

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

apvlv

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

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

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

mplayer

● 神器,不解釋 (X

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

但是最終的神器 ...

但是最終的神器 ...

以上你通通都有了!(誤

More tricks and hacks?

Q&A?

Never Live Demo

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

top related