Skip to content

Commit 0583891

Browse files
committed
Update scripts
1 parent 8a05a99 commit 0583891

File tree

4 files changed

+70
-30
lines changed

4 files changed

+70
-30
lines changed

01-update-mirrors

-5
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ sudo chmod -R 777 /media/hdd
1111
echo "mount hard drive to /media/hdd using gnome-disk-utility"
1212
echo "disk - select hard disk - settings - edit mount options - mount point - media/hdd"
1313

14-
echo "System Settings - Appearance - Breeze Dark"
15-
echo "System Seetings - Startup and Shutdown - Desktop Session - Uncheck Confirm logout and offer shutdown options and Start with an empty session"
16-
17-
echo "Backup system using timeshift"
18-
1914
yay -S google-chrome --noconfirm
2015
yay -Sy base-devel --noconfirm
2116

05-conda

+6
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ conda create -n qgis python=3.12 -y
1010
conda activate qgis && mamba install -c conda-forge libgdal-arrow-parquet pyarrow gdal qgis pygis jupyterlab -y
1111
conda activate qgis && mamba update -c conda-forge sqlite -y
1212
cp ~/miniconda3/envs/qgis/lib/libsqlite3.so.3.49.1 ~/miniconda3/envs/qgis/lib/libsqlite3.so
13+
14+
15+
conda create -n geo python=3.12 -y
16+
conda activate geo && mamba install -c conda-forge libgdal-arrow-parquet pyarrow gdal geoai jupyterlab -y
17+
conda activate geo && mamba update -c conda-forge sqlite -y
18+
cp ~/miniconda3/envs/geo/lib/libsqlite3.so.3.49.1 ~/miniconda3/envs/geo/lib/libsqlite3.so

10-bashrc

+53-25
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,55 @@
11
#!/bin/bash
22

