Initial commit
This commit is contained in:
parent
e26ab39544
commit
7f6cdaf1f7
6 changed files with 87 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
*.o
|
||||
|
||||
/polytree-session
|
47
Makefile
Normal file
47
Makefile
Normal file
|
@ -0,0 +1,47 @@
|
|||
# Polytree Session - session manager
|
||||
|
||||
include config.mk
|
||||
|
||||
SRC = main.c
|
||||
OBJ = $(SRC:.c=.o)
|
||||
|
||||
all: options polytree-session
|
||||
|
||||
options:
|
||||
@echo Polytree Session build options:
|
||||
@echo "CFLAGS = $(CFLAGS)"
|
||||
@echo "LDFLAGS = $(LDFLAGS)"
|
||||
@echo "CC = $(CC)"
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c $< -o $@ $(CFLAGS)
|
||||
|
||||
OBJ: config.mk
|
||||
|
||||
polytree-session: $(OBJ)
|
||||
$(CC) -o $@ $(OBJ) $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f polytree-session $(OBJ)
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
cp -f polytree-session $(DESTDIR)$(PREFIX)/bin
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/polytree-session
|
||||
|
||||
xinstall: install
|
||||
mkdir -p $(DESTDIR)$(ICONSPREFIX)
|
||||
cp -f polytree.png $(DESTDIR)$(ICONSPREFIX)
|
||||
chmod 644 $(DESTDIR)$(ICONSPREFIX)/polytree.png
|
||||
|
||||
mkdir -p $(DESTDIR)$(XSESSIONSPREFIX)
|
||||
cp -f polytree.desktop $(DESTDIR)$(XSESSIONSPREFIX)
|
||||
chmod 644 $(DESTDIR)$(XSESSIONSPREFIX)/polytree.desktop
|
||||
|
||||
uninstall:
|
||||
rm -f \
|
||||
$(DESTDIR)$(PREFIX)/bin/polytree-session \
|
||||
$(DESTDIR)$(ICONSPREFIX)/polytree.png \
|
||||
$(DESTDIR)$(XSESSIONSPREFIX)/polytree.desktop
|
||||
|
||||
.PHONY: all options clean install xinstall uninstall
|
17
config.mk
Normal file
17
config.mk
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Polytree Session version
|
||||
VERSION = 0.0.0
|
||||
|
||||
PREFIX = /usr/local
|
||||
SYSPREFIX = /usr
|
||||
|
||||
ICONSPREFIX = $(SYSPREFIX)/share/icons
|
||||
XSESSIONSPREFIX = $(SYSPREFIX)/share/xsessions
|
||||
|
||||
INCS =
|
||||
LIBS =
|
||||
|
||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\"
|
||||
CFLAGS = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS)
|
||||
LDFLAGS = $(LIBS)
|
||||
|
||||
CC = cc
|
13
main.c
Normal file
13
main.c
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
char *const args[] = { "polytreewm", NULL };
|
||||
execvp(args[0], args);
|
||||
fprintf(stderr, "polytree-session: execvp %s", args[0]);
|
||||
perror(" failed");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
7
polytree.desktop
Normal file
7
polytree.desktop
Normal file
|
@ -0,0 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Polytree
|
||||
Comment=Polytree tiling desktop environment
|
||||
Exec=polytree-session
|
||||
Icon=polytree
|
||||
Type=XSession
|
BIN
polytree.png
Normal file
BIN
polytree.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 373 B |
Loading…
Add table
Reference in a new issue