diff options
author | Nathan Isom | 2016-01-19 21:32:56 -0600 |
---|---|---|
committer | Nathan Isom | 2016-01-19 21:32:56 -0600 |
commit | 052c60b3b81c2f245d505c848d17e7b966218a1b (patch) | |
tree | 58ace0935ed7789f607270fdcd425679f131d32a | |
download | aur-052c60b3b81c2f245d505c848d17e7b966218a1b.tar.gz |
initial.
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | Makefile | 18 | ||||
-rw-r--r-- | PKGBUILD | 27 | ||||
-rw-r--r-- | gtkrc-reload.c | 44 |
4 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..34fd5e393901 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +# Generated by mksrcinfo v8 +# Wed Jan 20 03:32:49 UTC 2016 +pkgbase = gtkrc-reload + pkgdesc = An utility to reload the gtkrc configuration for all GTK windows at runtime + pkgver = 0.0.1 + pkgrel = 1 + url = http://aur.archlinux.org/packages.php?ID=44052 + arch = i686 + arch = x86_64 + license = GPL3 + depends = gtk2 + source = gtkrc-reload.c + source = Makefile + md5sums = 567bed7fb76255ce4b5bda47aca2a429 + md5sums = 18d7b9b80726d892d6a9bf65388a5aac + +pkgname = gtkrc-reload + diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..97498ec29c6e --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +CC=gcc +PREFIX=/usr +BINDIR=$(PREFIX)/bin +DESTDIR= +BIN=gtkrc-reload +CFLAGS=`pkg-config --cflags --libs gdk-2.0` + +all: $(BIN) + +$(BIN): + @$(CC) $(BIN).c $(CFLAGS) -o $(BIN) + +install: + mkdir -p $(DESTDIR)$(BINDIR) + install -Dm755 $(BIN) $(DESTDIR)$(BINDIR) + +clean: + @rm -f $(BIN) diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9992d1e3f561 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: Nathan Isom <nathanisom27[at]gmail[dot]com> +# Prev maintainer: SpepS <dreamspepser at yahoo dot it> + +pkgname=gtkrc-reload +pkgver=0.0.1 +pkgrel=1 +pkgdesc="An utility to reload the gtkrc configuration for all GTK windows at runtime" +arch=(i686 x86_64) +url="http://aur.archlinux.org/packages.php?ID=44052" +license=('GPL3') +depends=('gtk2') +source=("$pkgname.c" + "Makefile") +md5sums=('567bed7fb76255ce4b5bda47aca2a429' + '18d7b9b80726d892d6a9bf65388a5aac') + +build() { + cd "$srcdir/" + + make +} + +package() { + cd "$srcdir/" + + make DESTDIR="$pkgdir/" install +} diff --git a/gtkrc-reload.c b/gtkrc-reload.c new file mode 100644 index 000000000000..bbca5ce0da48 --- /dev/null +++ b/gtkrc-reload.c @@ -0,0 +1,44 @@ +/* + * An utility to reload the gtkrc configuration at runtime + * + * Copyright (C) 2010 speps <dreamspepser at yahoo dot it> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +/* Version 0.0.1 */ + +#include <gdk/gdk.h> + +static void reload(); + +int main(int argc, char *argv[]) { + + gdk_init(&argc,&argv); + reload(); +} + +static void reload() +{ + GdkEventClient event; + event.type = GDK_CLIENT_EVENT; + event.send_event = TRUE; + event.window = NULL; + + event.message_type = gdk_atom_intern("_GTK_READ_RCFILES", FALSE); + + event.data_format = 8; + gdk_event_send_clientmessage_toall((GdkEvent *)&event); +} |