3-
echo "alias up='yay -Syyua'" >> ~/.bashrc
4-
echo "alias ug='yay -Sua --noconfirm'" >> ~/.bashrc
5-
echo "alias gpu='watch -n 1 nvidia-smi'" >> ~/.bashrc
6-
echo "alias py38='conda activate py38'" >> ~/.bashrc
7-
echo "alias py27='conda activate py27'" >> ~/.bashrc
8-
echo "alias pygeo='conda activate pygeo'" >> ~/.bashrc
9-
echo "alias pytest='conda activate pytest'" >> ~/.bashrc
10-
echo "alias arcgis='conda activate arcgis'" >> ~/.bashrc
11-
echo "alias nb='jupyter notebook'" >> ~/.bashrc
12-
echo "alias pdf2doc='soffice --infilter=\"writer_pdf_import\" --convert-to doc'" >> ~/.bashrc
13-
echo "alias touchall='find -type f -exec touch {} +'" >> ~/.bashrc
14-
echo "alias jk='jekyll serve --watch --port 8000'" >> ~/.bashrc
15-
echo "alias hi='function hdi(){ howdoi \$* -c -n 5; }; hdi'" >> ~/.bashrc
16-
echo "alias eb='gedit ~/.bashrc'" >> ~/.bashrc
17-
echo "alias sb='source ~/.bashrc'" >> ~/.bashrc
18-
echo "alias la='du -ah . | grep -v \"/$\" | sort -h'" >> ~/.bashrc
19-
echo "alias ld='du -a -h --max-depth=1 | sort -h'" >> ~/.bashrc
20-
echo "alias lf='ls -1Rhs | sed -e \"s/^ *//\" | grep \"^[0-9]\" | sort -h'" >> ~/.bashrc
21-
# alias listfiles='ls -1Rhs | sed -e "s/^ *//" | grep "^[0-9]" | sort -h'
22-
# echo "alias unzipall='for i in *.zip; do unzip \"$i\" -d \"${i%%.zip}\"; done'" >> ~/.bashrc
23-
# alias unzipall='for i in *.zip; do unzip "$i" -d "${i%%.zip}"; done'
24-
# echo "alias touchall='find -exec touch {} +'" >> ~/.bashrc
25-
#echo "Ignore packages upgrade ..."
26-
#sudo echo "IgnorePkg = cudnn cuda linux414-nvidia linux415-nvidia" >> /etc/pacman.conf
27-
source ~/.bashrc
3+
cat << 'EOF' >> ~/.zshrc
4+
5+
# Custom aliases and functions
6+
alias listfiles='ls -1Rhs | sed -e "s/^ //" | grep "^[0-9]" | sort -h'
7+
alias listdirs='du -a -h --max-depth=1 | sort -h'
8+
alias listall='du -ah . | grep -v "/$" | sort -h'
9+
alias cs='codespell --skip=".csv,.geojson,.json,.js,.html,cff,./.git/" --ignore-words-list="aci,acount,acounts,fallow,hart,hist,nd,ned,ois,wqs,watermask"'
10+
alias s7='ffmpeg -i input.mp4 -filter:v "setpts=0.7PTS" output.mp4'
11+
alias s5='ffmpeg -i input.mp4 -filter:v "setpts=0.5PTS" output.mp4'
12+
alias mkv='ffmpeg -i $input -c copy ${input/mkv/mp4}'
13+
alias mp4='ffmpeg -i ${input/mkv/mp4} ${input/mkv/gif}'
14+
alias duration='ffprobe -i $input -show_format | grep duration | cut -d"=" -f 2'
15+
alias spup='ffmpeg -i ${input/mkv/mp4} -filter:v "setpts=$SPEEDPTS" ${input/.mkv/_speed.mp4}'
16+
alias trim='ffmpeg -y -i ${input/.mkv/_speed.mp4} -to "$(echo "$(duration)*$SPEED" | bc)" -c copy ${input/.mkv/.mp4}'
17+
alias speedup='mkv;spup;trim'
18+
alias m2p='ffmpeg -i $input -vf fps=$FPS,scale=$SCALE:-1:flags=lanczos,palettegen ${input/mp4/png}'
19+
alias m2g='ffmpeg -i $input -i ${input/mp4/png} -filter_complex "fps=$FPS,scale=$SCALE:-1:flags=lanczos[x];[x][1:v]paletteuse" ${input/mp4/gif}'
20+
alias gif='ffmpeg -i $input -vf fps=$FPS,scale=$SCALE:-1:flags=lanczos,palettegen ${input/mp4/png} && ffmpeg -i $input -i ${input/mp4/png} -filter_complex "fps=$FPS,scale=$SCALE:-1:flags=lanczos[x];[x][1:v]paletteuse" ${input/mp4/gif}'
21+
alias filelist="for f in *.mp4 ; do echo file '\$f'; done >> fileList.txt;"
22+
alias merge='ffmpeg -f concat -safe 0 -i fileList.txt -c copy mergedVideo.mp4'
23+
alias gif2mp4='ffmpeg -i $input -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" ${input/gif/mp4}'
24+
alias bl='black -S .'
25+
alias bookpdf='jupyter-book build . --builder pdfhtml'
26+
alias geeup='bash /media/hdd/Dropbox/git/bash/geebook.sh'
27+
alias delbr='git branch | grep -v "master|main" | xargs git branch -D '
28+
alias geo='conda activate geo'
29+
alias book='conda activate book'
30+
alias bb='rm -rf _build/ && jupyter-book build .'
31+
alias lab='jupyter lab'
32+
alias nb='jupyter notebook'
33+
alias mdnb='jupytext --to ipynb *.md && rmid'
34+
alias md2nb='cd chapters && jupytext --to ipynb *.md && rmid'
35+
alias touchall='find . -exec touch {} +'
36+
alias pc='bl && pre-commit run --all-files'
37+
alias d1m='find -type -size +1M -delete'
38+
alias r1080='xrandr --output DP-0 --mode 1920x1080'
39+
alias r2560='xrandr --output DP-0 --mode 2560x1440'
40+
alias ht='qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "panels()[0].hiding = \"autohide\""'
41+
alias st='qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "panels()[0].hiding = \"none\""'
42+
alias rc='r1080 && ht'
43+
alias nm='r2560 && st'
44+
alias startvpn='sudo tailscale set --exit-node=xxx.xxx.xx.xx'
45+
alias stopvpn='sudo tailscale up --exit-node='
46+
alias scale='kquitapp5 plasmashell && kstart5 plasmashell'
47+
alias qgis='conda activate qgis && qgis'
48+
49+
rmid() {
50+
sed -i -e '/"id": /d' *.ipynb && sed -i -e '/"attachments": /d' *.ipynb
51+
}
52+
53+
EOF
54+
55+
source ~/.zshrc

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,14 @@ Author: Qiusheng Wu (<https://wetlands.io>)
4343
- Math: mathpix-snipping-tool
4444
- Geospatial: google-earth qgis saga-gis
4545
- Download manager: motrix
46+
47+
## Installation
48+
49+
Choose erase disk and the BTRFS file system.
50+
51+
## Settings
52+
53+
- Choose Breath Dark theme: System Settings >Quick Settings >Breath Dark
54+
- Disable log out confirmation: System Settings >System >Session >Desktop Sesssion >Uncheck "Ask for confirmation" >On login, Start with an empty session
55+
- Enable AUR: Pamac >Preferences >Third Party >Enable AUR support > Check for updates
56+
- Change terminal shortcut: Konslole >Settings >Configure Keyboard Shortcuts > Search Paster >Custom Shortcut >Ctrl+V

0 commit comments

Comments
 (0)