diff options
| -rw-r--r-- | .config/gdb/gdbinit | 9 | ||||
| -rwxr-xr-x | .config/i3/autostart | 1 | ||||
| -rw-r--r-- | .config/nvim/init.vim | 2 | ||||
| -rwxr-xr-x | .config/yadm/root/bootstrap | 2 | ||||
| -rwxr-xr-x | .config/yadm/root/etc/NetworkManager/dispatcher.d/70-auto-wifi.sh | 21 | ||||
| -rwxr-xr-x | .local/share/bin/dox-open | 31 | ||||
| -rwxr-xr-x | .local/share/bin/fontfix | 39 | ||||
| -rw-r--r-- | .ssh/config | 3 | ||||
| -rwxr-xr-x | .xinitrc | 2 |
9 files changed, 104 insertions, 6 deletions
diff --git a/.config/gdb/gdbinit b/.config/gdb/gdbinit index 7e59573..189c821 100644 --- a/.config/gdb/gdbinit +++ b/.config/gdb/gdbinit @@ -1,2 +1,7 @@ -set disassembly-flavor intel -set debuginfod enabled off +# set disassembly-flavor intel +# set debuginfod enabled off +set confirm off + +alias mk = !mk +# alias -a m = mk +alias reset = monitor reset diff --git a/.config/i3/autostart b/.config/i3/autostart index 00e55d5..70b7616 100755 --- a/.config/i3/autostart +++ b/.config/i3/autostart @@ -17,6 +17,7 @@ nicotine --hidden & desktop2mqtt --config "$XDG_CONFIG_HOME/desktop2mqtt/config.yml" & light-locker --late-locking --lock-after-screensaver=0 --no-lock-on-suspend --no-lock-on-lid & systembus-notify & +nmpassd & # auto start lazy script after everything else [ -x "$HOME/do.sh" ] && "$HOME/do.sh" & diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index f2fcf0b..25ac6de 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -6,7 +6,7 @@ set noexpandtab set tabstop=2 set shiftwidth=2 set termguicolors -set shortmess=I +set shortmess+=It set splitbelow splitright set noshowmode set ignorecase diff --git a/.config/yadm/root/bootstrap b/.config/yadm/root/bootstrap index 4eef9db..f8b59fb 100755 --- a/.config/yadm/root/bootstrap +++ b/.config/yadm/root/bootstrap @@ -31,7 +31,7 @@ s getent passwd "$SETUP_USER" || wrong_call [ $(id -u "$SETUP_USER") -eq 0 ] && wrong_call begintask "copy system config files" -s cp -r etc/. /etc +s cp -r --preserve=mode,timestamps etc/. /etc endtask PINENTRY="pinentry-gnome3" diff --git a/.config/yadm/root/etc/NetworkManager/dispatcher.d/70-auto-wifi.sh b/.config/yadm/root/etc/NetworkManager/dispatcher.d/70-auto-wifi.sh new file mode 100755 index 0000000..4680626 --- /dev/null +++ b/.config/yadm/root/etc/NetworkManager/dispatcher.d/70-auto-wifi.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +export LANG=C + +interface="$1" +action="$2" + +connectivity="$(nmcli networking connectivity)" +interface_type="$(nmcli -g GENERAL.TYPE device show "$interface")" +interface_state="$(nmcli -g GENERAL.STATE device show "$interface" | grep -o '^[0-9]\+')" + +if [ "$action" = "down" ] && [ "$connectivity" = "none" ]; then + nmcli radio wifi on + exit +fi + +if [ "$action" = "up" ] && [ "$interface_type" == "ethernet" ] && [ "$interface_state" = "100" ]; then + nmcli radio wifi off + exit +fi + diff --git a/.local/share/bin/dox-open b/.local/share/bin/dox-open new file mode 100755 index 0000000..493c435 --- /dev/null +++ b/.local/share/bin/dox-open @@ -0,0 +1,31 @@ +#!/bin/node + +import { glob, readFile } from 'node:fs/promises'; +import { spawn } from 'node:child_process'; +import { argv, chdir, cwd } from 'node:process'; +import { join } from 'node:path'; + +argv.shift(); +argv.shift(); +chdir("search"); + +var symbols = {}; +for await (const chunk of glob('all_*.js')) { + const contents = await readFile(chunk); + const searchData = eval(`${contents}; searchData`); + const here = cwd(); + + for (const [ _id, [ symbol, ...entry ] ] of searchData) { + symbols[symbol] = entry.map(e => `file://${join(here, e[0])}`); + } +} + +for (const symbol of argv) { + if (!(symbol in symbols)) { + console.error(`No doxygen index for symbol \`${symbol}\``); + continue; + } + const urls = symbols[symbol]; + spawn('xdg-open', [ urls[0], ]); +} + diff --git a/.local/share/bin/fontfix b/.local/share/bin/fontfix new file mode 100755 index 0000000..1c9beaf --- /dev/null +++ b/.local/share/bin/fontfix @@ -0,0 +1,39 @@ +#!/bin/python3 + +import os +import sys +from pathlib import Path + +from fontTools import ttLib + +PROPID_FAMILY = 1 +PROPID_SUBFAMILY = 2 +PROPID_FULLNAME = 4 +PROPID_PSNAME = 6 + +PLATFORM_MS = 1 +PLATFORM_MAC = 3 + +# see +# https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html +# for magic numbers + +for folder in Path(".").iterdir(): + print(f"{folder}/") + family_name = str(folder.stem) + for file in folder.glob("*.ttf"): + subfamily_name = file.stem.removeprefix(family_name).strip() + with ttLib.TTFont(file) as ttf: + nametable = ttf["name"] + full_name = f"{family_name} {subfamily_name}" + postscript_name = f"{family_name}-{subfamily_name}".replace(" ", "") + nametable.setName(family_name, PROPID_FAMILY, PLATFORM_MS, 0, 0) + nametable.setName(family_name, PROPID_FAMILY, PLATFORM_MAC, 1, 1033) + nametable.setName(subfamily_name, PROPID_SUBFAMILY, PLATFORM_MS, 0, 0) + nametable.setName(subfamily_name, PROPID_SUBFAMILY, PLATFORM_MAC, 1, 1033) + nametable.setName(full_name, PROPID_FULLNAME, PLATFORM_MS, 0, 0) + nametable.setName(full_name, PROPID_FULLNAME, PLATFORM_MAC, 1, 1033) + nametable.setName(postscript_name, PROPID_PSNAME, PLATFORM_MS, 0, 0) + nametable.setName(postscript_name, PROPID_PSNAME, PLATFORM_MAC, 1, 1033) + ttf.save(file) + print(f" {file.name}: [{family_name} :: {subfamily_name}]") diff --git a/.ssh/config b/.ssh/config index 7e3a1bc..d5b44b7 100644 --- a/.ssh/config +++ b/.ssh/config @@ -1,2 +1,5 @@ match user git host pipeframe.xyz requesttty no + +host * + warnweakcrypto no @@ -4,8 +4,6 @@ # make current environment available to systemd user units systemctl --user import-environment $(export | cut -d= -f1) -xrdb -override "$XDG_CONFIG_HOME/X11/base" - # https://github.com/swaywm/sway/wiki#gtk-applications-take-20-seconds-to-start dbus-update-activation-environment --systemd DISPLAY |