aboutsummaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-11-18 23:23:40 +0100
committerMattias Andrée <maandree@kth.se>2023-11-18 23:23:40 +0100
commit0f1df0db903ba576fd17b08197d3066af7a61e5f (patch)
treea59c04307b1382257afa3c3512ec3abadf7e0e47 /base
parentUse losetup -d instead of --detach and add clean up (diff)
downloaddotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.gz
dotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.bz2
dotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.xz
A lot of changes
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
l---------base-files1
-rw-r--r--base/Makefile59
-rw-r--r--base/user-profile (renamed from base/profile)0
-rw-r--r--base/user-profile-North (renamed from base/profile-North)0
-rw-r--r--base/user-profile-Zenith4
-rw-r--r--base/xinit7
-rwxr-xr-xgit/new-c-proj (renamed from base/new-c-proj)4
7 files changed, 52 insertions, 23 deletions
diff --git a/base-files b/base-files
new file mode 120000
index 0000000..7e352df
--- /dev/null
+++ b/base-files
@@ -0,0 +1 @@
+filesystem \ No newline at end of file
diff --git a/base/Makefile b/base/Makefile
index 365bde6..9752ef1 100644
--- a/base/Makefile
+++ b/base/Makefile
@@ -1,20 +1,26 @@
.POSIX:
-include ../common.mk
FACE = penguin.png
+XINITRC_ORDER = 90
+
install:
mkdir -p -- ~/.config
- test ! -d ~/.profile
- test ! -d ~/.config/profile
- test ! -d ~/.config/profile-North
- test ! -d ~/.config/user-dirs.locale
- test ! -d ~/.config/face
- test ! -d ~/.face
- test ! -d ~/.face.icon
+ test ! -e ~/.profile || test -L ~/.profile
+ test ! -e ~/.config/user-profile || test -L ~/.config/profile
+ test ! -e ~/.config/user-profile-North || test -L ~/.config/profile-North
+ test ! -e ~/.config/user-profile-Zenith || test -L ~/.config/profile-Zenith
+ test ! -e ~/.config/user-dirs.locale || test -L ~/.config/user-dirs.locale
+ test ! -e ~/.config/face || test -L ~/.config/face || \
+ sha256sum faces/* | cut -d ' ' -f 1 | grep "$(sha256sum -- ~/.config/face | cut -d ' ' -f 1)" > /dev/null
+ test ! -e ~/.face || test -L ~/.face || \
+ sha256sum faces/* | cut -d ' ' -f 1 | grep "$(sha256sum -- ~/.face | cut -d ' ' -f 1)" > /dev/null
+ test ! -e ~/.face.icon || test -L ~/.face.icon || \
+ sha256sum faces/* | cut -d ' ' -f 1 | grep "$(sha256sum -- ~/.face.icon | cut -d ' ' -f 1)" > /dev/null
ln -sf -- .config/profile ~/.profile
- ln -sf -- ~/.dotfiles/base/profile ~/.config/profile
- ln -sf -- ~/.dotfiles/base/profile-North ~/.config/profile-North
+ ln -sf -- ~/.dotfiles/base/user-profile ~/.config/profile
+ ln -sf -- ~/.dotfiles/base/user-profile-North ~/.config/profile-North
+ ln -sf -- ~/.dotfiles/base/user-profile-Zenith ~/.config/profile-Zenith
ln -sf -- ~/.dotfiles/base/user-dirs.locale ~/.config/
ln -sf -- ~/.dotfiles/base/faces/$(FACE) ~/.config/face
ln -sf -- .config/face ~/.face
@@ -25,28 +31,39 @@ install:
test ! -e ~/.config/locations && \
ln -s -- ~/.dotfiles/.secrets/locations ~/.config/locations; \
fi
- test ! -d ~/.config/geolocation
- test ! -d ~/.config/metar
+ test ! -e ~/.config/geolocation || test -L ~/.config/geolocation
+ test ! -e ~/.config/metar || test -L ~/.config/metar
test -L ~/.config/locations/current || test ! -e ~/.config/locations/current
test -L ~/.config/locations/current || ln -sf default ~/.config/locations/current
ln -sf locations/current/geolocation ~/.config/geolocation
ln -sf locations/current/metar ~/.config/metar
mkdir -p -- ~/.local/bin
test ! -d ~/.local/bin/iswork
- test -x /bin/false
- ln -sf -- /bin/false ~/.local/bin/iswork
- ln -sf ~/.dotfiles/base/new-c-proj ~/.local/bin/
- test ! -r ../.secrets/bin/Makefile || make -C ../.secrets/bin install
+ test -x /bin/false && test -x /bin/true
+ if test -e "../.secrets/workmachine-$$(hostname)"; then \
+ ln -sf -- /bin/true ~/.local/bin/iswork; \
+ else \
+ ln -sf -- /bin/false ~/.local/bin/iswork; \
+ fi
+ test ! -r ../.secrets/bin/Makefile || (cd ../.secrets/bin && $(MAKE) install)
+ mkdir -p -- ~/.config/X11/xinit/xinitrc.d
+ test ! -e ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-base || \
+ test -L ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-base
+ ln -sf -- ~/.dotfiles/base/xinit ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-base
uninstall:
- -unlink -- ~/.config/profile
+ +! ../check-installed base
+ -unlink -- ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-base
+ -rmdir -- ~/.config/X11/xinit/xinitrc.d
+ -rmdir -- ~/.config/X11/xinit
+ -rmdir -- ~/.config/X11
+ -unlink -- ~/.config/user-profile
+ -unlink -- ~/.config/user-profile-North
+ -unlink -- ~/.config/user-profile-Zenith
-unlink -- ~/.config/user-dirs.locale
-unlink -- ~/.profile
-unlink -- ~/.config/locations
-unlink -- ~/.config/geolocation
-unlink -- ~/.config/metar
-unlink -- ~/.local/bin/iswork
- -unlink -- ~/.local/bin/new-c-proj
- -test ! -r ../.secrets/bin/Makefile || make -C ../.secrets/bin uninstall
-
-.PHONY: install uninstall
+ -test ! -r ../.secrets/bin/Makefile || (cd ../.secrets/bin && $(MAKE) uninstall)
diff --git a/base/profile b/base/user-profile
index 2206a1f..2206a1f 100644
--- a/base/profile
+++ b/base/user-profile
diff --git a/base/profile-North b/base/user-profile-North
index 7a5acc9..7a5acc9 100644
--- a/base/profile-North
+++ b/base/user-profile-North
diff --git a/base/user-profile-Zenith b/base/user-profile-Zenith
new file mode 100644
index 0000000..97cf492
--- /dev/null
+++ b/base/user-profile-Zenith
@@ -0,0 +1,4 @@
+# -*- shell-script -*-
+
+# Set audio interface
+export MAIN_ALSA_CARD=2
diff --git a/base/xinit b/base/xinit
new file mode 100644
index 0000000..2ef7ed0
--- /dev/null
+++ b/base/xinit
@@ -0,0 +1,7 @@
+# -*- shell-script -*-
+
+# Set keyboard settings
+setkeys || :
+
+# Start hotkey daemon
+xkbdbind &
diff --git a/base/new-c-proj b/git/new-c-proj
index 48f8d83..ce04f39 100755
--- a/base/new-c-proj
+++ b/git/new-c-proj
@@ -214,9 +214,9 @@ cat > config.mk <<-EOF
PREFIX = /usr
MANPREFIX = \$(PREFIX)/share/man
- CC = cc
+ CC = c99
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_GNU_SOURCE
- CFLAGS = -std=c99 -Wall -g
+ CFLAGS =
LDFLAGS =
EOF