dotfiles

Dotfiles for my OpenBSD environment.
Log | Files | Refs

commit a3f30624a5152148289e39a4e22e5136bbec5c7d
parent c4184fbd3dddb059c6756ff7c836972b0b5baffb
Author: Matsuda Kenji <kenji@x220.my.domain>
Date:   Wed, 24 Nov 2021 08:23:19 +0900

modify for openbsd7

Diffstat:
M.config/X11/xinitrc | 32++++++++++++++++++++++++++++++++
D.profile | 33---------------------------------
Mbin/dwm_blocks_battery.sh | 4++--
Dsuckless/dwm/freebsd.diff | 24------------------------
Dsuckless/dwmblocks/freebsd.diff | 17-----------------
Dsuckless/st/freebsd.diff | 47-----------------------------------------------
Dsuckless/surf/freebsd.diff | 22----------------------
7 files changed, 34 insertions(+), 145 deletions(-)

diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc @@ -20,7 +20,39 @@ export GTK3_IM_MODULE=uim xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1 xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2 xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5 +xinput set-prop "/dev/wsmouse" "Device Accel Constant Deceleration" 0.2 xsetroot -solid black +export ENV=$HOME/.shrc + +# ~/ clean up: +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_CACHE_HOME="$HOME/.cache" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_RUNTIME_DIR="/tmp/xdg_runtime_dir_$USER" +[ ! -d $XDG_CONFIG_HOME ] && mkdir -p $XDG_CONFIG_HOME +[ ! -d $XDG_CACHE_HOME ] && mkdir -p $XDG_CACHE_HOME +[ ! -d $XDG_DATA_HOME ] && mkdir -p $XDG_DATA_HOME +[ ! -d $XDG_RUNTIME_DIR ] && mkdir -p $XDG_RUNTIME_DIR + +export HISTFILE="$XDG_CACHE_HOME/sh_history" + +export X11HOME="$XDG_CONFIG_HOME/X11" +export XINITRC="$X11HOME/xinitrc" +#export XAUTHORITY="$XDG_CACHE_HOME/X11/Xauthority" +[ ! -d $X11HOME ] && mkdir -p $X11HOME +[ ! -d $XDG_CACHE_HOME/X11 ] && mkdir -p $XDG_CACHE_HOME/X11 +#gnupg +export GNUPGHOME="$XDG_CONFIG_HOME/gnupg" +# less +export LESSHISTFILE=- + +export BROWSER="firefox" +export TERMINAL="st" +export EDITOR=vi +export PATH="$PATH:$HOME/bin" +export LC_CTYPE=en_US.UTF-8 + dwmblocks & exec dwm + diff --git a/.profile b/.profile @@ -1,33 +0,0 @@ -# ~/.bash_profile - -#export ENV=$HOME/.shrc -source $HOME/.bashrc - -# ~/ clean up: -export XDG_CONFIG_HOME="$HOME/.config" -export XDG_CACHE_HOME="$HOME/.cache" -export XDG_DATA_HOME="$HOME/.local/share" -export XDG_RUNTIME_DIR="/tmp/xdg_runtime_dir_$USER" -[ ! -d $XDG_CONFIG_HOME ] && mkdir -p $XDG_CONFIG_HOME -[ ! -d $XDG_CACHE_HOME ] && mkdir -p $XDG_CACHE_HOME -[ ! -d $XDG_DATA_HOME ] && mkdir -p $XDG_DATA_HOME -[ ! -d $XDG_RUNTIME_DIR ] && mkdir -p $XDG_RUNTIME_DIR - -export HISTFILE="$XDG_CACHE_HOME/sh_history" - -export X11HOME="$XDG_CONFIG_HOME/X11" -export XINITRC="$X11HOME/xinitrc" -export XAUTHORITY="$XDG_CACHE_HOME/X11/Xauthority" -[ ! -d $X11HOME ] && mkdir -p $X11HOME -[ ! -d $XDG_CACHE_HOME/X11 ] && mkdir -p $XDG_CACHE_HOME/X11 -#gnupg -export GNUPGHOME="$XDG_CONFIG_HOME/gnupg" -# less -export LESSHISTFILE=- - -export BROWSER="firefox" -export TERMINAL="st" -export EDITOR=nvi -export PATH="$PATH:$HOME/bin" -export LC_CTYPE=en_US.UTF-8 -[ -z $DISPLAY ] && [ $(tty) = /dev/ttyv0 ] && exec startx $XINITRC diff --git a/bin/dwm_blocks_battery.sh b/bin/dwm_blocks_battery.sh @@ -6,8 +6,8 @@ if [ "$online" = "On" ]; then cut -d' ' -f1) / $(sysctl -n hw.sensors.acpibat0.amphour4 | cut -d' ' -f1) '*' 100 | bc -l)) else - capacity=$(printf "%.0f" $(echo $(sysctl -n hw.sensors.acpibat0.amphour3 | - cut -d' ' -f1) / $(sysctl -n hw.sensors.acpibat0.amphour4 | + capacity=$(printf "%.0f" $(echo $(sysctl -n hw.sensors.acpibat0.watthour3 | + cut -d' ' -f1) / $(sysctl -n hw.sensors.acpibat0.watthour4 | cut -d' ' -f1) '*' 100 | bc -l)) fi diff --git a/suckless/dwm/freebsd.diff b/suckless/dwm/freebsd.diff @@ -1,24 +0,0 @@ -diff --git a/config.mk b/config.mk -index 7084c33..a11c1ab 100644 ---- a/config.mk -+++ b/config.mk -@@ -7,8 +7,8 @@ VERSION = 6.2 - PREFIX = /usr/local - MANPREFIX = ${PREFIX}/share/man - --X11INC = /usr/X11R6/include --X11LIB = /usr/X11R6/lib -+X11INC = /usr/local/include -+X11LIB = /usr/local/lib - - # Xinerama, comment if you don't want it - XINERAMALIBS = -lXinerama -@@ -16,7 +16,7 @@ XINERAMAFLAGS = -DXINERAMA - - # freetype - FREETYPELIBS = -lfontconfig -lXft --FREETYPEINC = /usr/include/freetype2 -+FREETYPEINC = /usr/local/include/freetype2 - # OpenBSD (uncomment) - #FREETYPEINC = ${X11INC}/freetype2 - diff --git a/suckless/dwmblocks/freebsd.diff b/suckless/dwmblocks/freebsd.diff @@ -1,17 +0,0 @@ -diff --git a/Makefile b/Makefile -index ef43ef4..bb6c1f7 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,9 +1,10 @@ - PREFIX ?= /usr/local - CC ?= cc --LDFLAGS = -lX11 -+LDFLAGS = -L/usr/local/lib -lX11 -+CFLAGS = -I/usr/local/include - - output: dwmblocks.c blocks.def.h blocks.h -- ${CC} dwmblocks.c $(LDFLAGS) -o dwmblocks -+ ${CC} dwmblocks.c $(LDFLAGS) $(CFLAGS) -o dwmblocks - blocks.h: - cp blocks.def.h $@ - diff --git a/suckless/st/freebsd.diff b/suckless/st/freebsd.diff @@ -1,47 +0,0 @@ -diff --git a/Makefile b/Makefile -index 470ac86..25611af 100644 ---- a/Makefile -+++ b/Makefile -@@ -47,7 +47,7 @@ install: st - mkdir -p $(DESTDIR)$(MANPREFIX)/man1 - sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1 - chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1 -- tic -sx st.info -+ #tic -sx st.info - @echo Please see the README file regarding the terminfo entry of st. - - uninstall: -diff --git a/config.mk b/config.mk -index c070a4a..873cc07 100644 ---- a/config.mk -+++ b/config.mk -@@ -7,18 +7,20 @@ VERSION = 0.8.4 - PREFIX = /usr/local - MANPREFIX = $(PREFIX)/share/man - --X11INC = /usr/X11R6/include --X11LIB = /usr/X11R6/lib -+X11INC = /usr/local/include -+X11LIB = /usr/local/lib - --PKG_CONFIG = pkg-config -+# freetype -+FREETYPELIBS = -lfontconfig -lXft -+FREETYPEINC = /usr/local/include/freetype2 - - # includes and libs --INCS = -I$(X11INC) \ -- `$(PKG_CONFIG) --cflags fontconfig` \ -- `$(PKG_CONFIG) --cflags freetype2` --LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \ -- `$(PKG_CONFIG) --libs fontconfig` \ -- `$(PKG_CONFIG) --libs freetype2` -+INCS = -I$(X11INC) -I$(FREETYPEINC) -+ #`$(PKG_CONFIG) --cflags fontconfig` \ -+ #`$(PKG_CONFIG) --cflags freetype2` -+LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil $(FREETYPELIBS) -+ #`$(PKG_CONFIG) --libs fontconfig` \ -+ #`$(PKG_CONFIG) --libs freetype2` - - # flags - STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 diff --git a/suckless/surf/freebsd.diff b/suckless/surf/freebsd.diff @@ -1,22 +0,0 @@ -diff --git a/config.mk b/config.mk -index 2eb9fb0..2420352 100644 ---- a/config.mk -+++ b/config.mk -@@ -11,6 +11,8 @@ LIBDIR = $(LIBPREFIX)/surf - - X11INC = `pkg-config --cflags x11` - X11LIB = `pkg-config --libs x11` -+GLIBINC = `pkg-config --cflags --libs glib-2.0` -+GDKINC = /usr/local/include/gtk-3.0/gdk - - GTKINC = `pkg-config --cflags gtk+-3.0 gcr-3 webkit2gtk-4.0` - GTKLIB = `pkg-config --libs gtk+-3.0 gcr-3 webkit2gtk-4.0` -@@ -18,7 +20,7 @@ WEBEXTINC = `pkg-config --cflags webkit2gtk-4.0 webkit2gtk-web-extension-4.0 gio - WEBEXTLIBS = `pkg-config --libs webkit2gtk-4.0 webkit2gtk-web-extension-4.0 gio-2.0` - - # includes and libs --INCS = $(X11INC) $(GTKINC) -+INCS = $(X11INC) $(GTKINC) $(GLIBINC) $(GDKINC) - LIBS = $(X11LIB) $(GTKLIB) -lgthread-2.0 - - # flags