-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_aliases
78 lines (68 loc) · 3.21 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
# Display
alias hdmi-only='xrandr --output eDP1 --off --output HDMI1 --auto'
alias monitor-on='xrandr --output eDP1 --auto'
alias monitor-on-right='xrandr --output eDP1 --auto --right-of HDMI1'
alias projector-clone='xrandr --output VGA1 --auto --same-as eDP1'
alias projector-right-of='xrandr --output VGA1 --auto --right-of eDP1'
alias projector-off='xrandr --output VGA1 --off'
# Printers
alias print-home='lpr -P HP_LaserJet_1018'
alias print-copy5c='lpr -P copy5c-duplex'
## System commands
alias pc-shutdown='systemctl poweroff'
alias pc-suspend='systemctl suspend'
alias pc-hibernate='systemctl hibernate'
alias pc-reboot='systemctl reboot'
#alias pc-logout='gnome-session-quit'
#alias pc-lock='gnome-screensaver-command --lock'
alias pc-restart-dpm="systemctl restart display-manager"
# Remote access
alias ssh-aisa='ssh [email protected]'
alias ssh-al='ssh [email protected]'
alias ssh-umime='ssh [email protected]'
alias mount-umime='\
sshfs -o default_permissions [email protected]:/ ~/mnt/umime \
&& cd ~/mnt/umime/home/umimetoorg && pwd && ls'
#alias mount-umime-home='\
# sshfs -o default_permissions [email protected]:/home/umimetoorg/ ~/mnt/umime \
# && cd ~/mnt/umime && pwd && ls'
alias cd-tomeff='cd ~/mnt/umime/ftp/umimefakta.cz/webroot/admxtrs/tomeff/'
# Color support of ls, grep, fgrep and egrep
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# Navigation
alias la='ls -A' # list all
alias l='ls -AlhF' # list all with details
alias ..='cd ..'
alias ...='cd ../..'
# Download
alias youtube-dl='python3 /usr/local/bin/youtube-dl'
alias download-mp3='youtube-dl --extract-audio --audio-format mp3'
alias download-mp4="youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4'"
alias download-playlist='youtube-dl --yes-playlist --extract-audio --audio-format mp3 -o "%(playlist_index)s - %(title)s.%(ext)s"'
# To download only a part of a playlist, continue partially downloaded, ignore
# errors, no overwrites:
# youtube-dl -ciw --playlist-items 37-75 --extract-audio --audio-format mp3 -o "%(playlist_index)s - %(title)s.%(ext)s" .....
# Alert after a command is finnished. Usage: sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Python
alias python="python3"
alias py="python3"
alias ve="source ./.venv/bin/activate"
alias lab='env PYTHONPATH=`pwd` jupyter lab'
alias st-run='env PYTHONPATH=`pwd` streamlit run'
alias colab="jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --port=8888 --NotebookApp.port_retries=0"
# Other
alias set-fi-time='sudo ntpdate -u time.fi.muni.cz'
alias glog='git log --graph --oneline --decorate --all'
alias audio-split='mp3splt -f -t 7.0 -o @f_@n -d parts'
alias pdf='latexmk -pv' # see .latexmkrc
alias pvc='latexmk -pvc' # see .latexmkrc
alias edit-keyboard-layout="sudoedit /usr/share/X11/xkb/symbols/te"
alias backup-keyboard-layout="sudo cp /usr/share/X11/xkb/symbols/te ~/repos/config/xkb/"
alias clean="for i in {1..55}; do echo; done"
alias chrome="google-chrome"
# Copy to primary clipboard.
alias copy='xclip -selection clipboard'