Commit Diff


commit - af981884c960065124fedeac9fd3721c7d9a3b25
commit + 568ac1e482d32f40c52a7ef74c87ac8c9a929854
blob - ebfd357ef37692f05bac7c3234d1ae32c1bb6c45
blob + 46d97573ed2e8331f836b354ea3e2a1fe6950016
--- Makefile
+++ Makefile
@@ -47,7 +47,7 @@ MAN		= dwm/dwm.1 st/st.1 dmenu/dmenu.1 dmenu/stest.1 s
 all: bin/dwm bin/st bin/bedstatus bin/dmenu bin/stest bin/xbgcd bin/slock bin/pinentry-dmenu
 
 check:
-	find etc/ -not -type d -exec diff -u {} /{} \;
+	find etc/common etc/$$(uname) -not -type d | awk '{a=$$0; sub(/etc\/[^\/]+/, "/etc", a); system("diff -u " $$0 " " a)}'
 
 check-user:
 	find dotfiles/ -not -type d -exec sh -c 'diff -u {} "$$HOME/$$(echo "{}" | sed 's@^dotfiles/@@')"' \;
@@ -70,7 +70,7 @@ install:
 
 install-etc:
 	mkdir -p ${DESTDIR}/etc
-	cp -rf etc/* ${DESTDIR}/etc/
+	cp -rf etc/common/* etc/$$(uname)/* ${DESTDIR}/etc/
 
 install-user:
 	find dotfiles -mindepth 1 -maxdepth 1 | xargs -I '{}' cp -rf '{}' "$$HOME/"
blob - fd4e07a24126218f5318872cc66b4db43e8e967d (mode 755)
blob + /dev/null
--- etc/apm/resume
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-rcctl reload sndiod
-rcctl start obsdfreqd
-sndioctl output.mute=1
-sndioctl output.level=0.5
-wsconsctl mouse2.reverse_scrolling=1
blob - 67d03894079125a74e4411c501a3efef62e40d3a (mode 755)
blob + /dev/null
--- etc/apm/suspend
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-pkill -USR1 xidle
blob - /dev/null
blob + fd4e07a24126218f5318872cc66b4db43e8e967d (mode 755)
--- /dev/null
+++ etc/OpenBSD/apm/resume
@@ -0,0 +1,6 @@
+#!/bin/sh
+rcctl reload sndiod
+rcctl start obsdfreqd
+sndioctl output.mute=1
+sndioctl output.level=0.5
+wsconsctl mouse2.reverse_scrolling=1
blob - /dev/null
blob + 67d03894079125a74e4411c501a3efef62e40d3a (mode 755)
--- /dev/null
+++ etc/OpenBSD/apm/suspend
@@ -0,0 +1,2 @@
+#!/bin/sh
+pkill -USR1 xidle
blob - /dev/null
blob + a00d3a5bb23f41dc6ba4ecb2c0741265d8afdaf8 (mode 644)
--- /dev/null
+++ etc/OpenBSD/doas.conf
@@ -0,0 +1 @@
+permit nopass setenv { ENV=/etc/mykshrc } :wheel
blob - /dev/null
blob + 9cd3028a95e510ceeb5d69e598887bb4033b3653 (mode 644)
--- /dev/null
+++ etc/OpenBSD/mk.conf
@@ -0,0 +1,8 @@
+WRKOBJDIR=/usr/obj/ports
+DISTDIR=/usr/distfiles
+PACKAGE_REPOSITORY=/usr/packages
+SUDO=/usr/bin/doas
+PKG_ADD=/usr/sbin/pkg_add -Dunsigned
+MAKE_JOBS=8
+FETCH_PACKAGES=-Dsnap
+#BUILD_UNLINKED=wayland
blob - /dev/null
blob + 20b7ec6e9725a61661e7d28b0b8788b6be129969 (mode 644)
--- /dev/null
+++ etc/OpenBSD/sysctl.conf
@@ -0,0 +1,3 @@
+hw.smt=1
+net.inet.ip.forwarding=1
+net.inet6.ip6.forwarding=1
blob - /dev/null
blob + 267f93b83f60571ce22a05bc5142c09d7d69e3c9 (mode 644)
--- /dev/null
+++ etc/OpenBSD/wsconsctl.conf
@@ -0,0 +1,4 @@
+mouse.reverse_scrolling=1
+mouse.tp.tapping=1
+mouse.tp.scaling=0.25
+mouse2.reverse_scrolling=1
blob - a00d3a5bb23f41dc6ba4ecb2c0741265d8afdaf8 (mode 644)
blob + /dev/null
--- etc/doas.conf
+++ /dev/null
@@ -1 +0,0 @@
-permit nopass setenv { ENV=/etc/mykshrc } :wheel
blob - /dev/null
blob + a8e210a90ec4482290e2aa8e87ab993beb406774 (mode 644)
--- /dev/null
+++ etc/common/mykshrc
@@ -0,0 +1,87 @@
+#!/bin/ksh
+case "$(command -v vim)" in
+*/vim)		VIM=vim	;;
+*)		VIM=vi	;;
+esac
+
+case "$(command -v colorls)" in
+*/colorls)	LS=colorls	;;
+*)		LS=ls		;;
+esac
+
+case "$(command -v unzip)" in
+*/unzip)	;;
+*)		alias unzip='bsdtar -xf' ;;
+esac
+
+export EDITOR=$VIM
+export FCEDIT=$EDITOR
+export PAGER=less
+export LANG=de_DE.UTF-8
+export LC_CTYPE=en_US.UTF-8
+export CLICOLOR=1
+export TOG_COLORS=1
+export CVSROOT=anoncvs@ftp.hostserver.de:/cvs
+HISTFILE=$HOME/.ksh_history
+HISTSIZE=20000
+
+set -o emacs
+
+alias t='mkdir -p /tmp/test && cd /tmp/test'
+alias ls="$LS -Fh"
+alias ll="$LS -Fhl"
+alias la="$LS -AFh"
+alias lla="$LS -AFhl"
+alias dotconfig="git --git-dir=$HOME/.dotfiles --work-tree=$HOME"
+alias imgsz="identify -ping -format '%wx%h\\n'"
+
+if [ "$(id -u)" = 0 ]; then
+	PS1='\[\033[31m\]\h\[\033[0m\]:\[\033[34m\]\w\[\033[31m\]\$\[\033[0m\] '
+else
+	PS1='\[\033[32m\]\u@\h\[\033[0m\]:\[\033[34m\]\w\[\033[31m\]\$\[\033[0m\] '
+fi
+
+# Completions
+if [ -d /var/db/pkg ]; then
+	PKG_LIST=$(command ls -1 /var/db/pkg)
+	set -A complete_pkg_delete -- ${PKG_LIST}
+	set -A complete_pkg_info -- ${PKG_LIST}
+fi
+
+#man() {
+#	[ ${#complete_man} = 0 ] && {
+#		set -A complete_man -- $(command man -k . | grep -o '^[^(]*' | tr ',' '\n' | tr -d ' ' | sort | uniq)
+#	}
+#	command man "$@"
+#}
+
+if [ "$(uname)" = "OpenBSD" ]; then
+	set -A complete_rcctl_1 -- configtest check reload restart stop start status disable enable ls
+	set -A complete_rcctl_2 -- $(rcctl ls all)
+	set -A complete_vmctl_1 -- console create pause reload start status stop unpause wait
+	set -A complete_vmctl -- $(vmctl status | awk '!/NAME/{print $NF}')
+fi
+set -A complete_git_1 -- clone init add mv restore rm bisect diff show status branch commit merge rebase reset tag fetch pull push
+COMMANDS=$(command ls -1 -- $(echo "$PATH" | tr ':' '\n') | sort | uniq)
+set -A complete_doas_1 -- ${COMMANDS}
+set -A complete_which -- ${COMMANDS}
+set -A complete_exec -- ${COMMANDS}
+set -A complete_ifconfig_1 -- $(ifconfig | grep -o '^[a-z0-9]*')
+set -A complete_ifconfig -- up down join nwid wpakey autoconf -inet -inet6
+set -A complete_pass_1 -- show generate ls edit git rm cp mv
+#set -A complete_pass -- $(cd $HOME/.password-store && find . -type f -name '*.gpg' | sed 's/^\.\///; s/\.gpg$//')
+
+
+alias pman='man -M /usr/local/share/doc/posix/man'
+alias papropos='apropos -M /usr/local/share/doc/posix/man'
+alias pwhatis='whatis -M /usr/local/share/doc/posix/man'
+gd() {
+	got di "$@" | bat -l patch
+}
+gl() {
+	got log -d "$@" | less
+}
+
+if [ "$TERM" = "xterm" ]; then
+	printf '\e[4?h'
+fi
blob - 9cd3028a95e510ceeb5d69e598887bb4033b3653 (mode 644)
blob + /dev/null
--- etc/mk.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-WRKOBJDIR=/usr/obj/ports
-DISTDIR=/usr/distfiles
-PACKAGE_REPOSITORY=/usr/packages
-SUDO=/usr/bin/doas
-PKG_ADD=/usr/sbin/pkg_add -Dunsigned
-MAKE_JOBS=8
-FETCH_PACKAGES=-Dsnap
-#BUILD_UNLINKED=wayland
blob - a8e210a90ec4482290e2aa8e87ab993beb406774 (mode 644)
blob + /dev/null
--- etc/mykshrc
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/ksh
-case "$(command -v vim)" in
-*/vim)		VIM=vim	;;
-*)		VIM=vi	;;
-esac
-
-case "$(command -v colorls)" in
-*/colorls)	LS=colorls	;;
-*)		LS=ls		;;
-esac
-
-case "$(command -v unzip)" in
-*/unzip)	;;
-*)		alias unzip='bsdtar -xf' ;;
-esac
-
-export EDITOR=$VIM
-export FCEDIT=$EDITOR
-export PAGER=less
-export LANG=de_DE.UTF-8
-export LC_CTYPE=en_US.UTF-8
-export CLICOLOR=1
-export TOG_COLORS=1
-export CVSROOT=anoncvs@ftp.hostserver.de:/cvs
-HISTFILE=$HOME/.ksh_history
-HISTSIZE=20000
-
-set -o emacs
-
-alias t='mkdir -p /tmp/test && cd /tmp/test'
-alias ls="$LS -Fh"
-alias ll="$LS -Fhl"
-alias la="$LS -AFh"
-alias lla="$LS -AFhl"
-alias dotconfig="git --git-dir=$HOME/.dotfiles --work-tree=$HOME"
-alias imgsz="identify -ping -format '%wx%h\\n'"
-
-if [ "$(id -u)" = 0 ]; then
-	PS1='\[\033[31m\]\h\[\033[0m\]:\[\033[34m\]\w\[\033[31m\]\$\[\033[0m\] '
-else
-	PS1='\[\033[32m\]\u@\h\[\033[0m\]:\[\033[34m\]\w\[\033[31m\]\$\[\033[0m\] '
-fi
-
-# Completions
-if [ -d /var/db/pkg ]; then
-	PKG_LIST=$(command ls -1 /var/db/pkg)
-	set -A complete_pkg_delete -- ${PKG_LIST}
-	set -A complete_pkg_info -- ${PKG_LIST}
-fi
-
-#man() {
-#	[ ${#complete_man} = 0 ] && {
-#		set -A complete_man -- $(command man -k . | grep -o '^[^(]*' | tr ',' '\n' | tr -d ' ' | sort | uniq)
-#	}
-#	command man "$@"
-#}
-
-if [ "$(uname)" = "OpenBSD" ]; then
-	set -A complete_rcctl_1 -- configtest check reload restart stop start status disable enable ls
-	set -A complete_rcctl_2 -- $(rcctl ls all)
-	set -A complete_vmctl_1 -- console create pause reload start status stop unpause wait
-	set -A complete_vmctl -- $(vmctl status | awk '!/NAME/{print $NF}')
-fi
-set -A complete_git_1 -- clone init add mv restore rm bisect diff show status branch commit merge rebase reset tag fetch pull push
-COMMANDS=$(command ls -1 -- $(echo "$PATH" | tr ':' '\n') | sort | uniq)
-set -A complete_doas_1 -- ${COMMANDS}
-set -A complete_which -- ${COMMANDS}
-set -A complete_exec -- ${COMMANDS}
-set -A complete_ifconfig_1 -- $(ifconfig | grep -o '^[a-z0-9]*')
-set -A complete_ifconfig -- up down join nwid wpakey autoconf -inet -inet6
-set -A complete_pass_1 -- show generate ls edit git rm cp mv
-#set -A complete_pass -- $(cd $HOME/.password-store && find . -type f -name '*.gpg' | sed 's/^\.\///; s/\.gpg$//')
-
-
-alias pman='man -M /usr/local/share/doc/posix/man'
-alias papropos='apropos -M /usr/local/share/doc/posix/man'
-alias pwhatis='whatis -M /usr/local/share/doc/posix/man'
-gd() {
-	got di "$@" | bat -l patch
-}
-gl() {
-	got log -d "$@" | less
-}
-
-if [ "$TERM" = "xterm" ]; then
-	printf '\e[4?h'
-fi
blob - 20b7ec6e9725a61661e7d28b0b8788b6be129969 (mode 644)
blob + /dev/null
--- etc/sysctl.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-hw.smt=1
-net.inet.ip.forwarding=1
-net.inet6.ip6.forwarding=1
blob - 267f93b83f60571ce22a05bc5142c09d7d69e3c9 (mode 644)
blob + /dev/null
--- etc/wsconsctl.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-mouse.reverse_scrolling=1
-mouse.tp.tapping=1
-mouse.tp.scaling=0.25
-mouse2.reverse_scrolling=1