From acd6c64f55180e3dde7968e66e96a068273784df Mon Sep 17 00:00:00 2001 From: Johan Kiviniemi Date: Sat, 16 May 2009 17:27:00 +0300 Subject: [PATCH] themes: Generate unfocused/inactive icons automatically Additionally, use the alpha channel so that the unfocused icons look good on any background, not just black. This adds ImageMagick as a build dependency. Signed-off-by: Johan Kiviniemi Signed-off-by: Julien Danjou --- CMakeLists.txt | 40 ++++++++++++++++++ README | 3 ++ awesomeConfig.cmake | 2 + themes/default/titlebar/close.png | Bin 358 -> 0 bytes themes/default/titlebar/close_normal.png | Bin 431 -> 0 bytes themes/default/titlebar/closer.png | Bin 611 -> 0 bytes .../titlebar/floating_focus_inactive.png | Bin 414 -> 0 bytes .../titlebar/floating_normal_active.png | Bin 386 -> 0 bytes .../titlebar/floating_normal_inactive.png | Bin 349 -> 0 bytes .../titlebar/maximized_focus_inactive.png | Bin 816 -> 0 bytes .../titlebar/maximized_normal_active.png | Bin 738 -> 0 bytes .../titlebar/maximized_normal_inactive.png | Bin 682 -> 0 bytes .../default/titlebar/ontop_focus_inactive.png | Bin 669 -> 0 bytes .../default/titlebar/ontop_normal_active.png | Bin 565 -> 0 bytes .../titlebar/ontop_normal_inactive.png | Bin 590 -> 0 bytes .../titlebar/sticky_focus_inactive.png | Bin 659 -> 0 bytes .../default/titlebar/sticky_normal_active.png | Bin 611 -> 0 bytes .../titlebar/sticky_normal_inactive.png | Bin 597 -> 0 bytes 18 files changed, 45 insertions(+) delete mode 100644 themes/default/titlebar/close.png delete mode 100644 themes/default/titlebar/close_normal.png delete mode 100644 themes/default/titlebar/closer.png delete mode 100644 themes/default/titlebar/floating_focus_inactive.png delete mode 100644 themes/default/titlebar/floating_normal_active.png delete mode 100644 themes/default/titlebar/floating_normal_inactive.png delete mode 100644 themes/default/titlebar/maximized_focus_inactive.png delete mode 100644 themes/default/titlebar/maximized_normal_active.png delete mode 100644 themes/default/titlebar/maximized_normal_inactive.png delete mode 100644 themes/default/titlebar/ontop_focus_inactive.png delete mode 100644 themes/default/titlebar/ontop_normal_active.png delete mode 100644 themes/default/titlebar/ontop_normal_inactive.png delete mode 100644 themes/default/titlebar/sticky_focus_inactive.png delete mode 100644 themes/default/titlebar/sticky_normal_active.png delete mode 100644 themes/default/titlebar/sticky_normal_inactive.png 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 fa8a7724d760022963ae0f9bc604eabe7759415f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 358 zcmeAS@N?(olHy`uVBq!ia0vp^vOp}s!3-n~8`%1Q6k~CayA#8@b22Z19Pa?15LX~= z3kE<2J3G6Gh=`=5q@tptnwpv>2xx(!rjCw|iHV7+sVPvctE;PFdgVgI$hYLGjJsSL#5aR!w0ec>7Ub;rAYZCYTbyJG2+HNh^o#HYX8xu8gW(dC89 zwk-8s>g#grQi5~soG4kdE8alS+VClgi{o@xn0H_EC{d3J&zko5#nyn7=g$QW`xk!8 hOFGYHzjOaV_D|=Rgm7wkLl*ZJzL-j`*a>tzqt zK5IU;f*UM!RqacS?0hz!H$U${MLcDzVh-<6lvuCZuf9|u3 z7nN504*dDC^eeyLv)1l9k-)W)w|1MK&I{eckviSytjb3V5&h_uDn~c{Se=?KCbwyM zEWg~(4_c??mq!SkTim}q~`}qr?(2W3}5LY0*lp3f`L&KkeA&h|`ML{8x zfgy{5A&-HffPn$%kWvPQat4NK1_q#-dIpAO28Ip>hAsw%UIvDK28M|Y3^N%RW-&0# zWnh@cz_6HsVF}nh%NZC}FfgoSWL(X}w2qm1JuB-bcJ|F&Tw8c}w(;_A=i}QYAh1hF zXt#*SUUBh#5)%7mWKO84oKjIar?3D2|Nn?+Uj>qF&D39`g z743Grn9t`}EEX7zMlem2L9MS=D;y37R_!&*~&>~>XEZzgdZ2g-@#7`xrB zfV>|J2DgRl^*VaJ-a~$gqR9MTuh#{W$pnHR{5=2E5I*yRAYcO|q9{VM*{t?b$Oh`_ z;ycY?Hk%b#mR0Q0tja7c759A~)9JJn$8n%2%JbECIvwUQ`T8B(wjs+hD*s4L)8M); ztNud2--jeg`15xsajKB2Cx0uoe@~p={!2wEc%FZ~=sTW@50!i*f&XB;yZ`_I07*qo IM6N<$f@{^f6951J diff --git a/themes/default/titlebar/floating_normal_active.png b/themes/default/titlebar/floating_normal_active.png deleted file mode 100644 index a9899991aa2e505b7a348a84b7c28f10550443a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 386 zcmV-|0e$|7P)F4h2(hz1F0u$ zC}YikM)9=&%o52!7nlBLV4eWMYz_a}6hzZMY0J1RB~xWO(@lebf4%QDG7sGYE76^{QgipG{&c z1J&~b4U~jpAs}Y(A~U6cgQ^7)?p#2_M3FG_B!nC=u5bq_F2i|&1_CryxgW0(0Lai0fgP6=Z1ee=216bchSNq2bGr{GWO?i=EQ9`xkJgBPEmfAFR+@#me?fRas( z638V51v2zhSJ$+c%O5|3APD3*4kbxKRaH?@6ztnD3_2w!iXs!N>zc-Kq-mNS*tRW2 zQADyVf8IdTG%CxI`o5=O7&eJI)bEO_s>+;zwr#VKLDMuT%Q9-3hPtkMAfk~Zi8e)b zT_;6R-WG8jN2m#cfJHPD*`x95BYiZ|4RDA2^E_XOW<1Zo-d}UM2Gm0=O;g4&47cOh z%O6wCxx21QaU3t4&q354GK&ko?=KJhj)>{d8s5j?c^-@6nb@RLqW9u(2KO^9%Q~O) vvp5{WJ#sy|0K4K_yMG$^X}&J{$01w+SI(v1d3~sL00000NkvXXu0mjfPWY4r diff --git a/themes/default/titlebar/maximized_focus_inactive.png b/themes/default/titlebar/maximized_focus_inactive.png deleted file mode 100644 index c3f9676770133a4dd9a806ea2b240cb9527b8835..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 816 zcmV-01JC@4P)b%78FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm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a)EPaaa7u|UOe}L;TynUXAm0}pS zF*M?aM#}KVfPZFrd;j}eh}SU)*6w5HG49RclPo?O!sKPYmsz^$O@Kr1;uGw}e;J}+ URCb$E@&Et;07*qoM6N<$g7W=e4gdfE diff --git a/themes/default/titlebar/maximized_normal_inactive.png b/themes/default/titlebar/maximized_normal_inactive.png deleted file mode 100644 index f3e5a82d99b29f465de7396f3b6fc5b67b1ba930..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 682 zcmV;b0#*HqP)b%78FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0yjxS zK~y-)t(DuWsZkWgH@ROU_sIP&M6w_D1IdfLAY@aNgp?N&+pU!R+4D4Jo19bU_-tp@ zdRXQAtue=#b9sCFPs?C1kj-Y}ZM9nIWuQ{2WZ3)rJN0@!n$2dfgVky^LmQ0-_4|Dq zjYc#a4#{jb(@RQSE*C?)-7bB8elomRERtTY{~1`JP*6Ufr_<>~+wGQ?%O!O>9liu= zMIzDjV7Xk*N?WZKHJeRpx7#$COsHP3lh^AdR3d~!_gf~DQ7)IGkT8+B7^>B3 zDVxnQ^a@WT5?nr1V!Dh*BY8X?Rw|K59tQ;r?l(RH2qnV;R04|t#TkmfLw#xyrV5H9 zkqD=)(P%g%1PR~a`O{#rSj=G9fMC#@P>9aJU;rG8#hwFWa!REVmkv7s#RUit>aT%9 zy&y1D!q44qN9*;Pm0}=p0fNINcDw!7E$9wGV6@I=v*G#2sA4!SmkTTYPM;hO2X_l> z5!4Y-TPPIh>+6dShXcdU=Q9lkgZn-ur_;&aq7p&A;)mn$m{zOR4Zh#+uPt@!6by!t zDf=z3`Fzd~3pQS>R4Vo7{0l4p{sW|p_Y`&jh+tsP%YQE@4_^N0f&R<-1(B##=^-~9 Q5dZ)H07*qoM6N<$f_jiGVgLXD diff --git a/themes/default/titlebar/ontop_focus_inactive.png b/themes/default/titlebar/ontop_focus_inactive.png deleted file mode 100644 index 3310b86f6e88bfbe2b39df5da8351ff962e70c0e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 669 zcmV;O0%HA%P)b%78FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0xC&F zK~y-)t&~Y?VnGyz{YybYmbx$sD!OnWE+pW98$rYgO+s8qg5m^%Gl~d`;z~piF;Nn; za3>mw7~;l_U>ttIX{x}c?X>!&EjXKc^}c)S-dl&oVz?9v1>|x$Sf^f(kB{(pJf{Wo zcsvve1?2O2a5$XP!EH7hMxzlvK0aVH8czofhr?JdmsqdYczAd?4OpwyqSNVMKA%&y zS}iD*%KwM^d_J1(2E14-;B-2V2MYuOTwY#6uh+w3v7lToJU>6<_4O6w@tD?i1Knt~TH*cu9kp5wrBVs$bQ*Ve zceuH^!PV6j$jnoCB9Xw?*Vh(gHk&aPIX|6FQLR>?R;#zO4+evHd3nKPGC4}0pPv{E z1~luPO?A87czSxma5!Y7e!q{mw>OX*%Ve_s4JCCVwd?hId)4iBX%eJA2cdtyG}6p= zyS-D*W|KmHH;Ty;i^WK#QmEJKJ4J3qOzGm{f;m{D(IA`6qEe~smEZ3NpU-Cww%hI0 z$u=S#kH_Q4<#Jp5q-jTa^zH2}lF20fF%$~H>-EBHHp65xArJ`AeeyjLiTs?~ee3@I z9%QbGlQ|p?7z_ql%k%Sd`jkl!5`c)96eFlaBB3VZa=EDY{%e#-T~#U-tX3-xO8kOR zzxRIu66A_ge(#lj00000NkvXXu0mjf D!Rsk0 diff --git a/themes/default/titlebar/ontop_normal_active.png b/themes/default/titlebar/ontop_normal_active.png deleted file mode 100644 index b2a216df65d978ca7b0c9d628f9e2f19f586c7cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 565 zcmV-50?Pe~P)b%78FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0m4Z{ zK~y-)t(09$ltC1LA9q>vBi43Bp;9a{`#^;ts4)A$G!l)FsJy5yQrrts1WAw$Tv&va zh4%$n);$Wad;^#R`-kgdXukcYP%2B(9(L5E$F>YV^5Ah&a24CjzOE)%V z&PY$nF^+G+8L$`ZIqw8<1LHczG^P(Qox^kGJqS5U8OB{`o&96ldpWwkX?%l?X zK3wm`_u$IOLNS7|RW#BrBcVmJ4HAq)tUtxoKX>0OW2|5tw8;;QO{|XNyMJBkUO%Rb z7?q5yW2|Cz3}0W?Dce1m%wnuv!YalhR!49lYx`9Sn9N`-UBEon+K~d>0vlr(a~Cj+ z`^8pkW)?4WVKR>K@M7v^oN7nBTfmq+!x+X*jEO(uBe>j-c)tf@w3Qfxm=c16a%B z4mgxWz6|c<@MDI_&uBg2=`7+(9w*wU+YtETocX^1ynB2`SY-pr00000NkvXXu0mjf D@Xr8v diff --git a/themes/default/titlebar/ontop_normal_inactive.png b/themes/default/titlebar/ontop_normal_inactive.png deleted file mode 100644 index 1a06f686aceede68c701502cbe0e2d9cd104c686..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 590 zcmV-U0b%78FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0ozGL zK~y-)tyN2_K~Wg>$|G-)cZek9nMV?Zfk%myGBGgl7#Jx7GlZYLZfoBt_g?N%=c`q+ z_gVYfYpwGgg+gNK^?K-ZIw<6>cs!0+EG93pTCGN{Rzsyy0e{Oz?D2T8UazrQt>APz z@|zu(7jIK*T!!Dh30>h_M)>4e2%fp)ts z(!%F?3%}nFyWI|(&Gvmzu~@`*yT$c-#pQAlAfZ%n|KV^zr_&L{Pn{=|Nld3x?DzYR zu-olK6e-W6)1MU%hcOzBgalHsTrM%2&4d(8&s+0?!63TbF6Q(3Tab`3%w#hElithg z^$Ig-;49GJY&I*Ml%>^bK|`64SLpS6h(@EI%?@U?TrQ*4YQ04wkq}vyOw2qopLdi> zCEP)b%78FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10w765 zK~y-)rIbHz!Y~xZKNIJV6DLt~0wylN)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