-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
61 lines (54 loc) · 1.69 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
CC=gcc
CFLAGS=-O2 -Wall -Wextra $(shell pkg-config --cflags gtk+-3.0)
LDFLAGS=$(shell pkg-config --libs gtk+-3.0)
THEME_NAME=$(shell cat theme/.name)-generated
THEME_DIR=~/.themes/$(THEME_NAME)/xfwm4
PNG_FILES = \
close-active.png \
close-inactive.png \
close-prelight.png \
close-pressed.png \
hide-active.png \
hide-inactive.png \
hide-prelight.png \
hide-pressed.png \
maximize-active.png \
maximize-inactive.png \
maximize-prelight.png \
maximize-pressed.png \
title-1-active.png \
title-1-inactive.png \
top-left-active.png \
top-left-inactive.png \
top-right-active.png \
top-right-inactive.png \
bottom-active.png \
bottom-inactive.png \
bottom-left-active.png \
bottom-left-inactive.png \
bottom-right-active.png \
bottom-right-inactive.png \
left-active.png \
left-inactive.png \
right-active.png \
right-inactive.png \
menu-active.png \
menu-inactive.png
generator: theme-generator.c
$(CC) $(CFLAGS) theme-generator.c -o theme-generator $(LDFLAGS)
install:
mkdir -p $(THEME_DIR)
cp theme/themerc $(THEME_DIR)
for png_file in $(PNG_FILES); do \
image=$${png_file%.png}; \
convert theme/$$png_file -alpha set +dither $(THEME_DIR)/$$image.xpm; \
done
for n in 2 3 4 5; do \
cd $(THEME_DIR) && ln -sf title-1-active.xpm title-$$n-active.xpm; \
cd $(THEME_DIR) && ln -sf title-1-inactive.xpm title-$$n-inactive.xpm; \
done
set-theme:
xfconf-query --channel xfwm4 --property /general/theme --set Default
xfconf-query --channel xfwm4 --property /general/theme --set $(THEME_NAME)
.SILENT: install set-theme
.PHONY: install set-theme