Skip to content

Commit

Permalink
nix: add shortcuts + typst 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
marcothms committed Jan 19, 2025
1 parent f79df24 commit 81341f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 10 additions & 1 deletion files/shell/.shellrc.alias
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ glg() {
git log --graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | fzf --ansi --no-sort --reverse --tiebreak=index --toggle-sort=\` --bind "ctrl-m:execute: echo {} | grep -o '[a-f0-9]\{7\}' | head -1 | xargs -I % sh -c 'git show --color=always % | less -R'";
}

# nix
alias nd="nix develop ."
alias ns="nix-shell"
alias nu="nix-channel --update"
alias nt="cp $HOME/.dots/templates/typst.nix . && echo 'Copied typst.nix'"

tw() {
typst watch $1 --open
}

# ripgrep
rf() {
rg $1 --line-number --color=always | fzf --reverse --ansi --bind "enter:become($EDITOR {1} +{2})" --delimiter :
Expand All @@ -40,7 +50,6 @@ alias dhs='du . -hs'
alias diff_dir='diff -qr'
alias g='git'
alias l='ls --color --hyperlink'
alias nd="nix develop ."
alias nssh='SSH_AUTH_SOCK= ssh'
alias s='kitten ssh'
alias o='xdg-open' # to change a mime use: `xdg-mime default APPLICATION HANDLE`
Expand Down
3 changes: 2 additions & 1 deletion templates/typst.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
with (import <nixpkgs> {});
mkShell {
buildInputs = [
(typst.overrideAttrs { version = "0.11.1"; })
(typst.overrideAttrs { version = "0.12.0"; })
tinymist
];
}

Expand Down

0 comments on commit 81341f1

Please sign in to comment.