blob: 364daaca5a1af40f3c5a2d5c302e0f070290e9be (
plain)
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
|
#!/usr/bin/env sh
set -e
echo "Hi noa. Let's get things set up~"
echo "This script assumes a debian install."
echo
echo "=== INSTALL NECESSARY SOFTWARE ==="
echo "Please run:"
echo "> sudo apt install rclone keepassxc firefox webext-ublock-origin-firefox webext-keepassxc-browser"
read -p "Press RET to move to the next step."
echo "=== SET UP FLATPAK ==="
# TODO---do i need this?
read -p "Press RET to move to the next step."
echo "=== SET UP CHINESE INPUT ==="
echo "Please run:"
echo "> sudo apt install fcitx5 fcitx-config-qt fcitx5-frontend-qt5 fcitx5-frontend-qt6 fcitx5-theme-breeze kde-config-fcitx5"
# TODO
read -p "Press RET to move to the next step."
echo
read -p "First we need the keepassxc database. Download it to ~/Documents/Passwords.kdbx and press RET when you're ready."
while [ ! -f ~/Documents/Passwords.kdbx ]; do
read -p "It looks like ~/Documents/Passwords.kdbx doesn't exist. Try again and press RET when you're ready."
done
echo
echo "=== SET UP KEEPASS BROWSER INTEGRATION ==="
echo "If you didn't install it with the system package manager, go to https://addons.mozilla.org/zh-CN/firefox/addon/keepassxc-browser/ and install it there."
echo "Make sure to go to keepassxc > preferences > browser integration and enable integration for firefox."
echo "If it still doesn't work, it's likely an issue with using a flatpak or apparmor."
read -p "When you are ready, press RET."
echo
echo "=== SYNC FILES FROM FASTMAIL ==="
read -rp "Fastmail username: " fastmailusername
echo "Now to https://app.fastmail.com/settings/security/integrations/devicekeys/new?u=0b814011 and create a new app password with access to webdav."
read -rsp "Fastmail app password: " fastmailpassword
echo # Read with -s appears not to properly newline
rclone config create fastmail webdav \
url "https://webdav.fastmail.com/" \
vendor "fastmail" \
user "$fastmailusername" \
pass "$fastmailpassword" \
--obscure
echo
echo "Now we will sync the standard directories from the fastmail remote."
# Checkout https://rclone.org/commands/rclone_bisync/
rclone copy fastmail:noa.gaiwan.org/files/Documents ~/Documents -P
rclone copy fastmail:noa.gaiwan.org/files/Music ~/Music -P
rclone copy fastmail:noa.gaiwan.org/files/Videos ~/Videos -P
rclone copy fastmail:noa.gaiwan.org/files/Pictures ~/Pictures -P
rclone copy fastmail:noa.gaiwan.org/files/Scripts ~/Scripts -P
echo
echo "=== INSTALL ANKI ==="
echo "The packaged version of anki is very old, and i'd rather not use the flatpak."
echo "First please run:"
echo "> sudo apt install libxcb-xinerama0 libxcb-cursor0 libnss3"
echo "Then go to https://github.com/ankitects/anki/releases/ and download the latest release."
echo "> tar xaf Downloads/anki-2XXX-linux-qt6.tar.zst"
echo "> cd anki-2XXX-linux-qt6"
echo "> sudo ./install.sh"
echo
echo "=== DOWNLOAD WIKIPEDIA MIRROR ==="
echo "Go to https://ftp.halifax.rwth-aachen.de/aarddict/zhwiki/ and download the latest slob file."
echo
echo "Thanks~"
|