Contributors:
+ Christian Ruppert <Spooky85@gmail.com> : autotools build system
Kwaku Yeboah <kwakuyeboah@gmail.com> : wiki page
Daniel Moerner <dmoerner@gmail.com> : man page and debian package
Doug Barton : freebsd package
+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
--- /dev/null
+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
-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"
--- /dev/null
+DEPENDENCIES:
+cairo, pango, glib2, libX11, Xinerama, imlib2
+you might need -dev packages on debian
+
--- /dev/null
+#!/bin/sh
+
+[ ! -d m4 ] && mkdir m4
+
+autoreconf -i -s -f
--- /dev/null
+# -*- 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
+++ /dev/null
-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
--- /dev/null
+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
+
}
// 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 };
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;
--- /dev/null
+#---------------------------------------------
+# 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
+