From: Thierry Lorthiois Date: Sun, 7 Jun 2009 14:06:58 +0000 (+0000) Subject: merge autotool build system by Christian Ruppert X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=38593e9499e81912ca8b0a70bb562925f530cca5;p=chaz%2Ftint2 merge autotool build system by Christian Ruppert --- diff --git a/AUTHORS b/AUTHORS index c01961c..e4320ec 100644 --- a/AUTHORS +++ b/AUTHORS @@ -8,6 +8,7 @@ tint2 is based on ttm source code (http://code.google.com/p/ttm/) Contributors: + Christian Ruppert : autotools build system Kwaku Yeboah : wiki page Daniel Moerner : man page and debian package Doug Barton : freebsd package diff --git a/ChangeLog b/ChangeLog index 9ae0452..a7c5631 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2009-06-07 +- merge autotool build system by Christian Ruppert + 2009-06-06 - fixed issue 56 : with windowmaker bug in windowmaker : send unecessary 'desktop changed' each time focus changed diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..5fa77ff --- /dev/null +++ b/Makefile.am @@ -0,0 +1,27 @@ +rcdir = $(sysconfdir)/xdg/$(PACKAGE_NAME) + +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = doc src +dist_doc_DATA = AUTHORS ChangeLog NEWS README INSTALL +EXTRA_DIST = autogen.sh README.source + +dist_rc_DATA = tint2rc + +if INSTALL_EXAMPLES +examplesdir = $(docdir)/examples +dist_examples_DATA = tintrc01 tintrc02 tintrc03 tintrc04 tintrc05 tintrc06 +else +examplesdir = +dist_examples_DATA = +endif + +DISTCLEANFILES = configure depcomp config.guess config.sub config.h.in config.h.in~ ltmain.sh missing aclocal.m4 install-sh Makefile.in INSTALL + +dist-hook: + find $(distdir)/ -type d -name '.svn' -exec rm -rf {} ';' + +distclean-local: distclean-local-check + +distclean-local-check: + -rm -rf autom4te.cache m4 diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README index 4dd94bf..fcfb5df 100644 --- a/README +++ b/README @@ -1,12 +1,4 @@ -DEPENDENCIES: -cairo, pango, glib, imlib2, xinerama, xrandr - --------------------------------------------------------- -INSTALL: - -cd to "src" and type "make" -as root type "make install" - execute "tint2" or "tint2 -c path_to_config_file" diff --git a/README.source b/README.source new file mode 100644 index 0000000..29990b3 --- /dev/null +++ b/README.source @@ -0,0 +1,4 @@ +DEPENDENCIES: +cairo, pango, glib2, libX11, Xinerama, imlib2 +you might need -dev packages on debian + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..b95a068 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +[ ! -d m4 ] && mkdir m4 + +autoreconf -i -s -f diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..8e3bc01 --- /dev/null +++ b/configure.ac @@ -0,0 +1,92 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. +AC_INIT([tint2], [0.7_beta2], [http://code.google.com/p/tint2/issues]) + +LT_INIT +AM_INIT_AUTOMAKE + +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_SRCDIR([src/tint.c]) +AC_CONFIG_HEADERS([config.h]) + +# Checks for programs. +AC_PROG_CC + +# Checks for libraries. +PKG_CHECK_MODULES([PANGOCAIRO], [pangocairo]) +AC_SUBST(PANGOCAIRO_CFLAGS) +AC_SUBST(PANGOCAIRO_LIBS) + +PKG_CHECK_MODULES([PANGO], [pango]) +AC_SUBST(PANGO_CFLAGS) +AC_SUBST(PANGO_LIBS) + +PKG_CHECK_MODULES([CAIRO], [cairo]) +AC_SUBST(CAIRO_CFLAGS) +AC_SUBST(CAIRO_LIBS) + +PKG_CHECK_MODULES([GLIB2], [glib-2.0]) +AC_SUBST(GLIB2_CFLAGS) +AC_SUBST(GLIB2_LIBS) + +PKG_CHECK_MODULES([GOBJECT2], [gobject-2.0]) +AC_SUBST(GOBJECT2_CFLAGS) +AC_SUBST(GOBJECT2_LIBS) + +PKG_CHECK_MODULES([X11], [x11]) +AC_SUBST(X11_CFLAGS) +AC_SUBST(X11_LIBS) + +PKG_CHECK_MODULES([XINERAMA], [xinerama]) +AC_SUBST(XINERAMA_CFLAGS) +AC_SUBST(XINERAMA_LIBS) + +PKG_CHECK_MODULES([IMLIB2], [imlib2]) +AC_SUBST(IMLIB2_CFLAGS) +AC_SUBST(IMLIB2_LIBS) + +## We need just the header so AC_CHECK_HEADERS might be enough... +#PKG_CHECK_MODULES([XRANDR], [xrandr]) +#AC_SUBST(XRANDR_CFLAGS) +#AC_SUBST(XRANDR_LIBS) + +# Checks for header files. +AC_PATH_X +AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_INT16_T +AC_TYPE_INT64_T +AC_TYPE_INT8_T +AC_TYPE_PID_T + +# Checks for library functions. +AC_FUNC_FORK +AC_FUNC_MALLOC +AC_CHECK_FUNCS([gettimeofday memset select setlocale strcasecmp strchr strdup]) + +AC_ARG_ENABLE([examples], + [AS_HELP_STRING([--enable-examples], [Install additional $(PACKAGE_NAME)rc examples])], + [case "${enableval}" in + yes) examples=true ;; + no) examples=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-examples]) ;; + esac],[examples=false]) +AM_CONDITIONAL([INSTALL_EXAMPLES], [test x$examples = xtrue]) + +AC_ARG_ENABLE([doc], + [AS_HELP_STRING([--enable-doc], [Install additional documentation])], + [case "${enableval}" in + yes) doc=true ;; + no) doc=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-doc]) ;; + esac],[doc=false]) +AM_CONDITIONAL([INSTALL_DOC], [test x$doc = xtrue]) + +AC_CONFIG_FILES([ + Makefile + doc/Makefile + src/Makefile + ]) + +AC_OUTPUT diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 34172db..0000000 --- a/src/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -CFLAGS= -O2 -CC = gcc -FLAGS=-Wall -g `pkg-config --cflags --libs cairo pangocairo x11 xinerama xrandr imlib2 glib-2.0` -PROGNAME=tint2 -FILES=tint.c server.c panel.c config.c taskbar/task.c taskbar/taskbar.c battery/battery.c clock/clock.c systray/systraybar.c util/window.c util/area.c - -ifndef DESTDIR - ifndef PREFIX - BINDIR=/usr/bin - XDG_CONFIG_DIR=/etc/xdg - MANDIR=/usr/share/man - else - BINDIR=$(PREFIX)/bin - XDG_CONFIG_DIR=/etc/xdg - MANDIR=/usr/share/man - endif -else - BINDIR=$(DESTDIR)/usr/bin - XDG_CONFIG_DIR=$(DESTDIR)/etc/xdg - MANDIR=$(DESTDIR)/usr/share/man -endif - - -$(PROGNAME): $(FILES) $(SYSTRAYOBJ) - $(CC) $(CFLAGS) -I. -Iutil -Ibattery -Iclock -Itaskbar -Isystray -o $(PROGNAME) $(FILES) $(FLAGS) - -install: install-strip - -install-strip: - mkdir -p $(BINDIR) - mkdir -p $(XDG_CONFIG_DIR)/tint2 - mkdir -p $(MANDIR) - mkdir -p $(MANDIR)/man1 - strip $(PROGNAME) - install $(PROGNAME) $(BINDIR) - cp -f ../tintrc01 $(XDG_CONFIG_DIR)/tint2/tint2rc - cp -f ../doc/man/tint2.1 $(MANDIR)/man1 - -install-nostrip: - mkdir -p $(BINDIR) - mkdir -p $(XDG_CONFIG_DIR)/tint2 - mkdir -p $(MANDIR) - mkdir -p $(MANDIR)/man1 - install $(PROGNAME) $(BINDIR) - cp -f ../tintrc01 $(XDG_CONFIG_DIR)/tint2/tint2rc - cp -f ../doc/man/tint2.1 $(MANDIR)/man1 - -uninstall: - rm -f $(BINDIR)/$(PROGNAME) - rm -f $(MANDIR)/man1/tint2.1 - -clean: - rm -f $(PROGNAME) - -.PHONY: clean uninstall install install-strip install-nostrip diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..43d95e7 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,34 @@ +AM_CFLAGS = -Wall +AM_CFLAGS += @PANGOCAIRO_CFLAGS@ @PANGO_CFLAGS@ @CAIRO_CFLAGS@ @GLIB2_CFLAGS@ @GOBJECT2_CFLAGS@ @X11_CFLAGS@ @XINERAMA_CFLAGS@ @IMLIB2_CFLAGS@ + +AM_LDFLAGS = -Wl,--as-needed + +bin_PROGRAMS = tint2 +LIBS = @PANGOCAIRO_LIBS@ @PANGO_LIBS@ @CAIRO_LIBS@ @GLIB2_LIBS@ @GOBJECT2_LIBS@ @X11_LIBS@ @XINERAMA_LIBS@ @IMLIB2_LIBS@ +#noinst_LIBRARIES +INCLUDES = -Iutil -Ibattery -Iclock -Itaskbar -Isystray +tint2_SOURCES = config.c \ + util/area.h \ + util/common.h \ + util/area.c \ + util/window.h \ + util/window.c \ + panel.h \ + clock/clock.c \ + clock/clock.h \ + config.h \ + tint.c \ + panel.c \ + server.c \ + server.h \ + systray/systraybar.h \ + systray/systraybar.c \ + taskbar/taskbar.c \ + taskbar/task.c \ + taskbar/taskbar.h \ + taskbar/task.h \ + battery/battery.c \ + battery/battery.h + +DISTCLEANFILES = Makefile.in + diff --git a/src/panel.c b/src/panel.c index 00e75de..e202f81 100644 --- a/src/panel.c +++ b/src/panel.c @@ -254,8 +254,8 @@ void set_panel_properties(Panel *p) } // Dock - long val = server.atom._NET_WM_WINDOW_TYPE_DOCK; - XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, (unsigned char *) &val, 1); + //long val = server.atom._NET_WM_WINDOW_TYPE_DOCK; + //XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, (unsigned char *) &val, 1); // Reserved space long struts [12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -276,7 +276,7 @@ void set_panel_properties(Panel *p) XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_STRUT_PARTIAL, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &struts, 12); // Sticky and below other window - val = 0xFFFFFFFF; + long val = 0xFFFFFFFF; XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_DESKTOP, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &val, 1); Atom state[4]; state[0] = server.atom._NET_WM_STATE_SKIP_PAGER; diff --git a/src/tint2 b/src/tint2 index 19e1c5e..4fa7a6d 100755 Binary files a/src/tint2 and b/src/tint2 differ diff --git a/tint2rc b/tint2rc new file mode 100644 index 0000000..1371d1f --- /dev/null +++ b/tint2rc @@ -0,0 +1,92 @@ +#--------------------------------------------- +# TINT2 CONFIG FILE +#--------------------------------------------- + +#--------------------------------------------- +# BACKGROUND AND BORDER +#--------------------------------------------- +rounded = 7 +border_width = 2 +background_color = #000000 60 +border_color = #ffffff 18 + +rounded = 5 +border_width = 0 +background_color = #ffffff 40 +border_color = #ffffff 50 + +rounded = 5 +border_width = 0 +background_color = #ffffff 18 +border_color = #ffffff 70 + +#--------------------------------------------- +# PANEL +#--------------------------------------------- +panel_monitor = all +panel_position = bottom center +panel_size = 92% 30 +panel_margin = 0 0 +panel_padding = 7 0 +font_shadow = 0 +panel_background_id = 1 + +#--------------------------------------------- +# TASKBAR +#--------------------------------------------- +taskbar_mode = single_monitor +taskbar_padding = 2 3 2 +taskbar_background_id = 0 + +#--------------------------------------------- +# TASKS +#--------------------------------------------- +task_icon = 1 +task_text = 1 +task_width = 140 +task_centered = 1 +task_padding = 6 3 +task_font = sans 7 +task_font_color = #ffffff 70 +task_active_font_color = #ffffff 85 +task_background_id = 3 +task_active_background_id = 2 + +#--------------------------------------------- +# SYSTRAYBAR +#--------------------------------------------- +systray_padding = 0 4 5 +systray_background_id = 0 + +#--------------------------------------------- +# CLOCK +#--------------------------------------------- +time1_format = %H:%M +time1_font = sans 8 +time2_format = %A %d %B +time2_font = sans 6 +clock_font_color = #ffffff 76 +clock_padding = 1 0 +clock_background_id = 0 + +#--------------------------------------------- +# BATTERY +#--------------------------------------------- +battery = 0 +battery_low_status = 7 +battery_low_cmd = notify-send "battery low" +bat1_font = sans 8 +bat2_font = sans 6 +battery_font_color = #ffffff 76 +battery_padding = 1 0 +battery_background_id = 0 + + +#--------------------------------------------- +# MOUSE ACTION ON TASK +#--------------------------------------------- +mouse_middle = none +mouse_right = close +mouse_scroll_up = toggle +mouse_scroll_down = iconify +