public
Last active

A lightly edited version of the xcursor theme tutorial by the_One at http://kde-look.org/content/show.php?content=11428

  • Download Gist
xcursor theme tutorial
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
 
<---TUTORIAL FOR CREATING XCURSOR THEMES.--->
<---By ThEOnE @ kde-look--->
<---My_foros@yahoo.com.ar-->
 
_______________________________________________________________________________________
| |
| First of all, let me tell you that everything I know I've learned it by inspecting |
| some xcursor themes like jaguarx, and others. |
| |
| Please accept my apologies for my bad English. I do this because I want to |
| share my knowledge with the Linux community in order to encourage further |
| developments in this field. |
| |
| To create xcursor themes we need few things before we start: |
| |
| First of all you need png format images (the cursor images) that you can make |
| with any graphic program (I personally prefer The Gimp). |
| |
| You can make sequences of images like a gif file; this is for animated cursors. |
| |
| Once you have the cursor images we can proceed to the next step. |
|_____________________________________________________________________________________|
 
 
--------------------------------------------------------------------------------------
 
 
1) The Config files:
 
This file holds information about each of the xcursors. The general structure of the config files is:
 
[size] [x_cordinate_cursor] [y_cordinate_cursor] [path_to_image_file] [refresh_task_of_xcursor]
 
This is a example of the content of a config file:
 
34 10 4 png_images/pointer.png 1000
 
Or if you wanted to make an animated xcursor:
 
34 10 4 png_images/pointer1.png 100
34 10 4 png_images/pointer2.png 100
34 10 4 png_images/pointer3.png 100
34 10 4 png_images/pointer4.png 100
34 10 4 png_images/pointer5.png 100
 
Now you have a config files for each of your xcursor images we can proceed to the next step:
 
______________________________________________________________________________________________________
 
2) Xcursor files generation.
 
The command that we use is "xcursorgen"
 
The usage of this command is as follows:
 
xcursorgen [config_file] [destination_of_xcursor]
 
for each cursor.
 
For example:
 
xcursorgen config1.in cursors/left_ptr
 
This generates a basic xcursor file that we use quite often...
 
You could make a shell script for generating all xcursors.
 
___________________________________________________________________________________________________
 
3) The xcursor files.
 
The xcursor files that you must make are the following:
 
arrow
based_arrow_up
bd_double_arrow
bottom_left_corner
bottom_right_corner
bottom_side
circle
copy
crossed_circle
crosshair
double_arrow
draft_large
draft_small
fd_double_arrow
fleur
h_double_arrow
hand
hand1
hand2
left_ptr
left_ptr_watch
left_side
link
question_arrow
right_ptr
right_side
sb_down_arrow
sb_h_double_arrow
sb_left_arrow
sb_right_arrow
sb_up_arrow
sb_v_double_arrow
top_left_arrow
top_left_corner
top_right_corner
top_side
v_double_arrow
watch
X_cursor
xterm
 
....................................................................................
: :
: NOTE: :
: :
: If you want to make a completely usable theme you must make these xcursors too: :
: :
: 00008160000006810000408080010102 --> sb_v_double_arrow :
: 028006030e0e7ebffc7f7070c0600140 --> sb_h_double_arrow :
: 03b6e0fcb3499374a867c041f52298f0 --> crossed_circle :
: 08e8e1c95fe2fc01f976f1e063a24ccd --> left_ptr_watch :
: 14fef782d02440884392942c11205230 --> h_double_arrow :
: 2870a09082c103050810ffdffffe0204 --> v_double_arrow :
: 3ecb610c1bf2410f44200f48c40d3599 --> left_ptr_watch :
: 4498f0e0c1937ffe01fd06f973665830 --> fleur :
: 6407b0e94181790501fd1e167b474872 --> copy :
: 640fb0e74195791501fd1ed57b41487f --> link :
: 9d800788f1b08800ae810202380a0822 --> hand1 :
: c7088f0f3e6c8088236ef8e1e3e70000 --> top_left_corner :
: d9ce0ab605698f320427677b458ad60b --> question_arrow :
: e29285e634086352946a0e7090d73106 --> hand :
: fcf1c3c7cd4491d801f1e1c78f100000 --> top_right_corner :
: :
:..................................................................................:
 
If you don't provide these xcursors, don't expect your theme to work properly...
 
These xcursors must be generated using the same config file that you used for
generating the corresponding image name shown in the above table.
 
For example, you'll need to run these two commands:
 
xcursorgen config1.in cursors/question_arrow
xcursorgen config1.in cursors/d9ce0ab605698f320427677b458ad60b
 
See how 'question_arrow' corresponds to 'd9ce0ab605698f320427677b458ad60b'?
 
______________________________________________________________________________________________
 
 
Finally we must create a directory in $HOME/.icons with the name of our theme. For example:
 
mkdir $HOME/.icons/my_theme
 
Then we must put the cursors folder that we made with all the xcursor files
in $HOME/.icons/my_theme
 
Then we must edit the file $HOME/.icons/default
In the inherits section you must put the name of your theme; "my_theme" in this case.
 
....................................................................................
: :
: NOTE: :
: :
: You can make your own shell script or edit the one that comes with this tutorial.:
: :
:..................................................................................:
 
Then run ldconfig (as root).
 
Then log out and log in.
 
Then enjoy your own xcursor theme :-) !!
 
#################################################################################################
# #
# You can use the theme that I've included in this tutorial as a starting point. #
# This theme has the image files but not the xcursor files, although but you can build them ....#
# with the shell script. #
# #
# Try this: #
# #
# exec "xcursor_gen.sh" (./xcursor_gen.sh) in the THEME directory of the tutorial. #
# Then exec "install_theme.sh" (./install_theme.sh) #
# #
# I suggest inspecting all files such as config files, images files, and others to fully #
# understand this tutorial. #
# #
#################################################################################################
 
..................................................................................................
: :
: NOTE: :
: :
: :
: This tutorial has many bugs and I hope to improve it with your help... If anyone is :
: interested in making it more understandable, please send me your comments to: :
: My_foros@yahoo.com.ar :
: :
:................................................................................................:

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.