Skip to content
Snippets Groups Projects
workspace-bootstrap.md 6.72 KiB
Newer Older
Recolic Keghart's avatar
Recolic Keghart committed
# Reproduce recolic's workspace
Recolic Keghart's avatar
Recolic Keghart committed
> If you're in fucking China, change all `recolic.net` to breakwall domain (such as recolic.cc). 

Recolic Keghart's avatar
Recolic Keghart committed
## GUI Workspace
Recolic K's avatar
Recolic K committed
> After installing Arch Linux, run as root

Recolic Keghart's avatar
Recolic Keghart committed
```
pacman -Sy --noconfirm fish dhcpcd vim sudo openssh
Recolic Keghart's avatar
Recolic Keghart committed
useradd --create-home --shell /usr/bin/fish recolic
Recolic Keghart's avatar
Recolic Keghart committed
echo 'recolic ALL=(ALL) NOPASSWD: ALL' | sudo EDITOR='tee -a' visudo
echo 'kernel.sysrq=1' >> /etc/sysctl.d/99-sysctl.conf 
pacman -Sy --noconfirm gnome networkmanager
Recolic Keghart's avatar
Recolic Keghart committed
systemctl enable gdm NetworkManager
Recolic's avatar
Recolic committed

echo '[recolic-aur]
SigLevel = Optional TrustAll
Server = https://drive.recolic.cc/mirrors/recolic-aur' >> /etc/pacman.conf
sed -i 's/^[# ]*ParallelDownloads =[ 0-9A-Za-z]*$/ParallelDownloads = 5/g' /etc/pacman.conf
sed -i 's/^[# ]*SystemMaxUse=[ 0-9A-Za-z]*$/SystemMaxUse=150M/g' /etc/systemd/journald.conf
sed -i 's/^[# ]*SystemMaxFileSize=[ 0-9A-Za-z]*$/SystemMaxFileSize=30M/g' /etc/systemd/journald.conf
Recolic's avatar
Recolic committed

Recolic's avatar
Recolic committed
echo "options cfg80211 ieee80211_regdom=AU" >> /etc/modprobe.d/cfg80211.conf
echo "options cfg80211 internal_regdb=y" >> /etc/modprobe.d/cfg80211.conf
echo "options cfg80211 crda_support=y" >> /etc/modprobe.d/cfg80211.conf
Recolic's avatar
Recolic committed
pacman -S --noconfirm wireless-regdb power-profiles-daemon
systemctl enable power-profiles-daemon
Recolic's avatar
Recolic committed

Recolic's avatar
Recolic committed
### Require Input
passwd recolic
Recolic's avatar
Recolic committed
> Now, reboot and enter gnome terminal, run everything below **as recolic**, in **fish**
sudo pacman -Sy --noconfirm base-devel thunderbird nextcloud-client firefox telegram-desktop docker shadowsocks-libev v2ray proxychains xclip adobe-source-han-sans-cn-fonts      pcsclite ccid    git inetutils wget ttf-fira-code htop tmux dos2unix nfs-utils python-pip gnome-tweaks fcitx5-im man-db man-pages  kolourpaint breeze
# sudo apt install pcscd scdaemon gnupg2 pcsc-tools -y
Recolic's avatar
Recolic committed
sudo pacman -Sy recolic-aur/gnome-terminal-transparency recolic-aur/oreo-cursors-git recolic-aur/pikaur
Recolic Keghart's avatar
Recolic Keghart committed

Recolic K's avatar
Recolic K committed
sudo systemctl enable bluetooth --now

Recolic's avatar
Recolic committed
echo "GTK_IM_MODULE=fcitx" >> /etc/environment
echo "QT_IM_MODULE=fcitx" >> /etc/environment
echo "XMODIFIERS=@im=fcitx" >> /etc/environment
Recolic Keghart's avatar
Recolic Keghart committed
sudo systemctl enable pcscd.service --now
gpg --keyserver keyserver.ubuntu.com --recv-keys E3933636
set -gx SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket) # already in fish.config
Recolic Keghart's avatar
Recolic Keghart committed
echo pinentry-timeout 0 > ~/.gnupg/gpg-agent.conf
Recolic K's avatar
Recolic K committed
echo "pinentry-program /usr/bin/pinentry-gnome3" >> ~/.gnupg/gpg-agent.conf
Recolic Keghart's avatar
Recolic Keghart committed
echo enable-ssh-support >> ~/.gnupg/gpg-agent.conf
Recolic Keghart's avatar
Recolic Keghart committed
echo 93AC57E30E88111EC71D9215A1B436AFE705C71C > ~/.gnupg/sshcontrol
gpg-connect-agent reloadagent /bye
Recolic K's avatar
Recolic K committed
## For non-GUI setup: 
Recolic Keghart's avatar
Recolic Keghart committed
#set -g GPG_TTY (tty)
#gpg-connect-agent updatestartuptty /bye
Recolic's avatar
Recolic committed
- nextcloud

Login Nextcloud, and make sure `~/.config/autostart/com.nextcloud.desktopclient.nextcloud.desktop` exists, and wait for initial sync.   
Then run: 

```
fish ~/Nextcloud/workspace/setup-management.fish
```

Recolic Keghart's avatar
Recolic Keghart committed
- gnome configure

Recolic Keghart's avatar
Recolic Keghart committed
```
# gnome extension will be managed by nextcloud sync
# TODO: add recolic-aur to pacman.conf and install gnome-terminal-transparency
Recolic Keghart's avatar
Recolic Keghart committed

gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type nothing
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type nothing
gsettings set org.gnome.settings-daemon.plugins.power idle-dim false
gsettings set org.gnome.desktop.screensaver idle-activation-enabled false
gsettings set org.gnome.desktop.privacy remember-recent-files false
Recolic K's avatar
Recolic K committed
gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true
Recolic Keghart's avatar
Recolic Keghart committed
gsettings set org.gnome.desktop.interface enable-hot-corners false
Recolic Keghart's avatar
Recolic Keghart committed
gsettings set org.gnome.desktop.media-handling automount false
gsettings set org.gnome.desktop.media-handling automount-open false
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-left "['<Shift><Alt>Left']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-right "['<Shift><Alt>Right']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-up "['<Shift><Alt>Up']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-down "['<Shift><Alt>Down']"
gsettings set org.gnome.desktop.wm.keybindings move-to-monitor-left "['<Super><Shift>Left']"
gsettings set org.gnome.desktop.wm.keybindings move-to-monitor-right "['<Super><Shift>Right']"
gsettings set org.gnome.desktop.wm.keybindings move-to-monitor-up "['<Super><Shift>Up']"
gsettings set org.gnome.desktop.wm.keybindings move-to-monitor-down "['<Super><Shift>Down']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Primary>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Primary><Shift>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Super>Tab', '<Alt>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Shift><Super>Tab', '<Shift><Alt>Tab']"
gsettings set org.gnome.settings-daemon.plugins.media-keys window-screenshot-clip "['disabled']"
gsettings set org.gnome.settings-daemon.plugins.media-keys area-screenshot-clip "['<Primary>Print']"
gsettings set org.gnome.settings-daemon.plugins.media-keys window-screenshot "['disabled']"
gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot-clip "['<Primary><Shift>Print']"
gsettings set org.gnome.settings-daemon.plugins.media-keys area-screenshot "['Print']"
gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot "['<Shift>Print']"
Recolic Keghart's avatar
Recolic Keghart committed
```
Recolic Keghart's avatar
Recolic Keghart committed

Recolic's avatar
Recolic committed
**After Nextcloud sync complete**, enable your plugins and config your plugins.
Recolic K's avatar
Recolic K committed

- OPT: thunderbird
Recolic Keghart's avatar
Recolic Keghart committed

Config editor: set `mail.openpgp.allow_external_gnupg` to true.   
AccountSettings -> Composition -> WhenQuoting: set `start my reply above the quote`, and place my signature `below my reply`. 
Recolic Keghart's avatar
Recolic Keghart committed

- OPT: libreoffice

Select `Tools>Options>LibreOffice Writer>Formatting Aids` from the menu. For Image/Anchor you can select: `As Character` .
Recolic Keghart's avatar
Recolic Keghart committed

Recolic's avatar
Recolic committed
Select `Tools -> Autocorrect -> Autocorrect Options` from the menu, then `Localized options`, uncheck everything. 

Select `Tools -> Autocorrect -> Autocorrect Options` from the menu, then `Options`, uncheck everything. 
Recolic's avatar
Recolic committed
`Tools -> Options -> LibreOffice Calc -> General -> Measurement unit`, change to `Centimeter`

Recolic's avatar
Recolic committed
- OPT: firefox

Recolic's avatar
Recolic committed
Visit `about:config` and set/add the following entries: 

```
browser.tabs.tabmanager.enabled = false
services.sync.prefs.sync.browser.uiCustomization.state = true
```

> Ref: <https://support.mozilla.org/en-US/questions/1292568>
Recolic's avatar
wf  
Recolic committed
- OPT: CLion

~~Must use Clion 2022.1, do not upgrade because of severe performance downgrade.
Add `-fsized-deallocation` to clangd flags in `Settings | Languages & Frameworks | C/C++ | Clangd`.~~
Recolic's avatar
wf  
Recolic committed


Disable `reopen projects on startup` <https://stackoverflow.com/questions/5362036/how-to-prevent-open-last-projects-when-intellij-idea-starts>
Recolic's avatar
wf  
Recolic committed

- OPT: microsoft devbox setup
Refer to <https://git.recolic.net/root/ms-scripts/-/blob/master/notes/workspace-bootstrap-ms.md>
Recolic's avatar
Recolic committed
- OPT: wayland fix

Set /etc/environment

```
QT_QPA_PLATFORM=wayland
```