aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nvim/dot-config/nvim-final/init.lua6
-rw-r--r--nvim/dot-config/nvim-final/plugin/treesitter.lua42
-rw-r--r--rust/dot-local/share/cargo/config.toml5
-rwxr-xr-xscripts/dot-local/bin/aconfmgr-patcher87
-rw-r--r--system-notes.md4
-rw-r--r--waybar/dot-config/waybar/config.jsonc2
-rw-r--r--yay/dot-config/yay/config.json50
7 files changed, 195 insertions, 1 deletions
diff --git a/nvim/dot-config/nvim-final/init.lua b/nvim/dot-config/nvim-final/init.lua
index 54dee05..eb9074d 100644
--- a/nvim/dot-config/nvim-final/init.lua
+++ b/nvim/dot-config/nvim-final/init.lua
@@ -14,6 +14,8 @@ require("vim._extui").enable({})
vim.cmd([[ packadd! nvim.undotree ]])
vim.cmd([[
+nnoremap - <Cmd>Ex<CR>
+
nnoremap <expr> [e '<Cmd>.move --' . v:count1 . '<CR>'
nnoremap <expr> ]e '<Cmd>.move +' . v:count1 . '<CR>'
xnoremap <expr> [e ':move --' . v:count1 . '<CR>gv'
@@ -29,6 +31,10 @@ xnoremap gs :sort<CR>
vim.keymap.set("n", "gK", "K")
+vim.o.expandtab = true
+vim.o.shiftwidth = 4
+vim.o.tabstop = 4
+
vim.o.breakindent = true
-- Every wrapped line will continue visually indented (same amount of
-- space as the beginning of that line), thus preserving horizontal
diff --git a/nvim/dot-config/nvim-final/plugin/treesitter.lua b/nvim/dot-config/nvim-final/plugin/treesitter.lua
new file mode 100644
index 0000000..1fb4503
--- /dev/null
+++ b/nvim/dot-config/nvim-final/plugin/treesitter.lua
@@ -0,0 +1,42 @@
+local disabled = {}
+local ft_lang_map = {}
+
+vim.api.nvim_create_autocmd("FileType", {
+ group = vim.api.nvim_create_augroup("treesitter_highlight_augroup", {clear = true}),
+ callback = function(ev)
+ local buf = ev.buf
+ if vim.api.nvim_buf_is_loaded(buf) then
+ local ft = vim.bo[buf].filetype
+ if not disabled[ft] then
+ if ft_lang_map[ft] then
+ vim.treesitter.language.register(ft_lang_map[ft], ft)
+ ft_lang_map[ft] = nil
+ end
+ local parser = vim.treesitter.get_parser(buf, nil, { error = false })
+ if parser == nil then
+ disabled[ft] = true
+ else
+ if not vim.treesitter.highlighter.active[buf] then
+ vim.treesitter.highlighter.new(parser)
+ end
+ end
+ end
+ end
+ --(when (vim.api.nvim_buf_is_loaded buf)
+ -- (let [ft (. vim.bo buf :filetype)]
+ -- (when (not (. disabled ft))
+ -- (case (. ft-lang-map ft)
+ -- lang (do
+ -- (vim.treesitter.language.register lang ft)
+ -- (tset ft-lang-map ft nil)))
+ -- (case (vim.treesitter.get_parser buf nil {:error false})
+ -- nil (tset disabled ft true)
+ -- parser (do
+ -- (when (not (. vim.treesitter.highlighter.active buf))
+ -- (vim.treesitter.highlighter.new parser))
+ -- (when (vim.treesitter.query.get ft :folds)
+ -- (set vim.wo.foldmethod :expr)
+ -- (set vim.wo.foldexpr "v:lua.vim.treesitter.foldexpr()")))))))))
+
+ end
+})
diff --git a/rust/dot-local/share/cargo/config.toml b/rust/dot-local/share/cargo/config.toml
new file mode 100644
index 0000000..b39742b
--- /dev/null
+++ b/rust/dot-local/share/cargo/config.toml
@@ -0,0 +1,5 @@
+[target.x86_64-unknown-linux-gnu]
+rustflags = ["-C", "opt-level=3", "-C", "target-cpu=native"]
+
+[build]
+rustc-wrapper = "sccache"
diff --git a/scripts/dot-local/bin/aconfmgr-patcher b/scripts/dot-local/bin/aconfmgr-patcher
new file mode 100755
index 0000000..cbc9c93
--- /dev/null
+++ b/scripts/dot-local/bin/aconfmgr-patcher
@@ -0,0 +1,87 @@
+#!/bin/bash
+set -euo pipefail
+shopt -s nullglob
+
+input="99-unsorted.sh"
+output="98-patches.sh"
+filestoremove="remove-these"
+truncate=1
+
+mkdir -p patches
+
+while [[ $# -gt 0 ]]; do
+ case "$1" in
+ --no-trunc) truncate=0 ;;
+ --in)
+ input=$2
+ shift 1
+ ;;
+ --out)
+ output=$2
+ shift 1
+ ;;
+ *) break ;;
+ esac
+ shift 1
+done
+
+tmpfile=$(mktemp)
+[[ $truncate -eq 1 ]] && (echo -n >"$output") # empty output file to be rewritten
+echo "temp file is $tmpfile"
+
+while IFS= read -r line; do
+ # Only process lines starting with "CopyFile "
+ [[ "$line" =~ ^CopyFile[[:space:]]+/ ]] || {
+ echo "$line" >>"$tmpfile"
+ continue
+ }
+
+ path="${line#CopyFile }"
+ path="${path%% *}" # remove any trailing args
+
+ # Check ownership
+ if ! info=$(pacman -Qo "$path" 2>/dev/null); then
+ echo "WARN: Skipping $path: not owned by any package" >&2
+ echo "$line" >>"$tmpfile"
+ continue
+ fi
+
+ # Example output: "/etc/pacman.conf is owned by pacman 5.1.3-1"
+ pkg_name=$(awk '{print $(NF-1)}' <<<"$info")
+ pkg_ver=$(awk '{print $NF}' <<<"$info")
+
+ # Find package archive in cache
+ archives=(/var/cache/pacman/pkg/${pkg_name}-${pkg_ver}-*.pkg.tar.zst)
+ if ((${#archives[@]} == 0)); then
+ echo "WARN: Cached package not found for $pkg_name-$pkg_ver" >&2
+ echo "$line" >>"$tmpfile"
+ continue
+ fi
+ archive="${archives[0]}"
+
+ # Create diff file name
+ base=$(basename "$path")
+ diff_file="patches/${pkg_name}_${base}.diff"
+
+ # Relative path inside package archive
+ relpath="${path#/}"
+
+ # Generate diff
+ if ! tar -xOf "$archive" "$relpath" 2>/dev/null | diff -u - "$path" > "$diff_file"; then
+ echo "patch \"\$(GetPackageOriginalFile $pkg_name $path)\" ./$diff_file" >>"$output"
+ echo "$path" >> $filestoremove
+ echo "INFO: Added patch for $path" >&2
+ else
+ rm -f "$diff_file"
+ echo "INFO: No differences for $path"
+ fi
+done <"$input"
+
+if ! diff -u --color=always "$input" "$tmpfile" 2>/dev/null; then
+ :
+fi
+mv "$input" "$input.backup"
+mv "$tmpfile" "$input"
+
+echo
+echo "OK: All done. Patch commands written to $output"
diff --git a/system-notes.md b/system-notes.md
index f53fb0c..8d05fd6 100644
--- a/system-notes.md
+++ b/system-notes.md
@@ -286,3 +286,7 @@ sudo rsync -avxHAX /home/yourusername/ /path/to/your/backup/location/
- call/email US embassy for getting an appointment
- call/email [headstart](https://www.caasomerville.org/head-start/)
+# configs:
+- gpanders
+- glepnir
+- seandewar
diff --git a/waybar/dot-config/waybar/config.jsonc b/waybar/dot-config/waybar/config.jsonc
index 6e8d81e..5136b15 100644
--- a/waybar/dot-config/waybar/config.jsonc
+++ b/waybar/dot-config/waybar/config.jsonc
@@ -63,7 +63,7 @@
"format-full": "{capacity}% {icon}",
"format-charging": "{capacity}% 󰢝",
"format-plugged": "{capacity}% ",
- "format-alt": "{power} {icon}",
+ "format-alt": "{power}W {icon}",
"format-icons": [
"",
"",
diff --git a/yay/dot-config/yay/config.json b/yay/dot-config/yay/config.json
new file mode 100644
index 0000000..7832854
--- /dev/null
+++ b/yay/dot-config/yay/config.json
@@ -0,0 +1,50 @@
+{
+ "aururl": "https://aur.archlinux.org",
+ "aurrpcurl": "https://aur.archlinux.org/rpc?",
+ "buildDir": "/home/moreka/.cache/yay",
+ "editor": "nvim",
+ "editorflags": "",
+ "makepkgbin": "makepkg",
+ "makepkgconf": "",
+ "pacmanbin": "pacman",
+ "pacmanconf": "/etc/pacman.conf",
+ "redownload": "no",
+ "answerclean": "N",
+ "answerdiff": "",
+ "answeredit": "N",
+ "answerupgrade": "",
+ "gitbin": "git",
+ "gpgbin": "gpg",
+ "gpgflags": "",
+ "mflags": "",
+ "sortby": "votes",
+ "searchby": "name-desc",
+ "gitflags": "",
+ "removemake": "no",
+ "sudobin": "sudo",
+ "sudoflags": "",
+ "version": "12.5.7",
+ "requestsplitn": 150,
+ "completionrefreshtime": 7,
+ "maxconcurrentdownloads": 5,
+ "bottomup": false,
+ "sudoloop": false,
+ "timeupdate": false,
+ "devel": true,
+ "cleanAfter": false,
+ "keepSrc": false,
+ "provides": true,
+ "pgpfetch": true,
+ "cleanmenu": true,
+ "diffmenu": true,
+ "editmenu": false,
+ "combinedupgrade": true,
+ "useask": false,
+ "batchinstall": false,
+ "singlelineresults": false,
+ "separatesources": true,
+ "debug": false,
+ "rpc": true,
+ "doubleconfirm": false,
+ "rebuild": "no"
+}