commit bba82347a828bd305edd6263084ff14ed2109c49
parent 539ca71e9432bee01e7d9c678677d4341e7de372
Author: Matsuda Kenji <kenji@x220.my.domain>
Date: Fri, 13 Aug 2021 15:50:45 +0900
modify for openbsd
Diffstat:
6 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc
@@ -16,5 +16,10 @@ export GTK_IM_MODULE=uim
export GTK3_IM_MODULE=uim
#uim-xim &
+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
+xsetroot -solid black
+
dwmblocks &
exec dwm
diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf
@@ -5,6 +5,7 @@
<test qual="any" name="family"><string>monospace</string></test>
<edit name="family" mode="prepend" binding="same"><string>Liberation Mono</string></edit>
<edit name="family" mode="append" binding="same"><string>Noto Serif CJK JP</string></edit>
+ <edit name="family" mode="append" binding="same"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
diff --git a/.profile b/.profile
@@ -10,8 +10,8 @@ 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 EDITOR=nvim
export HISTFILE="$XDG_CACHE_HOME/sh_history"
export X11HOME="$XDG_CONFIG_HOME/X11"
@@ -26,4 +26,7 @@ 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/.shrc b/.shrc
@@ -3,4 +3,5 @@
PS1='[\u@\h \W]\$ '
alias w3m='w3m -o keymap_file=~/.config/w3m/keymap'
+alias tmux='tmux -f /home/kenji/.config/tmux/tmux.conf'
set -o vi
diff --git a/bin/dwm_blocks_battery.sh b/bin/dwm_blocks_battery.sh
@@ -1,11 +1,11 @@
#!/bin/sh
-online=$(sysctl hw.acpi.acline | cut -d' ' -f2)
-capacity=$(sysctl hw.acpi.battery.life | cut -d' ' -f2)
+online=$(sysctl -n hw.sensors.acpiac0.indicator0 | cut -d' ' -f1)
+capacity=$(printf "%.0f" $(echo $(sysctl -n hw.sensors.acpibat0.amphour3 | cut -d' ' -f1) / $(sysctl -n hw.sensors.acpibat0.amphour4 | cut -d' ' -f1) '*' 100 | bc -l))
-if [ "$online" = 1 ]; then
+if [ "$online" = "On" ]; then
state=
-elif [ "$capacity" -gt 95 ]; then
+elif [ "$capacity" -gt 90 ]; then
state=
elif [ "$capacity" -gt 63 ]; then
state=
diff --git a/bin/dwm_blocks_volume.sh b/bin/dwm_blocks_volume.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-mute=no
-[ "$mute" = "yes" ] && state= || state=
-volume=$(mixer -s vol | sed 's/.*://')
+mute=$(sndioctl -n output.mute)
+[ "$mute" = 1 ] && state= || state=
+volume=$(printf '%.0f' $(echo $(sndioctl -n output.level) '*' 100 | bc))
echo "$state ${volume}"