@echo '================================================================================'
@exit 1
-home: mpdconf
+home: mpdconf compiled
+ @cp -Rp bin $(HOME)/
@cp -Rp home/bin $(HOME)/
@cp -Rp home/lib $(HOME)/
@cp home/.compton.conf $(HOME)/
@mkdir -p ~/var/run/mpd
@cp home/.mpdconf $(HOME)/
+compiled:
+ mkdir -p bin
+ cd src && make
+ mv src/clockloop bin/
+
font_cache:
@fc-cache -fv
--- /dev/null
+CPPFLAGS := -D_POSIX_C_SOURCE=200809L
+CFLAGS := -std=c99 -Wall -Wextra
+LDLIBS := -lncurses
+
+.PHONY: build clean
+
+build: clockloop
+
+clean:
+ rm -f clockloop
--- /dev/null
+#include <time.h>
+
+#include <stdio.h>
+#include <unistd.h>
+
+#include <ncurses.h>
+
+
+#define BS 50
+
+
+int
+main()
+{
+ time_t t;
+ char buf[BS];
+
+ initscr();
+ timeout(0);
+ while (getch() == -1) {
+ t = time(NULL);
+ strftime(buf, BS, "%A %Y-%m-%d %H:%M:%S", localtime(&t));
+ mvprintw(0, 0, "%s", buf);
+ refresh();
+ }
+ endwin();
+ return 0;
+}