+/config
my dotfiles and nix configuration
git clone https://git.julia.blue/+/config
25665e9
main
1# TODO: completion configuration (troubleshoot kill signals not showing up) 2# TODO: keybindings 3 4# if status is-login 5fish_add_path -P$HOME /.cargo/bin 6fish_add_path -P$HOME /.local/bin 7# end 8 9set -e __HM_SESS_VARS_SOURCED 10source ~/.nix-profile/etc/profile.d/hm-session-vars.fish 11 12function give-me-a-ping-vasily 13# One Ping Only... 14echo -n"Ping: " 15ping -qc1 -W1$argv [ 1 ] &| awk -F/'END{ print (/^rtt/? "OK "$5" ms":"FAIL") }' 16end 17 18function latest-screenshot 19set -l p ~/images/screenshots/ 20echo -n$p 21l $p --sort=time| tail -n1 22end 23 24function latest-snapshot 25find /home/.snapshots -mindepth2 -maxdepth2 -type d -name snapshot| sort -V| tail -n1 26end 27 28if ! status is-interactive 29return 30end 31 32abbr -a config git -C$CONF_DIR 33abbr -a reload exec fish 34 35set -gx fish_lsp_diagnostic_disable_error_codes4004 36 37function fish_greeting 38if test ( hostname ) != Cortana# i already have it there 39eval ( random choice randomcat"pokedex mon random" ) 40end 41end 42 43function mkconfig 44set -l name$argv [ 1 ] config 45set -e argv[ 1 ] 46eval "function $name 47pushd $CONF_DIR >/dev/null; hx dotfiles/{ $argv }; popd >/dev/null 48end" 49end 50 51mkconfig hx .config/helix/config.toml, .config/helix/languages.toml 52mkconfig vim .config/nvim/lua/main.lua,".config/nvim/**/*.lua" ,".config/nvim/**/*.vim" 53mkconfig zsh .zshrc, .zshenv,".config/zsh/*" 54mkconfig fish .config/fish/extra.fish,".config/fish/conf.d/*" 55mkconfig niri .config/niri/config.kdl,".config/niri/*" 56mkconfig sway .config/sway/common_config, .config/sway/( hostname -s) ,\ 57 .config/waybar/config.jsonc,".config/waybar/*.css" 58mkconfig wez .config/wezterm/config.lua,".config/wezterm/*.lua" 59mkconfig git .config/git/extraConfig, .config/git/ignore,".config/git/*" 60mkconfig nix ../mixins/home/common.nix,"../**/*.nix" 61 62set -x MANPAGER less -M -j5 +Gg 63set -x PATH( printf '%s\n' $PATH | awk '!seen[$0]++' ) 64set -x EDITOR hx 65set -x VISUAL hx 66set -g fish_cursor_default line 67 68function p 69string split' ' $PATH | sd $HOME '~' 70end 71abbr -a vi hx 72abbr -a cat bat 73function l 74eza --icons --time-style relative --color-scale all --group-directories-first$argv 75end 76abbr -a unset set -e 77abbr -a ls l -l 78abbr -a la l -la 79abbr -a tree l -T --git-ignore 80abbr -a o xdg-open 81abbr -a c clear 82abbr -a please sudo 83abbr -a fuck killall 84function note 85cd ~/documents/notes&& hx todo/TODO.md **/*.md&& cd - 86end 87 88abbr -a send"wormhole-rs tx" 89abbr -a receive"wormhole-rs rx" 90abbr -a rs rsync -a --info=progress2 91abbr -a drag ripdrag 92abbr -a getsong"ytmdl --dont-transcode --download-archive ~/.cache/ytmdl/archive" 93abbr -a wine32"WINEPREFIX= $HOME /.wine32 wine" 94abbr -a du diskus 95abbr -a ncdu gdu 96abbr -a dirdiff git diff --no-index 97function ststatus 98syncthing cli show system| 99jq -r'.myID, .uptime, .startTime, .guiAddressUsed, .cpuPercent' | 100read -L id uptime start url cpu 101echo -e"ID: $id \nStarted $start $ ( numbat -e "print(" $uptime "s to human)" ) " 102echo -e"CPU: $cpu %\nGUI: $ ( echo $url | sd 127.0.0.1 localhost ) " 103end 104 105abbr -a sc systemctl 106abbr -a music rmpc 107abbr -a m music 108function shuffle 109mpc clear&& mpc ls| mpc add&& mpc shuffle&& mpc play 110end 111 112abbr -a bp factorio-bp-helper 113function fontcheck 114set -ql font$argv [ 2 ] ;or set font sans 115FC_DEBUG=4 pango-view -q -t$argv [ 1 ] --font=$font &| 116rg -or'$1' 'family: "([^"]+)"' | tail -1 117end 118 119function nixfind 120nix-locate --color=always -rt r -t x -t s$argv | sd '/nix/store/[^/\x1b]+' '' | sort 121end 122 123abbr -a nixsize nix-tree 124abbr -a nixclean nh clean all 125 126function _switch 127if test ( uname ) = Darwin 128set cmd darwin 129else if command -qv nixos-rebuild> /dev/null 130set cmd os 131else 132set cmd home 133end 134nh $cmd switch$CONF_DIR $argv 135end 136abbr -a switch _switch 137abbr -a update switch -u 138 139function repeat 140for iin ( seq $argv [ 1 ]) 141eval " $argv [ 2 .. ] " 142end 143end 144 145function fzf-dir-widget 146 FZF_CTRL_T_COMMAND=$FZF_ALT_C_COMMAND fzf-file-widget 147end 148 149# alt for W's, ctrl for w's 150bind alt-backspace backward-kill-token 151bind ctrl-backspace backward-kill-word 152bind alt-left prevd-or-backward-token 153bind ctrl-left backward-word 154bind alt-right nextd-or-forward-token 155bind ctrl-right forward-word 156 157bind ctrl-f fzf-file-widget 158bind ctrl-g fzf-dir-widget 159bind ctrl-e edit_command_buffer 160bind ctrl-k up-or-search 161bind ctrl-j down-or-search