-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (29 loc) · 814 Bytes
/
Makefile
File metadata and controls
35 lines (29 loc) · 814 Bytes
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
# Simple Makefile for Monitoring HUD
PREFIX ?= $(HOME)
BIN_DIR := $(PREFIX)/bin
BIN := $(BIN_DIR)/monitoring
all: build
build:
mkdir -p $(BIN_DIR)
gcc main.c -o $(BIN) `pkg-config --cflags --libs gtk+-3.0`
run: build
$(BIN) &
install: build autostart
autostart:
mkdir -p $(HOME)/.config/autostart
printf "%s\n" \
"[Desktop Entry]" \
"Type=Application" \
"Name=Monitoring HUD" \
"Comment=Transparent CPU/RAM overlay at top right" \
"Exec=$(BIN)" \
"Icon=utilities-system-monitor" \
"Terminal=false" \
"X-GNOME-Autostart-enabled=true" \
"X-GNOME-Autostart-Delay=5" \
"OnlyShowIn=X-Cinnamon;GNOME;XFCE;" \
> $(HOME)/.config/autostart/monitoring.desktop
chmod +x $(HOME)/.config/autostart/monitoring.desktop
uninstall:
pkill -f "$(BIN)" || true
rm -f $(BIN) $(HOME)/.config/autostart/monitoring.desktop