-
Notifications
You must be signed in to change notification settings - Fork 0
/
rc
62 lines (53 loc) · 2.51 KB
/
rc
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
#!/bin/sh
. ~/repositories/dotfiles/git/git-prompt.sh
alias cp='cp -rf'
alias feh='feh -dF'
alias ftp='ftp -p'
alias grep='grep --color=auto'
alias ln='ln -srnf'
alias logout='swaymsg exit'
alias ls='ls -A --color=auto --group-directories-first'
alias lscheckout='pacman -Qkk | grep \)$ |& sort'
alias lsdisowned='comm -23 <(find /{etc,usr,var} \( -path /etc/\*cert\* -o -path /usr/share/mime -o -path /var/\*/\*man \) -prune -o -type d -printf %p/\\n -o -print 2>/dev/null | sort) <(pacman -Qlq | sort -u)'
alias lsorphaned='comm -23 <(pacman -Qdq) <(pacman -Qeq | xargs -l pactree -lu | sed -E "s/[<=>].+//" | sort -u)'
alias lspackages='pacman -Qeq'
alias mkdir='mkdir -p'
alias output-analog='pacmd set-default-sink alsa_output.pci-0000_00_1f.3.analog-stereo'
alias output-hdmi='pacmd set-default-sink alsa_output.hw_0_7'
alias pacman='pacman --color=auto'
alias rm='rm -rf'
alias sl=systemctl
alias sudo='sudo '
alias wallpaper='feh --bg-tile --no-fehbg'
fetchallgit() {
find ~/VRChat-avatars/{.*,*}/.git -maxdepth 0 -execdir git fetch --all \;
find ~/repositories/*/.git -maxdepth 0 -execdir git fetch --all \;
}
gcallgit() {
find ~/VRChat-avatars/{.*,*}/.git -maxdepth 0 -execdir git reflog expire --expire=now --all \;
find ~/VRChat-avatars/{.*,*}/.git -maxdepth 0 -execdir git gc --prune=now --aggressive \;
find ~/repositories/*/.git -maxdepth 0 -execdir git reflog expire --expire=now --all \;
find ~/repositories/*/.git -maxdepth 0 -execdir git gc --prune=now --aggressive \;
}
lsgit() {
sh <<-\EOL
. ~/repositories/dotfiles/git/git-prompt.sh
export -f __git_eread __git_ps1 __git_ps1_show_upstream __git_sequencer_status
find ~/VRChat-avatars/{.*,*}/.git -maxdepth 0 -execdir sh -c '__git_ps1 "%s \t"; basename "$PWD"' \;
find ~/repositories/*/.git -maxdepth 0 -execdir sh -c '__git_ps1 "%s \t"; basename "$PWD"' \;
EOL
}
resetallgit() {
find ~/repositories/*/.git -maxdepth 0 -execdir \
sh -c 'git reset --hard origin/"$(git symbolic-ref --short HEAD)"' \;
}
updatevrctemplate() {
find ~/VRChat-avatars/*/.git -maxdepth 0 -execdir \
sh -c 'git rebase template-SDK3/master; git rebase --skip; git filter-date; rm -r Packages; cp -r ../.template-SDK3/Packages .' \;
}
lsimages() {
find Assets \( -iname *.bmp -o -iname *.gif -o -iname *.jpeg -o -iname *.jpg -o -iname *.png -o -iname *.tga \) -exec identify {} +
}
grepmetadata_images() {
find Assets \( -iname *.bmp.meta -o -iname *.gif.meta -o -iname *.jpeg.meta -o -iname *.jpg.meta -o -iname *.png.meta -o -iname *.tga.meta \) -exec grep "$@" {} +
}