diff --git a/CMakeLists.txt b/CMakeLists.txt index 11906156..f97e1957 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -280,6 +280,46 @@ if(GENERATE_LUADOC) endif() # }}} +# {{{ Theme icons +file(GLOB icon_sources ${SOURCE_DIR}/themes/*/titlebar/*.png) +set(ALL_ICONS ${icon_sources}) + +macro(a_icon_convert match replacement input) + string(REPLACE ${match} ${replacement} output ${input}) + + if(NOT ${input} STREQUAL ${output}) + if(NOT ${output} MATCHES ${BUILD_DIR}) + string(REPLACE ${SOURCE_DIR} ${BUILD_DIR} output ${output}) + endif() + + set(ALL_ICONS ${ALL_ICONS} ${output}) + + get_filename_component(output_path ${output} PATH) + file(MAKE_DIRECTORY ${output_path}) + + add_custom_command( + COMMAND ${CONVERT_EXECUTABLE} ${input} ${ARGN} ${output} + OUTPUT ${output} + DEPENDS ${input} + VERBATIM) + endif() +endmacro() + +foreach(icon ${ALL_ICONS}) + # Make unfocused icons translucent + a_icon_convert("_focus" "_normal" ${icon} + -evaluate Pow 2 -channel A -evaluate Multiply 0.4) +endforeach() + +foreach(icon ${ALL_ICONS}) + # Make inactive icons grayscale + a_icon_convert("_active" "_inactive" ${icon} + -colorspace Gray) +endforeach() + +add_custom_target(generated_icons ALL DEPENDS ${ALL_ICONS}) +# }}} + # {{{ Dist tarball if(BUILD_FROM_GIT) add_custom_target(dist diff --git a/README b/README index 4de85064..c421308c 100644 --- a/README +++ b/README @@ -18,6 +18,9 @@ In order to build awesome itself, you need header files and libs of: - dbus (optional, use -DWITH_DBUS=OFF with cmake to disable) - gperf +As well as the following tools to build theme icons: + - ImageMagick + In order to build the awesome man pages and documentation, you need these tools: - asciidoc diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index 6dbeae13..58bdfcbd 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -58,6 +58,8 @@ a_find_program(GZIP_EXECUTABLE gzip FALSE) # lua documentation a_find_program(LUA_EXECUTABLE lua FALSE) a_find_program(LUADOC_EXECUTABLE luadoc FALSE) +# theme graphics +a_find_program(CONVERT_EXECUTABLE convert TRUE) # doxygen include(FindDoxygen) # pkg-config diff --git a/themes/default/titlebar/close.png b/themes/default/titlebar/close.png deleted file mode 100644 index fa8a7724..00000000 Binary files a/themes/default/titlebar/close.png and /dev/null differ diff --git a/themes/default/titlebar/close_normal.png b/themes/default/titlebar/close_normal.png deleted file mode 100644 index e56a277c..00000000 Binary files a/themes/default/titlebar/close_normal.png and /dev/null differ diff --git a/themes/default/titlebar/closer.png b/themes/default/titlebar/closer.png deleted file mode 100644 index d910f21c..00000000 Binary files a/themes/default/titlebar/closer.png and /dev/null differ diff --git a/themes/default/titlebar/floating_focus_inactive.png b/themes/default/titlebar/floating_focus_inactive.png deleted file mode 100644 index c6ac712a..00000000 Binary files a/themes/default/titlebar/floating_focus_inactive.png and /dev/null differ diff --git a/themes/default/titlebar/floating_normal_active.png b/themes/default/titlebar/floating_normal_active.png deleted file mode 100644 index a9899991..00000000 Binary files a/themes/default/titlebar/floating_normal_active.png and /dev/null differ diff --git a/themes/default/titlebar/floating_normal_inactive.png b/themes/default/titlebar/floating_normal_inactive.png deleted file mode 100644 index 8a5a5ffd..00000000 Binary files a/themes/default/titlebar/floating_normal_inactive.png and /dev/null differ diff --git a/themes/default/titlebar/maximized_focus_inactive.png b/themes/default/titlebar/maximized_focus_inactive.png deleted file mode 100644 index c3f96767..00000000 Binary files a/themes/default/titlebar/maximized_focus_inactive.png and /dev/null differ diff --git a/themes/default/titlebar/maximized_normal_active.png b/themes/default/titlebar/maximized_normal_active.png deleted file mode 100644 index 44d4154a..00000000 Binary files a/themes/default/titlebar/maximized_normal_active.png and /dev/null differ diff --git a/themes/default/titlebar/maximized_normal_inactive.png b/themes/default/titlebar/maximized_normal_inactive.png deleted file mode 100644 index f3e5a82d..00000000 Binary files a/themes/default/titlebar/maximized_normal_inactive.png and /dev/null differ diff --git a/themes/default/titlebar/ontop_focus_inactive.png b/themes/default/titlebar/ontop_focus_inactive.png deleted file mode 100644 index 3310b86f..00000000 Binary files a/themes/default/titlebar/ontop_focus_inactive.png and /dev/null differ diff --git a/themes/default/titlebar/ontop_normal_active.png b/themes/default/titlebar/ontop_normal_active.png deleted file mode 100644 index b2a216df..00000000 Binary files a/themes/default/titlebar/ontop_normal_active.png and /dev/null differ diff --git a/themes/default/titlebar/ontop_normal_inactive.png b/themes/default/titlebar/ontop_normal_inactive.png deleted file mode 100644 index 1a06f686..00000000 Binary files a/themes/default/titlebar/ontop_normal_inactive.png and /dev/null differ diff --git a/themes/default/titlebar/sticky_focus_inactive.png b/themes/default/titlebar/sticky_focus_inactive.png deleted file mode 100644 index d10c2b29..00000000 Binary files a/themes/default/titlebar/sticky_focus_inactive.png and /dev/null differ diff --git a/themes/default/titlebar/sticky_normal_active.png b/themes/default/titlebar/sticky_normal_active.png deleted file mode 100644 index ffb7ccf7..00000000 Binary files a/themes/default/titlebar/sticky_normal_active.png and /dev/null differ diff --git a/themes/default/titlebar/sticky_normal_inactive.png b/themes/default/titlebar/sticky_normal_inactive.png deleted file mode 100644 index d62395a0..00000000 Binary files a/themes/default/titlebar/sticky_normal_inactive.png and /dev/null differ