Skip to content

Instantly share code, notes, and snippets.

@sole
Created September 9, 2010 12:34
Show Gist options
  • Star 28 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save sole/571812 to your computer and use it in GitHub Desktop.
Save sole/571812 to your computer and use it in GitHub Desktop.
A lightly edited version of the xcursor theme tutorial by the_One at http://kde-look.org/content/show.php?content=11428
<---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 :
: :
:................................................................................................:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment