1
0
Fork 0

Compare commits

...

10 commits

Author SHA1 Message Date
441a6b68d6
simplify 2025-05-12 18:41:46 +02:00
69165bbbf7
stuff 2025-05-11 23:58:28 +02:00
c5b629b295
less 2025-03-25 20:31:09 +01:00
64596a073c
what 2025-03-25 18:48:52 +01:00
92f097cb82
pluh 🗣 2025-03-01 22:34:30 +01:00
fa30c4d826
naming 2025-01-05 15:24:37 +01:00
4f6281d4d5
suggest --verbose 2025-01-05 15:23:39 +01:00
b7e9b356d8
clean dead links 2025-01-05 15:22:27 +01:00
d45aacbead
fix python 2025-01-03 21:37:12 +01:00
5a0a85aed9
stuff 2024-12-29 22:20:56 +01:00
21 changed files with 662 additions and 146 deletions

2
.gitignore vendored
View file

@ -1 +1,3 @@
.direnv/ .direnv/
.weavehist

View file

@ -2,20 +2,14 @@
My dotfiles. My dotfiles.
## Installing packages ## Usage
```shell ```shell
pacman --sync - < packages.txt plow --force --verbose
```
## Installing dotfiles
```shell
plow --force
``` ```
or... or...
```shell ```shell
plow --force --from ./home --to ~ plow --force --verbose --from ./home --to ~
``` ```

14
devenv.nix Normal file
View file

@ -0,0 +1,14 @@
{
pre-commit.hooks = {
# Nix
alejandra.enable = true;
deadnix.enable = true;
statix.enable = true;
# Flakes
flake-checker.enable = true;
# Shell
shellcheck.enable = true;
};
}

355
flake.lock generated
View file

@ -1,15 +1,96 @@
{ {
"nodes": { "nodes": {
"cachix": {
"inputs": {
"devenv": [
"weave",
"devenv"
],
"flake-compat": [
"weave",
"devenv"
],
"git-hooks": [
"weave",
"devenv"
],
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1742042642,
"narHash": "sha256-D0gP8srrX0qj+wNYNPdtVJsQuFzIng3q43thnHXQ/es=",
"owner": "cachix",
"repo": "cachix",
"rev": "a624d3eaf4b1d225f918de8543ed739f2f574203",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "latest",
"repo": "cachix",
"type": "github"
}
},
"devenv": {
"inputs": {
"cachix": "cachix",
"flake-compat": "flake-compat",
"git-hooks": "git-hooks",
"nix": "nix",
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1743783972,
"narHash": "sha256-5wPsNCnWmeLpLxavsftA9L7tnYgtlexV7FwLegxtpy4=",
"owner": "cachix",
"repo": "devenv",
"rev": "2f53e2f867e0c2ba18b880e66169366e5f8ca554",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"devenv-root": {
"flake": false,
"locked": {
"narHash": "sha256-d6xi4mKdjkX2JFicDIv5niSzpyI0m/Hnm8GGAIU04kY=",
"type": "file",
"url": "file:///dev/null"
},
"original": {
"type": "file",
"url": "file:///dev/null"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1726153070, "lastModified": 1743550720,
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", "rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -18,13 +99,157 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"weave",
"devenv",
"nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1712014858,
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": [
"weave",
"devenv"
],
"gitignore": "gitignore",
"nixpkgs": [
"weave",
"devenv",
"nixpkgs"
]
},
"locked": {
"lastModified": 1742649964,
"narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"weave",
"devenv",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"libgit2": {
"flake": false,
"locked": {
"lastModified": 1697646580,
"narHash": "sha256-oX4Z3S9WtJlwvj0uH9HlYcWv+x1hqp8mhXl7HsLu2f0=",
"owner": "libgit2",
"repo": "libgit2",
"rev": "45fd9ed7ae1a9b74b957ef4f337bc3c8b3df01b5",
"type": "github"
},
"original": {
"owner": "libgit2",
"repo": "libgit2",
"type": "github"
}
},
"nix": {
"inputs": {
"flake-compat": [
"weave",
"devenv"
],
"flake-parts": "flake-parts_2",
"libgit2": "libgit2",
"nixpkgs": "nixpkgs_3",
"nixpkgs-23-11": [
"weave",
"devenv"
],
"nixpkgs-regression": [
"weave",
"devenv"
],
"pre-commit-hooks": [
"weave",
"devenv"
]
},
"locked": {
"lastModified": 1741798497,
"narHash": "sha256-E3j+3MoY8Y96mG1dUIiLFm2tZmNbRvSiyN7CrSKuAVg=",
"owner": "domenkozar",
"repo": "nix",
"rev": "f3f44b2baaf6c4c6e179de8cbb1cc6db031083cd",
"type": "github"
},
"original": {
"owner": "domenkozar",
"ref": "devenv-2.24",
"repo": "nix",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1726243404, "lastModified": 1746663147,
"narHash": "sha256-sjiGsMh+1cWXb53Tecsm4skyFNag33GPbVgCdfj3n9I=", "narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "345c263f2f53a3710abe117f28a5cb86d0ba4059", "rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -36,20 +261,124 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1725233747, "lastModified": 1743296961,
"narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
"type": "tarball", "owner": "nix-community",
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" "repo": "nixpkgs.lib",
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
"type": "github"
}, },
"original": { "original": {
"type": "tarball", "owner": "nix-community",
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" "repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1743296961,
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1733212471,
"narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "55d15ad12a74eb7d4646254e13638ad0c4128776",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1717432640,
"narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "88269ab3044128b7c2f4c7d68448b2fb50456870",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1733477122,
"narHash": "sha256-qamMCz5mNpQmgBwc8SB5tVMlD5sbwVIToVZtSxMph9s=",
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "7bd9e84d0452f6d2e63b6e6da29fe73fac951857",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "rolling",
"repo": "devenv-nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1743827369,
"narHash": "sha256-rpqepOZ8Eo1zg+KJeWoq1HAOgoMCDloqv5r2EAa9TSA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42a1c966be226125b48c384171c44c651c236c22",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"weave": "weave"
}
},
"weave": {
"inputs": {
"devenv": "devenv",
"devenv-root": "devenv-root",
"flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1744154589,
"narHash": "sha256-W56RJmip2eup9o7uF/C7XHbamqqC5JXcDZ3AQ8M5jVI=",
"ref": "refs/heads/main",
"rev": "0d6662bdc7c73aa323074b11c6a14b0a6a041d8e",
"revCount": 2,
"type": "git",
"url": "https://codeberg.org/helvetica/weave.git"
},
"original": {
"type": "git",
"url": "https://codeberg.org/helvetica/weave.git"
} }
} }
}, },

View file

@ -4,6 +4,7 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
weave.url = "git+https://codeberg.org/helvetica/weave.git";
}; };
outputs = { outputs = {
@ -15,16 +16,21 @@
systems = nixpkgs.lib.systems.flakeExposed; systems = nixpkgs.lib.systems.flakeExposed;
perSystem = { perSystem = {
system,
pkgs, pkgs,
self',
... ...
}: { }: {
packages.plow = pkgs.callPackage ./plow {};
devShells.default = pkgs.mkShellNoCC { devShells.default = pkgs.mkShellNoCC {
PLOW_FROM = "./home"; packages = [
inputs.weave.packages.${system}.default
];
packages = [self'.packages.plow]; shellHook = ''
root=$(git rev-parse --show-toplevel)
export WEAVE_FROM=$root/home
export WEAVE_HIST=$root/.weavehist
'';
}; };
}; };
}; };

View file

@ -1 +1,29 @@
source /etc/bash.bashrc # shellcheck shell=bash
shopt -s autocd globstar nullglob extglob checkwinsize
for rc in /etc/bashrc /etc/*.bashrc; do
if [[ -e $rc ]]; then
# shellcheck disable=SC1090
source "$rc"
fi
done
if hash direnv 2>/dev/null; then
eval "$(direnv hook bash)"
fi
if hash starship 2>/dev/null; then
eval "$(starship init bash)"
fi
if hash nix 2>/dev/null; then
export PATH=${XDG_STATE_HOME:-~/.local/state}/nix/profile/bin:$PATH
fi
if hash hx 2>/dev/null; then
export EDITOR=hx
export VISUAL=hx
fi
export PATH=~/.local/bin:$PATH

View file

@ -0,0 +1,15 @@
[flags]
rate = "1s"
retention = "10m"
temperature_type = "celsius"
battery = true
enable_cache_memory = true
tree = true
show_table_scroll_position = true
process_command = false
[styles]
theme = "gruvbox"

View file

@ -12,10 +12,10 @@ if status is-interactive
set fish_cursor_replace_one underscore blink set fish_cursor_replace_one underscore blink
set fish_cursor_visual block set fish_cursor_visual block
if set -q XDG_CONFIG_HOME begin
set -x RIPGREP_CONFIG_PATH $XDG_CONFIG_HOME/ripgrep/ripgreprc set --local parent $XDG_CONFIG_HOME
else test -z $parent && set parent ~/.config
set -x RIPGREP_CONFIG_PATH ~/.config/ripgrep/ripgreprc set --export RIPGREP_CONFIG_PATH $parent/ripgrep/ripgreprc
end end
if type -q direnv if type -q direnv
@ -27,9 +27,18 @@ if status is-interactive
end end
if type -q nix if type -q nix
fish_add_path ~/.local/state/nix/profile/bin set --local parent $XDG_STATE_HOME
test -z $parent && set parent ~/.local/state
fish_add_path $parent/nix/profile/bin
end end
if type -q hx
set --export EDITOR hx
set --export VISUAL hx
end
fish_add_path ~/.local/bin
abbr --add l ls abbr --add l ls
abbr --add lsa ls -a abbr --add lsa ls -a
abbr --add la ls -a abbr --add la ls -a

View file

@ -1,12 +1,123 @@
[user] [user]
name = Lukas Wurzinger # Error when the user has not explicitly been configured
email = lukas@wrz.one useConfigOnly = true
signingkey = ~/.ssh/id_ed25519.pub
[core] [core]
# Global gitignore
excludesFile = ~/.config/git/ignore excludesFile = ~/.config/git/ignore
# Paginate output
pager = less
# Use Helix as default editor
editor = hx
# Don't consider trailing space change as a cause for merge conflicts
whitespace = -trailing-space
[init] [init]
defaultBranch = main defaultBranch = main
[gpg] [gpg]
# Use SSH keys for signing
format = ssh format = ssh
[commit] [commit]
# Sign commits
gpgsign = true gpgsign = true
[push]
# Avoid having to manually set up remote branches
autoSetupRemote = true
[help]
# Only display suggestions
autoCorrect = 0
[color]
# Pretty
ui = auto
[diff]
# Use better, descriptive initials (c, i, w) instead of a/b.
mnemonicPrefix = true
# Show renames/moves as such
renames = true
# When using --word-diff, assume --word-diff-regex=.
wordRegex = .
# Display submodule-related information (commit listings)
submodule = log
# Use Helix as default diff tool when running `git difftool` (TODO)
# tool = helix
[difftool]
prompt = false
# [difftool "helix"]
# cmd = hx --wait --diff -- "$LOCAL" "$REMOTE"
[fetch]
# Auto-fetch submodule changes (won't auto-update)
recurseSubmodules = on-demand
[grep]
break = true
heading = true
lineNumber = true
# Consider most regexes to be ERE
extendedRegexp = true
[log]
# Use abbrev SHAs whenever possible/relevant instead of full 40 chars
abbrevCommit = true
# Automatically --follow when given a single path
follow = true
[merge]
# Display common-ancestor blocks in conflict hunks
conflictStyle = diff3
# Disable fast-forward merges as default merge strategy
ff = false
[mergetool]
# Clean up backup files created by merge tools on tool exit
keepBackup = false
# Clean up temp files created by merge tools on tool exit
keepTemporaries = false
# Put the temp files in a dedicated dir anyway
writeToTemp = true
# Auto-accept file prompts when launching merge tools
prompt = false
[push]
# Default push should only push the current branch to its push target, regardless of its remote name
default = upstream
# When pushing, also push tags whose commit-ishs are now reachable upstream
followTags = true
[rebase]
# Automatically stash CWD and stage when running rebase
autoStash = true
[status]
# Display submodule rev change summaries in status
submoduleSummary = true
# Recursively traverse untracked directories to display all contents
showUntrackedFiles = all
[tag]
# Sort tags as version numbers whenever applicable
sort = version:refname
[alias]
# List available aliases
aliases = !git config --get-regexp '^alias\\.' | sed -E 's/^alias\\.//'
# Command shortcuts
ci = commit
co = checkout
st = status
sw = switch
rs = restore
# Update last commit with staged files without editing the commit message
oops = commit --amend --no-edit
# Ensure that force-pushing won't lose someone else's work (only mine)
push-with-lease = push --force-with-lease
# Replay each commit during rebase with the standard commit command which will trigger hooks
rebase-with-hooks = rebase --exec 'git reset --soft HEAD~1 && git commit -C HEAD@{1}'
# Review commit log
review = log --graph
# List local commits that were not pushed to remote repository
log-local = log @{push}..
review-local = review @{push}..
# Edit last commit message
reword = commit --amend
# Undo last commit but keep changed files in stage
uncommit = reset --soft HEAD~1
# Remove file(s) from Git but not from disk
untrack = rm --cached --
[includeIf "gitdir:~/Personal/"]
path = config-personal
[includeIf "gitdir:~/Work/"]
path = config-work
[include]
path = config-local

View file

@ -0,0 +1,4 @@
[user]
name = Lukas Wurzinger
email = lukas@wrz.one
signingkey = ~/.ssh/id_ed25519.pub

View file

@ -0,0 +1,4 @@
[user]
name = Lukas Wurzinger
email = lukas@wrz.one
signingkey = ~/.ssh/id_ed25519.pub

View file

@ -47,5 +47,9 @@ zig-cache/
zig-out/ zig-out/
.devenv*
devenv.local.nix
.direnv/ .direnv/
.devenv/
.pre-commit-config.yaml

View file

@ -0,0 +1,31 @@
(
open_help: Some(( code: F(1), modifiers: "")),
move_left: Some(( code: Char('h'), modifiers: "")),
move_right: Some(( code: Char('l'), modifiers: "")),
move_up: Some(( code: Char('k'), modifiers: "")),
move_down: Some(( code: Char('j'), modifiers: "")),
popup_up: Some(( code: Char('p'), modifiers: "CONTROL")),
popup_down: Some(( code: Char('n'), modifiers: "CONTROL")),
page_up: Some(( code: Char('b'), modifiers: "CONTROL")),
page_down: Some(( code: Char('f'), modifiers: "CONTROL")),
home: Some(( code: Char('g'), modifiers: "")),
end: Some(( code: Char('G'), modifiers: "SHIFT")),
shift_up: Some(( code: Char('K'), modifiers: "SHIFT")),
shift_down: Some(( code: Char('J'), modifiers: "SHIFT")),
edit_file: Some(( code: Char('I'), modifiers: "SHIFT")),
status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")),
diff_reset_lines: Some(( code: Char('u'), modifiers: "")),
diff_stage_lines: Some(( code: Char('s'), modifiers: "")),
stashing_save: Some(( code: Char('w'), modifiers: "")),
stashing_toggle_index: Some(( code: Char('m'), modifiers: "")),
stash_open: Some(( code: Char('l'), modifiers: "")),
abort_merge: Some(( code: Char('M'), modifiers: "SHIFT")),
)

View file

@ -50,7 +50,6 @@ after-delay.enable = true
after-delay.timeout = 3000 after-delay.timeout = 3000
[keys.normal] [keys.normal]
# Nicities
esc = ["collapse_selection", "keep_primary_selection"] esc = ["collapse_selection", "keep_primary_selection"]
C-h = "select_prev_sibling" C-h = "select_prev_sibling"
@ -65,13 +64,7 @@ C-r = "redo"
x = "extend_line" x = "extend_line"
# Vim-like # Vim
V = ["select_mode", "extend_to_line_bounds"]
C = ["extend_to_line_end", "yank_main_selection_to_clipboard", "delete_selection", "insert_mode"]
D = ["extend_to_line_end", "yank_main_selection_to_clipboard", "delete_selection"]
G = "goto_last_line"
# Vim-like but also generally useful
"{" = ["goto_prev_paragraph", "collapse_selection"] "{" = ["goto_prev_paragraph", "collapse_selection"]
"}" = ["goto_next_paragraph", "collapse_selection"] "}" = ["goto_next_paragraph", "collapse_selection"]
@ -84,7 +77,9 @@ a = ["append_mode", "collapse_selection"]
u = ["undo", "collapse_selection"] u = ["undo", "collapse_selection"]
## Search for word under cursor G = "goto_last_line"
# Search for word under cursor
"*" = ["move_char_right", "move_prev_word_start", "move_next_word_end", "search_selection", "search_next"] "*" = ["move_char_right", "move_prev_word_start", "move_next_word_end", "search_selection", "search_next"]
"#" = ["move_char_right", "move_prev_word_start", "move_next_word_end", "search_selection", "search_prev"] "#" = ["move_char_right", "move_prev_word_start", "move_next_word_end", "search_selection", "search_prev"]
@ -92,20 +87,13 @@ u = ["undo", "collapse_selection"]
esc = ["collapse_selection", "normal_mode"] esc = ["collapse_selection", "normal_mode"]
[keys.select] [keys.select]
# Nicities
esc = ["collapse_selection", "keep_primary_selection", "normal_mode"] esc = ["collapse_selection", "keep_primary_selection", "normal_mode"]
";" = ["collapse_selection", "normal_mode"] ";" = ["collapse_selection", "normal_mode"]
x = "extend_line" x = "extend_line"
# Vim-like # Vim
V = ["select_mode", "extend_to_line_bounds"]
C = ["extend_to_line_end", "yank_main_selection_to_clipboard", "delete_selection", "insert_mode"]
D = ["extend_to_line_end", "yank_main_selection_to_clipboard", "delete_selection"]
G = "goto_last_line"
# Vim-like but also generally useful
"{" = ["goto_prev_paragraph", "collapse_selection"] "{" = ["goto_prev_paragraph", "collapse_selection"]
"}" = ["goto_next_paragraph", "collapse_selection"] "}" = ["goto_next_paragraph", "collapse_selection"]
@ -115,3 +103,5 @@ a = "select_textobject_around"
0 = "goto_first_nonwhitespace" 0 = "goto_first_nonwhitespace"
"^" = "goto_line_start" "^" = "goto_line_start"
"$" = "goto_line_end" "$" = "goto_line_end"
G = "goto_last_line"

View file

@ -1,3 +1,16 @@
[[language]] [[language]]
name = "gotmpl" name = "gotmpl"
file-types = ["tmpl"] file-types = ["tmpl"]
[[language]]
name = "python"
language-servers = [ "basedpyright" ]
formatter = {command = 'ruff', args = ["format", "--quiet", "-"]}
[language-server]
zk-lsp = { command = "zk", args = [ "lsp" ] }
[[language]]
name = "markdown"
roots = [ ".zk" ]
language-servers = [ "zk-lsp" ]

View file

@ -1,3 +1,5 @@
auto-optimise-store = true auto-optimise-store = true
experimental-features = nix-command flakes experimental-features = nix-command flakes
use-xdg-base-directories = true use-xdg-base-directories = true
substituters = https://cache.nixos.org https://cosmic.cachix.org/ https://cache.nixos.org/ https://fossar.cachix.org https://cosmic.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE= fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE=

View file

@ -1,3 +1,5 @@
Include local/*
Host * Host *
Compression yes Compression yes
ServerAliveInterval 60 ServerAliveInterval 60

View file

@ -0,0 +1,50 @@
[notebook]
dir = "~/Notes"
[note]
language = "en"
default-title = "Untitled"
filename = "{{id}}-{{slug title}}"
extension = "md"
template = "default.md"
id-charset = "alphanum"
id-length = 4
id-case = "lower"
[extra]
author = "Helvetica"
[group.journal]
paths = ["journal/weekly", "journal/daily"]
[group.journal.note]
filename = "{{format-date now}}"
[format.markdown]
hashtags = true
colon-tags = true
[tool]
editor = "hx"
# shell = "/bin/bash"
# pager = "less -FIRX"
fzf-preview = "bat -p --color always {-1}"
[filter]
recents = "--sort created- --created-after 'last two weeks'"
[alias]
# Edit the last modified note.
edlast = "zk edit --limit 1 --sort modified- $@"
# Edit the notes selected interactively among the notes created the last two weeks.
recent = "zk edit --sort created- --created-after 'last two weeks' --interactive"
# Show a random note.
lucky = "zk list --quiet --format full --sort random --limit 1"
[lsp]
[lsp.diagnostics]
# Report titles of wiki-links as hints.
wiki-title = "hint"
# Warn for dead links between notes.
dead-link = "error"

View file

@ -1,12 +0,0 @@
bash
direnv
fd
fish
git
gitui
helix
nix
ripgrep
starship
wl-clipboard
zellij

View file

@ -1,6 +0,0 @@
{writeShellApplication}:
writeShellApplication {
name = "plow";
text = builtins.readFile ./plow.bash;
}

View file

@ -1,74 +0,0 @@
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
shopt -s nullglob globstar
opts=$(getopt --options f:t:Fivm: --longoptions=from:,to:,force,interactive,verbose,directory-mode: --name "$0" -- "$@")
eval set -- "$opts"
from=${PLOW_FROM:-$PWD}
to=${PLOW_TO:-$HOME}
lnflags=()
mkdirflags=()
while true; do
case "$1" in
-f | --from)
from=$2
shift 2
;;
-t | --to)
to=$2
shift 2
;;
-F | --force)
lnflags+=(--force)
shift
;;
-i | --interactive)
lnflags+=(--interactive)
shift
;;
-v | --verbose)
lnflags+=(--verbose)
mkdirflags+=(--verbose)
shift
;;
-m | --directory-mode)
mkdirflags+=(--mode "$2")
shift 2
;;
--)
shift
break
;;
esac
done
from=$(realpath --strip -- "$from")
to=$(realpath --strip -- "$to")
if (( $# > 0 )); then
choices=("$@")
else
choices=()
for dir in "$from"/*/; do
choices+=("$(basename -- "$dir")")
done
fi
shopt -s dotglob
for choice in "${choices[@]}"; do
prefix=$from/$choice
for target in "$prefix"/**/*; do
if [[ -f "$target" ]]; then
link=$to${target#"$prefix"}
mkdir --parents "${mkdirflags[@]}" -- "$(dirname -- "$link")"
ln --symbolic "${lnflags[@]}" -- "$target" "$link"
fi
done
done