aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--base/user-profile4
-rw-r--r--git/.gitignore2
-rw-r--r--git/Makefile5
-rw-r--r--open-vm-tools/Makefile16
-rw-r--r--open-vm-tools/xinit6
-rw-r--r--ssh/.gitignore2
-rw-r--r--ssh/Makefile32
-rwxr-xr-xxorg-xrandr/setres/__main__.py.gpp2
8 files changed, 57 insertions, 12 deletions
diff --git a/base/user-profile b/base/user-profile
index 2206a1f..370d637 100644
--- a/base/user-profile
+++ b/base/user-profile
@@ -13,10 +13,10 @@ export MAIN_ALSA_MIXER=PCM
export MANSECT="1p:8p:1:8:2:3p:3:0:5:4:9:6:7:n:l"
# Ensure ~/.local/bin and ~/.usr/bin are in PATH
-if ( IFS=: ; printf '%s\n' $PATH ) | grep -Fx ~/.local/bin >/dev/null; then
+if ! ( IFS=: ; printf '%s\n' $PATH ) | grep -Fx ~/.local/bin >/dev/null; then
export PATH="${HOME}/.local/bin:${PATH}"
fi
-if ( IFS=: ; printf '%s\n' $PATH ) | grep -Fx ~/.usr/bin >/dev/null; then
+if ! ( IFS=: ; printf '%s\n' $PATH ) | grep -Fx ~/.usr/bin >/dev/null; then
export PATH="${HOME}/.usr/bin:${PATH}"
fi
diff --git a/git/.gitignore b/git/.gitignore
index 7fada2a..1f89d9f 100644
--- a/git/.gitignore
+++ b/git/.gitignore
@@ -1 +1 @@
-/.config
+.config
diff --git a/git/Makefile b/git/Makefile
index b07a06d..1794675 100644
--- a/git/Makefile
+++ b/git/Makefile
@@ -6,7 +6,10 @@ install:
test ! -e ~/.config/git/config || test -f ~/.config/git/config
cp -- config .config
if test -f ../.secrets/git/config; then\
- cat ../.secrets/git/config >> .config;\
+ cat -- ../.secrets/git/config >> .config;\
+ fi
+ if test -f ../.work/pkgs/git/config; then\
+ cat -- ../.work/pkgs/git/config-include >> .config;\
fi
ln -sf -- ~/.dotfiles/git/.config ~/.config/git/config
mkdir -p -- ~/.config/bash/aliases.d
diff --git a/open-vm-tools/Makefile b/open-vm-tools/Makefile
new file mode 100644
index 0000000..c09adeb
--- /dev/null
+++ b/open-vm-tools/Makefile
@@ -0,0 +1,16 @@
+.POSIX:
+
+XINITRC_ORDER = 95
+
+install:
+ mkdir -p -- ~/.config/X11/xinit/xinitrc.d
+ test ! -e ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-open-vm-tools || \
+ test -L ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-open-vm-tools
+ ln -sf -- ~/.dotfiles/open-vm-tools/xinit ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-open-vm-tools
+
+uninstall:
+ +! ../check-installed open-vm-tools
+ -unlink -- ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-open-vm-tools
+ -rmdir -- ~/.config/X11/xinit/xinitrc.d
+ -rmdir -- ~/.config/X11/xinit
+ -rmdir -- ~/.config/X11
diff --git a/open-vm-tools/xinit b/open-vm-tools/xinit
new file mode 100644
index 0000000..710f7f1
--- /dev/null
+++ b/open-vm-tools/xinit
@@ -0,0 +1,6 @@
+# -*- shell-script -*-
+
+if vmware-checkvm >/dev/null 2>/dev/null; then
+ vmtoolsd -n vmusr &
+ (sleep 20; coredown) &
+fi
diff --git a/ssh/.gitignore b/ssh/.gitignore
index 9942bb7..b5f26f6 100644
--- a/ssh/.gitignore
+++ b/ssh/.gitignore
@@ -1 +1,3 @@
.ssh-config
+.*.cache
+.*.prev
diff --git a/ssh/Makefile b/ssh/Makefile
index b16f051..e7bf102 100644
--- a/ssh/Makefile
+++ b/ssh/Makefile
@@ -1,29 +1,47 @@
.POSIX:
+DYNAMIC_ADDRESSES != \
+ for f in ../.secrets/ssh/hostfetch/* ../.work/ssh/hostfetch/* hostfetch/*; do \
+ test ! -x "$$f" || printf '%s\n' "$$f"; \
+ done | sort -u | sed 's|^.*/\([^/]*[^/~]\)$$|\1|'
+
install:
-rm -f -- .ssh-config
test ! -e .ssh-config && test ! -L .ssh-config
printf '# %s\n' 'THIS FILE IS GENERATED from ~/.dotfiles/ssh/Makefile' \
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' > .ssh-config
- printf '\n\n' >> .ssh-config
+ chmod -- 600 .ssh-config
if test -f config; then \
- cat config >> .ssh-config; \
+ ../cat-with-head -- config >> .ssh-config; \
fi
set config.d/* && if test -f "$$1"; then \
- ../cat-nonbackups -- "$$@" >> .ssh-config; \
+ ../cat-nonbackups-with-head -- "$$@" >> .ssh-config; \
fi
if test -f ../.secrets/ssh/config; then \
- cat ../.secrets/ssh/config >> .ssh-config; \
+ ../cat-with-head -- ../.secrets/ssh/config >> .ssh-config; \
fi
set ../.secrets/ssh/config.d/* && if test -f "$$1"; then \
- ../cat-nonbackups "$$@" >> .ssh-config; \
+ ../cat-nonbackups-with-head -- "$$@" >> .ssh-config; \
fi
if test -f ../.work/ssh/config; then \
- cat ../.work/ssh/config >> .ssh-config; \
+ ../cat-with-head -- ../.work/ssh/config >> .ssh-config; \
fi
set ../.work/ssh/config.d/* && if test -f "$$1"; then \
- ../cat-nonbackups "$$@" >> .ssh-config; \
+ ../cat-nonbackups-with-head -- "$$@" >> .ssh-config; \
fi
+ set -e; \
+ for name in $(DYNAMIC_ADDRESSES); do \
+ if test -x "../.secrets/ssh/hostfetch/$$name"; then \
+ addr="$$("../.secrets/ssh/hostfetch/$$name")"; \
+ elif test -x "../.work/ssh/hostfetch/$$name"; then \
+ addr="$$("../.work/ssh/hostfetch/$$name")"; \
+ else \
+ addr="$$("hostfetch/$$name")"; \
+ fi; \
+ test -n "$$addr"; \
+ sed "s/%$${name}%/$${addr}/g" -- "$$@" < .ssh-config > .ssh-config~; \
+ mv -- .ssh-config~ .ssh-config; \
+ done
mkdir -p -- ~/.ssh
test ! -e ~/.ssh/config || test -L ~/.ssh/config
test ! -e ~/.ssh/config || test -f ~/.ssh/config
diff --git a/xorg-xrandr/setres/__main__.py.gpp b/xorg-xrandr/setres/__main__.py.gpp
index f5200c8..f794339 100755
--- a/xorg-xrandr/setres/__main__.py.gpp
+++ b/xorg-xrandr/setres/__main__.py.gpp
@@ -50,7 +50,7 @@ if hostname == 'zenith':
sec_position = 'left'
%%>hostname="$(hostname | tr '[A-Z]' '[a-z]')"
-%%>file="${HOME}/.dotfiles/private/setres/${hostname}"
+%%>file="${HOME}/.dotfiles/.private/setres/${hostname}"
%%>if test -r "${file}"; then
elif hostname == '%%{hostname}':
connectors = {con.edid: con.name for con in screen.connectors if con.connected and con.edid and con.name}