+/config

my dotfiles and nix configuration

git clone https://git.julia.blue/+/config

Julia RyanAdd helix config428c771

main
1.8 KiB55 linesraw
1unalias run-help && autoload -Uz run-help && alias help=run-help
2
3function path { echo $path | sd ' ' '\n'; }
4alias vi=hx
5alias cat=bat
6alias l="eza --icons --time-style relative --color-scale all --group-directories-first"
7alias ls="l -l" alias la="l -la"
8alias tree="l -T --git-ignore"
9alias o=xdg-open
10alias c=clear
11alias sudo="sudo " # trailing space for alias expansion
12alias please="sudo "
13alias fuck=killall
14function note { cd ~/documents/notes && vi todo/TODO.md **/*.md && cd -; }
15alias send="wormhole-rs tx"
16alias receive="wormhole-rs rx"
17alias getsong="ytmdl --dont-transcode --download-archive ~/.cache/ytmdl/archive"
18alias wine32="WINEPREFIX=$HOME/.wine32 wine"
19function ststatus {
20    IFS=$'\n' read -rd '' id uptime start url cpu < \
21        <(syncthing cli show system |
22            jq '.myID, .uptime, .startTime, .guiAddressUsed, .cpuPercent' -r)
23    echo -e "ID: $id\nStarted $start $(numbat -e "${uptime}s to human")"
24    echo -e "CPU: $cpu%\nGUI: $(echo $url | sd 127.0.0.1 localhost)"
25}
26
27alias sc=systemctl
28alias music=rmpc
29alias m=music
30function shuffle { mpc clear && mpc ls | mpc add && mpc shuffle && mpc play; }
31alias bp=factorio-bp-helper
32function fontcheck {
33    FC_DEBUG=4 pango-view -q -t $1 --font=${2:-sans} |&
34        rg -or '$1' 'family: "([^"]+)"' | tail -1
35}
36
37alias hm=home-manager
38alias nixlist='hm packages'
39function nixfind {
40    nix-locate --color=always -rt r -t x -t s $@ |
41        sd '/nix/store/[^/\x1b]+' '' | sort
42}
43alias nixsize=nix-tree
44function nixclean { nix-collect-garbage -d && sudo $(which nix-collect-garbage) -d; }
45function switch {
46    if [[ $(uname) == "Darwin" ]]; then
47        cmd=darwin
48    elif command -v nixos-rebuild >/dev/null; then
49        cmd=os
50    else
51        cmd=home
52    fi
53    nh $cmd switch $CONF_DIR
54}
55alias update="switch -u"