diff options
author | Connor Behan | 2015-07-01 13:15:28 -0400 |
---|---|---|
committer | Connor Behan | 2015-07-01 13:15:28 -0400 |
commit | 2caddb801fcc8d0b75666faabacc625ca6b93c88 (patch) | |
tree | 9305d77851736501409d271332e90f47ef2fe346 | |
download | aur-alltray-scriptable.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 34 | ||||
-rw-r--r-- | alltray-scriptable.install | 10 | ||||
-rw-r--r-- | signal.patch | 30 |
4 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d27848fdf0d1 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = alltray-scriptable + pkgdesc = Drops any app in the tray and waits for a signal to close it + pkgver = 0.70 + pkgrel = 5 + url = http://alltray.sourceforge.net + install = alltray-scriptable.install + arch = i686 + arch = x86_64 + license = GPL + depends = gtk2 + provides = alltray + conflicts = alltray + replaces = alltray + source = http://downloads.sourceforge.net/sourceforge/alltray/alltray-0.70.tar.gz + source = signal.patch + md5sums = 675a0a60f22fae04da787095ef0bd7d9 + md5sums = b7aa418a5f82d1d69eb752868d9c86af + +pkgname = alltray-scriptable + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e9c50c503ffd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,34 @@ +# Contributor: Roberto Salas <ro0xito@gmail.com> +# Contributor: Connor Behan <connor.behan@gmail.com> + +pkgname=alltray-scriptable +pkgver=0.70 +pkgrel=5 +pkgdesc="Drops any app in the tray and waits for a signal to close it" +license=("GPL") +arch=('i686' 'x86_64') +url="http://alltray.sourceforge.net" +depends=('gtk2') +replaces=('alltray') +conflicts=('alltray') +provides=('alltray') +source=(http://downloads.sourceforge.net/sourceforge/alltray/alltray-$pkgver.tar.gz signal.patch) +install="$pkgname.install" + +build() { + # A few dev releases came out after 0.70 but that's it + cd "$srcdir"/alltray-$pkgver + patch -p0 ./src/main.c <"$srcdir"/signal.patch + + ./configure --prefix=/usr --disable-gconf + sed -i -e 's/-lglib-2.0/-lglib-2.0 -lX11/g' src/Makefile lib/Makefile + make +} + +package() { + cd "$srcdir"/alltray-$pkgver + make DESTDIR="$pkgdir" install + mkdir -p "$pkgdir"/etc/alltray +} + +md5sums=('675a0a60f22fae04da787095ef0bd7d9' 'b7aa418a5f82d1d69eb752868d9c86af') diff --git a/alltray-scriptable.install b/alltray-scriptable.install new file mode 100644 index 000000000000..60c19bd4ee22 --- /dev/null +++ b/alltray-scriptable.install @@ -0,0 +1,10 @@ +post_install() { + echo ">> To make alltrays running a command close or undock gracefully," + echo ">> tocuh /etc/alltray/<command>/{close, undock}. Remember to delete it after." + echo ">> Basically this just makes it so you don't have to click the tray." +} + +op=$1 +shift + +$op $*
\ No newline at end of file diff --git a/signal.patch b/signal.patch new file mode 100644 index 000000000000..7e9c8ac72d7d --- /dev/null +++ b/signal.patch @@ -0,0 +1,30 @@ +--- main.c.orig 2007-12-28 16:13:26.000000000 -0500 ++++ main.c 2008-12-26 18:29:49.000000000 -0500 +@@ -329,6 +329,18 @@ + + } + ++static gboolean signal_check(gpointer user_data) ++{ ++ win_struct *win= (win_struct*) user_data; ++ if (g_file_test(g_strconcat("/etc/alltray/", win->command_only, "/close", NULL), G_FILE_TEST_EXISTS)) { ++ destroy_all_and_exit (win, TRUE); ++ } else if (g_file_test(g_strconcat("/etc/alltray/", win->command_only, "/undock", NULL), G_FILE_TEST_EXISTS)) { ++ destroy_all_and_exit (win, FALSE); ++ } ++ ++ return TRUE; ++} ++ + int + main (int argc, char *argv[]) + { +@@ -530,7 +542,7 @@ + if (win->shortcut_key != 0 && win->shortcut_modifier != 0) + shortcut_init (win); + +- ++ g_timeout_add(1000, signal_check, (gpointer) win); + gtk_main (); + + return 0; |