-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_aliases
executable file
·127 lines (94 loc) · 3.13 KB
/
.bash_aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
set EDITOR "nvim"
NIX_SHELL="zsh"
# reload .bash_aliases
alias rl="source ~/.bash_aliases"
# launch zellij
alias zj="zellij"
# NIXOS
## change package configs
alias cs="$EDITOR /home/tom/system"
alias ch="$EDITOR /home/tom/system/home"
## rebuild system and home manager
alias rs="sudo nixos-rebuild switch --flake /home/tom/system#netherite --show-trace --max-jobs 100"
# alias rh="home-manager switch --flake /home/tom/system#tom@tomkoid"
## create new devshell flake
alias newflake="nix flake new -t github:nix-community/nix-direnv"
## use nix-shell for trying new things
alias try=nix_try_pkg
## run any command
alias t=nix_run_pkg
## quick nix develop
alias d="nix develop --command $NIX_SHELL"
# spawn a new shell in arch container
alias arch="distrobox enter archlinux -- $NIX_SHELL"
# run command using distrobox with arch image
alias archrun="distrobox enter archlinux --"
# gitea (tea)
alias newrepo="tea repo create"
# rust replacements
alias ls="eza -l"
#alias cat="bat"
alias ps="procs"
# lazygit
alias lg="lazygit"
# tomkoid-repo
alias tomkoid-repo-build="export currentdir=$PWD && cd ~/Documents/tomkoid-repo && sh build.sh && cd $currentdir"
# clear
alias cl="clear && pfetch"
# use doas instead sudo
#alias sudo="doas"
alias up="yes | sudo pacman -Syyu"
alias upd="sudo pacman -Sy"
alias upg="sudo pacman -Su"
alias inst="sudo pacman -S"
alias remov="sudo pacman -Rddns"
alias do_some="brightnessctl set 1%"
alias undo_some="brightnessctl set 100%"
alias pacshow="sh ~/Stuff/scripts/pacshow.sh"
# vpns
alias vpn-connect="nmcli connection up \"MAIN VPN\""
alias vpn-disconnect="nmcli connection down \"MAIN VPN\""
# rust
alias rust_debug="mold -run cargo run --"
alias rust_release="mold -run cargo build --release"
# git
alias ginit="git init"
alias gstatus="git status"
alias gadd="git add"
alias gcommit="git commit -am"
alias gbranch="git branch"
alias gradd="git remote add"
alias gpush="git push -u"
alias grm="git rm --cached"
alias gnoassumeunchanged="git update-index --no-assume-unchanged"
alias gassumeunchanged="git update-index --assume-unchanged"
alias gskipworktree="git update-index --skip-worktree"
# helix
# alias hx="helix"
# mpv
alias play-yt='mpv --no-config --script-opts=ytdl_hook-ytdl_path=yt-dlp --msg-level=all=no,ytdl_hook=trace --ytdl-format=22'
# yt-dlp
alias download-mp3='yt-dlp --ignore-errors --output "%(title)s.%(ext)s" --extract-audio --audio-format mp3'
# dotfiles repo
alias config='/usr/bin/git --git-dir=$HOME/Dotfiles/ --work-tree=$HOME'
# gpg management
alias export-key="gpg --export --armor --output exported.key"
# misc
alias bat="bat --theme='Catppuccin-mocha'"
alias paru="paru --bottomup"
# alias ssh="kitty +kitten ssh"
# display image in kitty
alias img="kitty +kitten icat"
# set wallpaper in wlroots
alias wl="~/Scripts/wallpaper.sh"
# video2gif() {
# ffmpeg -y -i "${1}" -vf fps=${3:-10},scale=${2:-320}:-1:flags=lanczos,palettegen "${1}.png"
# ffmpeg -i "${1}" -i "${1}.png" -filter_complex "fps=${3:-10},scale=${2:-320}:-1:flags=lanczos[x];[x][1:v]paletteuse" "${1}".gif
# rm "${1}.png"
# }
nix_try_pkg() {
nix shell nixpkgs#$1 --command $NIX_SHELL
}
nix_run_pkg() {
nix run nixpkgs#$1
}