mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
ref(nix): cleaned up fish nix config
This commit is contained in:
parent
d450699d16
commit
c21c8e2807
8 changed files with 149 additions and 169 deletions
|
|
@ -1,92 +0,0 @@
|
|||
# OS-based aliases
|
||||
switch (uname)
|
||||
case "Linux"
|
||||
alias chmod='chmod --preserve-root'
|
||||
alias chown='chown --preserve-root'
|
||||
abbr ss 'sudo systemctl'
|
||||
case "Darwin"
|
||||
alias hide_desktop='defaults write com.apple.finder CreateDesktop false; killall Finder'
|
||||
alias show_desktop='defaults write com.apple.finder CreateDesktop true; killall Finder'
|
||||
alias reset_launchpad='defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock'
|
||||
alias add_spacer_tile='defaults write com.apple.dock persistent-apps -array-add \'{tile-type="small-spacer-tile";}\'; killall Dock'
|
||||
end
|
||||
|
||||
## idiot protection
|
||||
alias rm='rm -i'
|
||||
|
||||
## Docker
|
||||
abbr dc 'docker compose'
|
||||
|
||||
## Git
|
||||
abbr gaa 'git add (git rev-parse --show-toplevel)'
|
||||
abbr ga. 'git add .'
|
||||
abbr gc 'git commit'
|
||||
abbr gcl 'git clone'
|
||||
abbr gl 'git log'
|
||||
abbr gs 'git switch'
|
||||
abbr gp 'git pull'
|
||||
abbr gP 'git push'
|
||||
abbr gpr 'git fetch && git rebase'
|
||||
abbr gpm 'git fetch && git merge'
|
||||
abbr clone 'clone_to_repos'
|
||||
|
||||
## FS
|
||||
alias tree='tree -Cph'
|
||||
|
||||
## Editor
|
||||
abbr ts tmux_sessionizer
|
||||
abbr ta tmux_attach
|
||||
abbr v nvim
|
||||
abbr x hx
|
||||
abbr se sudoedit
|
||||
|
||||
## brew
|
||||
abbr bbb 'brew update && brew upgrade && brew autoremove && brew cleanup'
|
||||
|
||||
## Misc
|
||||
alias restow='cd ~/.dotfiles/ && stow -D . && stow -S . && prevd'
|
||||
abbr yt 'yt-dlp -f "b" --no-playlist \
|
||||
-o "~/Downloads/%(title)s.%(ext)s" \
|
||||
'
|
||||
abbr ytpl 'yt-dlp -f "b" \
|
||||
-o "~/Downloads/%(playlist_index)s - %(title)s.%(ext)s" \
|
||||
'
|
||||
abbr myip 'curl ipinfo.io'
|
||||
abbr news newsboat
|
||||
abbr :q exit
|
||||
abbr :Q exit
|
||||
|
||||
# ssh
|
||||
abbr pi 'ssh pi4'
|
||||
abbr mainframe 'ssh mainframe'
|
||||
|
||||
## Preferences
|
||||
abbr vp 'cd ~/.dotfiles/.config/nvim/after/plugin && $EDITOR ../../init.lua && prevd'
|
||||
abbr fp 'cd ~/.dotfiles/.config/fish/functions && $EDITOR ../config.fish && prevd'
|
||||
abbr tp '$EDITOR ~/.dotfiles/.tmux.conf'
|
||||
abbr sp '$EDITOR ~/.dotfiles/.config/starship.toml'
|
||||
|
||||
# Home-Manager / NixOS
|
||||
abbr np 'cd ~/.dotfiles/nix && $EDITOR flake.nix && prevd'
|
||||
abbr ns 'sudo nixos-rebuild switch --flake ~/.dotfiles/nix#nixie'
|
||||
abbr hp 'cd ~/.dotfiles/.config/home-manager && $EDITOR flake.nix && prevd'
|
||||
abbr hs 'home-manager switch --flake ~/.dotfiles/nix#macOS'
|
||||
|
||||
# XMonad
|
||||
abbr xp 'cd ~/.dotfiles/.config/xmonad && $EDITOR xmonad.hs && prevd'
|
||||
|
||||
abbr nsh 'nix-shell -p'
|
||||
alias nix-shell 'nix-shell --run fish'
|
||||
|
||||
## Python
|
||||
abbr vnew 'python3 -m venv venv && source venv/bin/activate.fish'
|
||||
abbr von 'source venv/bin/activate.fish'
|
||||
abbr voff 'deactivate'
|
||||
|
||||
# Search
|
||||
abbr s 'search.py'
|
||||
abbr syt 'search.py -m yt'
|
||||
abbr sgh 'search.py -m gh'
|
||||
abbr sfg 'search.py -m fg'
|
||||
abbr swk 'search.py -m wk'
|
||||
abbr sge 'search.py -m ge'
|
||||
15
nix/home/common/fish/conf.d/interactiveShellInit.fish
Normal file
15
nix/home/common/fish/conf.d/interactiveShellInit.fish
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# vi cursor style
|
||||
fish_vi_key_bindings
|
||||
set fish_cursor_default block
|
||||
set fish_cursor_insert line
|
||||
set fish_cursor_replace_one underscore
|
||||
set fish_cursor_visual block
|
||||
|
||||
set -x EDITOR nvim # Default editor
|
||||
set -x GPG_TTY (tty) # Set TTY for GPG
|
||||
set -x fzf_preview_file_cmd 'delta' # fzf preview theme (bat)
|
||||
set -x LS_COLORS (vivid -m 24-bit generate one-light) # fd theme
|
||||
set fzf_fd_opts --hidden --exclude=.git # fzf-fish search hidden files
|
||||
set -x DELTA_FEATURES +side-by-side # delta
|
||||
set -x GOPATH ~/.go # gopath
|
||||
set -x ANSIBLE_CONFIG ~/.ansible.cfg # Ansible path
|
||||
6
nix/home/common/fish/conf.d/shellInit.fish
Normal file
6
nix/home/common/fish/conf.d/shellInit.fish
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# repo paths
|
||||
set REPOS_PATH ~/repos
|
||||
set UNIV_REPOS_PATH ~/univ-repos
|
||||
set PLAYGROUND_PATH ~/playground
|
||||
set CODEWARS_PATH ~/codewars
|
||||
set ZEROJUDGE_PATH ~/zerojudge
|
||||
Loading…
Add table
Add a link
Reference in a new issue