-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
49 lines (40 loc) · 1.4 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
.PHONY: help build install uninstall debug restart develop
EXTENSION=intel-gpu-indicator
ZIPFILE=$(EXTENSION).zip
PREFIX=~/.local/share/gnome-shell/extensions/
help:
# make targets
# ============
#
# build build the extension and zip it
# install install the extension in ~/.local
# uninstall uininstall the extension from ~/.local
# debug start watching gnome-shell logs
# restart soft-restart gnome-shell (Xorg only)
# develop same as `make build install restart debug`
#
# For development run `make build install debug`.
# This will build and install the current extension and
# start watching the gnome-shell logs.
build: $(ZIPFILE)
$(ZIPFILE): src
glib-compile-schemas src/schemas/
cd src/ && zip -r $@ *
mv src/$@ .
install: $(ZIPFILE)
mkdir -p ~/.local/share/gnome-shell/extensions/$(EXTENSION)
cp -r src/* ~/.local/share/gnome-shell/extensions/$(EXTENSION)/
#
# ATTENTION: Please reload your changed extension!
#
# Xorg: Press Alt+F2 and run `r` to restart Gnome Shell
# Wayland: Log out and log in again
#
uninstall:
rm -rf ~/.local/share/gnome-shell/extensions/$(EXTENSION)
debug:
journalctl /usr/bin/gnome-shell -f -o cat
restart:
# Run gdbus equivalent of Alt+F2 then r+Enter
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Meta.restart(_("Restarting…"))'
develop: build install restart debug