diff options
| -rw-r--r-- | .config/gdb/gdbinit | 5 | ||||
| -rw-r--r-- | .config/gdb/gdbinit.py | 3 | ||||
| -rw-r--r-- | .config/git/config##template | 2 | ||||
| -rw-r--r-- | .config/mozc/.gitattributes | 1 | ||||
| -rw-r--r-- | .config/mozc/config1.db | bin | 1906 -> 2047 bytes | |||
| -rw-r--r-- | .config/mpd/mpd.conf##default | 2 | ||||
| -rw-r--r-- | .config/mpv/mpv.conf | 3 | ||||
| -rw-r--r-- | .config/yadm/root/etc/udev/rules.d/99-capture-card.rules | 3 | ||||
| -rwxr-xr-x | .local/share/bin/clean | 3 | ||||
| -rwxr-xr-x | .local/share/bin/lf | 23 | ||||
| -rwxr-xr-x | .local/share/bin/mozc-config-filter | 6 | ||||
| -rwxr-xr-x | .local/share/bin/venvgen | 47 | ||||
| -rw-r--r-- | .local/share/fcitx5/themes/mode/base.conf | 42 | ||||
| -rwxr-xr-x | .local/share/mode/switch.d/fcitx5 | 2 |
14 files changed, 138 insertions, 4 deletions
diff --git a/.config/gdb/gdbinit b/.config/gdb/gdbinit index bf4a25d..4c61733 100644 --- a/.config/gdb/gdbinit +++ b/.config/gdb/gdbinit @@ -13,9 +13,14 @@ set extended-prompt \P set history save on set history size 10000000 set history remove-duplicates 100 +set style emoji off # aliases alias reset = monitor reset +alias -a -- v8m = arm-v8m +alias -a -- v8m tz = arm-v8m trustzone +alias -a -- jlink sv = jlink server +alias -a -- jlink sv wd = jlink server watchdog # commands alias mk = !mk diff --git a/.config/gdb/gdbinit.py b/.config/gdb/gdbinit.py index 1a137c5..7888a37 100644 --- a/.config/gdb/gdbinit.py +++ b/.config/gdb/gdbinit.py @@ -1,7 +1,7 @@ import gdb import gdb.prompt -from subprocess import DEVNULL, check_output +from subprocess import check_output from os import environ class TryCommand(gdb.Command): @@ -50,4 +50,3 @@ def new_substitute_prompt(prompt: str): return out gdb.prompt.substitute_prompt = new_substitute_prompt - diff --git a/.config/git/config##template b/.config/git/config##template index 85f9b50..067832b 100644 --- a/.config/git/config##template +++ b/.config/git/config##template @@ -49,3 +49,5 @@ syntax-theme = base16 [safe] directory = * +[diff "mozc_config"] + textconv = mozc-config-filter diff --git a/.config/mozc/.gitattributes b/.config/mozc/.gitattributes new file mode 100644 index 0000000..078cff9 --- /dev/null +++ b/.config/mozc/.gitattributes @@ -0,0 +1 @@ +config1.db binary diff=mozc_config diff --git a/.config/mozc/config1.db b/.config/mozc/config1.db Binary files differindex e116637..65f9cde 100644 --- a/.config/mozc/config1.db +++ b/.config/mozc/config1.db diff --git a/.config/mpd/mpd.conf##default b/.config/mpd/mpd.conf##default index f999a2b..f6d91a8 100644 --- a/.config/mpd/mpd.conf##default +++ b/.config/mpd/mpd.conf##default @@ -9,7 +9,7 @@ port "6600" restore_paused "yes" replaygain "track" -replaygain_preamp "0" +replaygain_preamp "6" database { plugin "proxy" diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf index d853304..cc3c44f 100644 --- a/.config/mpv/mpv.conf +++ b/.config/mpv/mpv.conf @@ -10,3 +10,6 @@ sub-scale=0.5 # LOUD volume-max=200 + +# enable hardware-accelerated decoding +hwdec=auto diff --git a/.config/yadm/root/etc/udev/rules.d/99-capture-card.rules b/.config/yadm/root/etc/udev/rules.d/99-capture-card.rules new file mode 100644 index 0000000..b180639 --- /dev/null +++ b/.config/yadm/root/etc/udev/rules.d/99-capture-card.rules @@ -0,0 +1,3 @@ +# set video controls +SUBSYSTEM=="video4linux", KERNEL=="video[0-9]*", ATTR{index}=="0", ATTRS{idVendor}=="534d", ATTRS{idProduct}=="2109", RUN+="/usr/bin/v4l2-ctl -d $devnode --set-ctrl=brightness=0,contrast=127,saturation=127,hue=0" + diff --git a/.local/share/bin/clean b/.local/share/bin/clean new file mode 100755 index 0000000..8c824f1 --- /dev/null +++ b/.local/share/bin/clean @@ -0,0 +1,3 @@ +#!/bin/sh +[ -n "$UB_SOCKET" ] && ueberzugpp cmd --socket "$UB_SOCKET" --action remove --identifier PREVIEW + diff --git a/.local/share/bin/lf b/.local/share/bin/lf new file mode 100755 index 0000000..430ae0b --- /dev/null +++ b/.local/share/bin/lf @@ -0,0 +1,23 @@ +#!/bin/sh +lf=/usr/bin/lf + +UB_PID=0 +UB_SOCKET="" +UB_PID_FILE="$(mktemp)" + +cleanup() { + exec 3>&- + ueberzugpp cmd -s "$UB_SOCKET" -a exit +} + +# don't try to use ueberzug over ssh +[ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] && exec $lf "$@" + +ueberzugpp layer --silent --no-stdin --use-escape-codes --pid-file "$UB_PID_FILE" >/dev/null +UB_PID="$(cat "$UB_PID_FILE")" +rm -f "$UB_PID_FILE" +UB_SOCKET="/tmp/ueberzugpp-$UB_PID.socket" +export UB_PID UB_SOCKET +trap cleanup HUP INT QUIT TERM EXIT +$lf "$@" 3>&- + diff --git a/.local/share/bin/mozc-config-filter b/.local/share/bin/mozc-config-filter new file mode 100755 index 0000000..bc33c20 --- /dev/null +++ b/.local/share/bin/mozc-config-filter @@ -0,0 +1,6 @@ +#!/bin/sh +yay_dir="$(jq --raw-output .buildDir "$XDG_CONFIG_HOME/yay/config.json")" +config_proto="$(mktemp)" +git --git-dir="$yay_dir/mozc-ut/mozc" show HEAD:src/protocol/config.proto > "$config_proto" +protoc --proto_path /tmp --decode=mozc.config.Config "$config_proto" < "$1" +rm -f "$config_proto" diff --git a/.local/share/bin/venvgen b/.local/share/bin/venvgen new file mode 100755 index 0000000..25f2c78 --- /dev/null +++ b/.local/share/bin/venvgen @@ -0,0 +1,47 @@ +#!/bin/sh + +# check if the input is valid +for arg in "$@" ; do + case "$arg" in + *=*) ;; + *) + echo "error: missing assignment operator in argument ($arg)" >&2 + exit 1 + ;; + esac +done + +# shebang +printf '#!/bin/sh\n' + +# save old variables +for arg in "$@" ; do + name="${arg%%=*}" + eval "hasval=\${$name+x}" + [ -n "$hasval" ] && printf '_%s="${%s}"\n' "$name" "$name" +done + +# set new variables +for arg in "$@" ; do + name="${arg%%=*}" + value="${arg#*=}" + printf 'export %s=%q\n' "$name" "$value" +done + +# deactivate function +printf 'deactivate() {\n' +for arg in "$@" ; do + name="${arg%%=*}" + eval "hasval=\${$name+x}" + if [ -n "$hasval" ] ; then + printf '\t%s="${_%s}"\n' "$name" "$name" + printf '\tunset -v _%s\n' "$name" + else + printf '\tunset -v %s\n' "$name" + fi +done +printf '\thash -r 2>/dev/null\n' +printf '\tunset -f deactivate\n' +printf '}\n' +printf 'hash -r 2>/dev/null\n' + diff --git a/.local/share/fcitx5/themes/mode/base.conf b/.local/share/fcitx5/themes/mode/base.conf new file mode 100644 index 0000000..e329a4f --- /dev/null +++ b/.local/share/fcitx5/themes/mode/base.conf @@ -0,0 +1,42 @@ +# vim:ft=dosini +[Metadata] +Name=mode +Version=0.1 +Author=lonkaars +Description=theme generated by mode +ScaleWithDPI=True + +[InputPanel] +Font=sans-serif 12 + +[InputPanel/Background/Margin] +Left=0 +Right=0 +Top=0 +Bottom=0 + +[Menu/Background/Margin] +Left=0 +Right=0 +Top=0 +Bottom=0 + +[Menu/ContentMargin] +Left=0 +Right=0 +Top=0 +Bottom=0 + +[Menu/Highlight/Margin] +Left=0 +Right=0 +Top=0 +Bottom=0 + +[Menu/TextMargin] +Left=0 +Right=0 +Top=0 +Bottom=0 + + diff --git a/.local/share/mode/switch.d/fcitx5 b/.local/share/mode/switch.d/fcitx5 index d9d0032..2cc6ccb 100755 --- a/.local/share/mode/switch.d/fcitx5 +++ b/.local/share/mode/switch.d/fcitx5 @@ -1,7 +1,7 @@ #!/bin/sh [ $no_cfg -eq 1 ] && return -mkcd "$XDG_DATA_HOME/fcitx5/themes/default" +mkcd "$XDG_DATA_HOME/fcitx5/themes/mode" rounding=6 size=$(( 2 * $rounding + 4 )) margin_h=6 |