1.準備圖片
把滑鼠分為動態和靜態兩種,動態如等待狀態的滑鼠,大部分滑鼠是靜態
動態:動畫的幀數x大小的種類數
靜態:大小的種類數
2.寫conf檔案
內容格式為:
<size> <xhot> <yhot> <filename> <ms-delay>
<size>處寫滑鼠的大小(像素)
<xhot><yhot>滑鼠的有效地區,一般都寫0(注1)
<filename>圖片名
<ms-delay>動態滑鼠使用,每幀圖片的間隔時間
注1:若右側滑鼠(),xhot應該填size的值,yhot填0。若拖動時的滑鼠()xhot和yhot均應是size/2
3.產生
xcursorgen xxxx.conf xxxx
Example:
一、left_ptr檔案
1.準備圖片
left_ptr顯然是靜態,只需用準備不同大小的圖片即可,這裡為了示意只準備了兩個大小
left_ptr_16.png left_ptr_64.png
2.寫left_ptr.conf檔案
16 0 0 left_ptr_16.png 0
64 0 0 left_ptr_64.png 0
3.在terminal中用xcursorgen命令進行轉化
xcursorgen left_ptr.conf left_ptr
二、watch檔案
1.準備圖片
watch是處於等待狀態的滑鼠形狀,是動態,為了示意這裡準備兩種大小,動畫四幀
watch_1_16.png
watch_1_32.png
watch_2_16.png
watch_2_32.png
watch_3_16.png
watch_3_32.png
watch_4_16.png
watch_4_32.png
2.寫watch.conf檔案
16 0 0 watch_1_16.png 50
16 0 0 watch_2_16.png 50
16 0 0 watch_3_16.png 50
16 0 0 watch_4_16.png 50
32 0 0 watch_1_32.png 50
32 0 0 watch_2_32.png 50
32 0 0 watch_3_32.png 50
32 0 0 watch_4_32.png 50
3.在terminal中用xcursorgen命令進行轉化
xcursorgen watch.conf watch