-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.ubuntu
More file actions
52 lines (43 loc) · 1.27 KB
/
.ubuntu
File metadata and controls
52 lines (43 loc) · 1.27 KB
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
# Ubuntu specific dotfile for zsh
if [[ ${DEBUG_ZSH} ]]; then
echo "[$(date +%H:%M:%S.%3N)] Loading ubuntu dotfile configuration..."
fi
# Workaround for missing distro icons
OS_ICON='\uE271'
#
# Ubuntu specific aliases
#
#
# Ubuntu functions
#
function apt-history(){
case "$1" in
install)
grep 'install ' /var/log/dpkg.log
;;
upgrade|remove)
grep $1 /var/log/dpkg.log
;;
rollback)
grep upgrade /var/log/dpkg.log | \
grep "$2" -A10000000 | \
grep "$3" -B10000000 | \
awk '{print $4"="$5}'
;;
*)
cat /var/log/dpkg.log
;;
esac
}
function apt-install-history(){
comm -23 <(find /var/log/apt/ -name "history.*" -exec zsh -c "zgrep 'apt-get install' {}" \; | sed 's/.* //' | sort) <(find /var/log/apt/ -name "history.*" -exec zsh -c "zgrep 'apt-get remove' {}" \; | sed 's/.* //' | sort)
}
function 4ktofhd(){
ffmpeg -i $1 -vf scale=1920:1080 -c:v libx264 -crf 20 -preset slow fhd-$1
}
function cleanSnaps(){
snap list --all | awk '/deaktiviert/{print $1, $3}' |
while read snapname revision; do
sudo snap remove "$snapname" --revision="$revision"
done
}