1
0
Fork 0

Initial commit

This commit is contained in:
Alex Kotov 2021-11-15 05:04:02 +05:00
parent e26ab39544
commit 7f6cdaf1f7
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
6 changed files with 87 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*.o
/polytree-session

47
Makefile Normal file
View 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
View 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
View 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
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B