初始化配置
先配置镜像源,Manjaro 早已帮我们安排好这一切:
# 选取当下在国内最快的源
$ sudo pacman-mirrors -i -c China -m rank
添加国内软件源
修改 /etc/pacman.conf
,添加如下语句(此处使用清华 TUNA 源):
[archlinuxcn]
SigLevel= TrustedOnly
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
此处建议先
sudo pacman -S vim
😛
安装密钥:
$ sudo pacman -Syu archlinuxcn-keyring
可能遇到 Unable to lock database 错误,解决方案如下:
$ sudo rm /var/lib/pacman/db.lck
更新系统
$ sudo pacman -Syyu
让 Manjaro 使用 LocalTime,解决与 Windows 共存主板时间冲突问题:
$ sudo timedatectl set-local-rtc true
必备工具
$ sudo pacman -S yay git net-tools tree vim
yay
是 AUR 管理工具。
双显卡切换
$ sudo pacman -S virtualgl lib32-virtualgl lib32-primus primus
$ sudo systemctl enable bumblebeed
$ sudo gpasswd -a $USER bumblebee
Emoji Support
$ sudo pacman -S noto-fonts-emoji
科学上网
这是最最最基础的需求!
Shadowsocks
$ sudo pacman -S shadowsocks-qt5
可以设为开机启动。
ShadowsocksR
$ yay -S electron-ssr
Proxychains
$ sudo pacman -S proxychains-ng
日常软件
搜狗输入法
$ sudo pacman -S fcitx fcitx-qt4 fcitx-im fcitx-configtool fcitx-sogoupinyin
设置 fcitx
为默认输入法,编辑 ~/.xprofile
:
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
安装必备字体:
$ sudo pacman -S wqy-bitmapfont wqy-microhei \
wqy-zenhei adobe-source-code-pro-fonts \
adobe-source-han-sans-cn-fonts ttf-monaco
我最爱的皮肤:黑色科技
RIME
RIME 中州韵输入法是 Linux 下广受好评的中文输入法。鉴于搜狗输入法的 bug 不断(QT4),笔者更推荐 RIME 来作为中文输入法。
$ sudo pacman -S fcitx-rime fcitx-cloudpinyin fcitx-googlepinyin
Telegram
$ sudo pacman -S telegram-desktop
Dropbox
$ yay -S dropbox
坚果云
$ sudo pacman -S nutstore
Typora
$ sudo pacman -S typora
oh-my-zsh
$ sudo pacman -S zsh
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
安装插件:
$ git clone https://github.com/zsh-users/zsh-completions ~/.oh-my-zsh/custom/plugins/zsh-completions
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting
$ git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/plugins/zsh-autosuggestions
$ vim ~/.zshrc
# edit plugins & save
plugins=(git zsh-syntax-highlighting docker docker-compose zsh-autosuggestions zsh-completions)
$ autoload -U compinit && compinit
Google Chrome
$ sudo pacman -S google-chrome
网易云音乐
$ sudo pacman -S netease-cloud-music
MailSpring
$ yay -S mailspring
$ sudo pacman -S libsecret
TIM
$ yay -S deepin-wine-tim
设置 DPI(高分屏):
$ env WINEPREFIX="$HOME/.deepinwine/Deepin-TIM" winecfg
在 Graphics
中将 DPI 调整为 120
。
$ yay -S deepin-wine-wechat
设置 DPI(高分屏):
$ env WINEPREFIX="$HOME/.deepinwine/Deepin-WeChat" winecfg
在 Graphics
中将 DPI 调整为 120
。
Thunder Speed (迅雷)
$ yay -S deepin-wine-thunderspeed
uGet & Aria2
$ sudo pacman -S uget aria2
将
uGet -> Edit -> Settings -> Plug-in
中的设置设为 aria2 。
WPS
$ sudo pacman -S ttf-wps-fonts
$ sudo pacman -S wps-office
Redshift (Night light)
$ yay -S redshift
Screenshot
$ yay -S deepin-screenshot
开发环境
Vim
我是 Vim 党。
$ git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime
$ sh ~/.vim_runtime/install_awesome_vimrc.sh
Git
在之前我们已经安装过了 Git,这里主要是一些 Git 的基本设置:
$ git config --global user.name "Your_username"
$ git config --global user.email "your@email.com"
$ git config --global core.editor vim # 使用 Vim 来编辑 Git 提交信息
不要忘记添加生成并添加 GPG key 喔~
Docker
$ sudo pacman -S docker
$ sudo pacman -S docker-compose
Java
$ sudo pacman -S java-runtime-common java-environment-common
$ yay jdk8 # Select extra/jdk8-openjdk
使用 archlinux-java
命令来管理 Java 环境。
列举 Java 环境:
$ archlinux-java status
选择 Java 环境:
$ sudo archlinux-java set java-8-openjdk
Go
$ sudo pacman -S go go-tools
可选用
gcc-go
,但若需要使用 JetBrains 的 IDE 则必须使用go
,否则 IDE 无法在/usr/lib/go
下找到 Go SDK。
配置环境变量 GOPATH
,个人偏好在用户目录下的 go/
文件夹放置 Go 相关文件。
$ vim ~/.zshrc # OR ~/.bashrc OR ~/.profile
export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin
由于某些特殊的原因,国内无法很好地拉取 Go 相关的软件包。建议使用 goproxy/goproxy.cn ,只需在拉取前输入:
$ export GOPROXY=https://goproxy.cn
MariaDB
$ sudo pacman -S mariadb
# install MariaDB
$ sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
# start MariaDB
$ sudo systemctl start mariadb
# config MariaDB using interactive wizard
$ sudo mysql_secure_installtion
更改默认编码为 utf8mb4
:
$ sudo vim /etc/my.cnf
# append following lines
[client]
default-character-set = utf8mb4
[mysqld]
collation_server = utf8mb4_unicode_ci
character_set_server = utf8mb4
[mysql]
default-character-set = utf8mb4
重启 MariaDB
以生效。
Redis
$ sudo pacman -S redis
$ sudo systemctl start redis
Visual Studio Code
宇宙第一编辑器!
可以使用 Snapd 来安装,见这里。不过笔者直接用 pacman
安装了,如下:
$ sudo pacman -S visual-studio-code-bin
Sublime Text
$ yay -S sublime-text-dev
JetBrains Toolbox
JetBrains 家的 IDE 一应俱全,应有尽有!
$ yay -S jetbrains-toolbox
# $ sudo pacman -S intellij-idea-ultimate-edition
Postman
后端开发必备。
$ yay -S postman
KDE 插件
- Resource Monitor
-
Netspeed Widget
-
Redshift-control
-
Active Window Control
-
Global Menu
-
Latte Dock
$ sudo pacman -S latte-dock
KDE 设置
个人喜欢的桌面设置。
Displays
屏幕 120% 放大: System Settings > Displays > Scale Display > 1.2
。
Global Menu
因为有了 Latte Dock,不再需要任务栏了,取而代之的是全局菜单。需要添加 Global Menu
的 Widget。
$ sudo pacman -S appmenu-gtk-module
$ sudo pacman -S libdbusmenu-glib # For electron apps menu
详情见此贴 。
Screen Locking
System Settings > Desktop Behavior > Screen Locking > Keyboard Shortcut
设为 Meta + L
。
Effects
KDE 桌面动画效果。
System Settings > Workspace Behavior > Desktop Effects > Configure Desktop Effects
,设置你喜欢的桌面效果。
Window Effects
窗口切换效果:System Settings > Window Management > Task Switcher > Main > Visualization
,建议使用 Large Icons
。
Open Files
KDE 默认是单击打开文件,但是用习惯 Windows 及 GNOME 的我不是很习惯,遂改之:
System Settings > Desktop Behavior > Workspace > Click Behavior > Double-Click to open files and folders(single click to select)
.
Shortcuts
Global Shortcuts
System Settings > Shortcuts > Global Shortcuts > KWin
Action | Global |
---|---|
Switch One Desktop Down | Meta+Ctrl+Down |
Switch One Desktop to the Left | Meta+Ctrl+Left |
Switch One Desktop to the Right | Meta+Ctrl+Right |
Switch One Desktop Up | Meta+Ctrl+Up |
Window One Desktop Down | Meta+Ctrl+Shift+Down |
Window One Desktop to the Left | Meta+Ctrl+Shift+Left |
Window One Desktop to the Right | Meta+Ctrl+Shift+Right |
Window One Desktop Up | Meta+Ctrl+Shift+Up |
Maximize Window | Meta+Up |
Minimize Windows | Meta+Down |
System Settings > Shortcuts > Global Shortcuts > Plasma
Action | Global |
---|---|
Open Klipper at Mouse Position | Alt+D |
Custom Shortcuts
System Settings > Shortcuts > Custom Shortcuts > Edit
Deepin Screenshot 截屏快捷键:
New > Global Shortcut > Command/URL
新建全局自定义快捷键Trigger
:Ctrl
+Alt
+A
Action
:deepin-turbo-invoker --type=dtkwidget deepin-screenshot --icon
Desktop Folder Settings
Right click on Desktop > Configure Desktop... > Mouse Actions
删除 Vertical-Scroll
条目(取消滚动切换工作区)。
主题
Adapta
$ yay -S adapta-kde kvantum-theme-adapta adapta-gtk-theme
5 条评论
mima · 2020年8月27日 上午10:57
配置oh my zsh时要访问以下网址,这应该需要在manjaro里科学上网吧,请问有没有相关的经验贴呢。我用qv2ray折腾了一天,死活没连上,不知道哪里出了差错,如果有经验帖就太好啦
https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh
TripleZ · 2020年8月27日 下午11:58
是需要访问的。可以使用 proxychains 来代理 curl,或者在 Shell (bash/zsh) 的 session 中配置 https_proxy 变量实现代理流量。具体可以参见一些代理的文章(via Google)哦,此文主要讲 Manjaro 的一些软件生态,故没有将代理详细展开描述。
nimama · 2020年5月16日 上午2:48
sudo pacman -S wps-offitce
The true is "sudo pacman -S wps-office"
TripleZ · 2020年5月16日 下午3:01
Sorry about this typo, I have already fixed it and thank you~
搭建Majaro桌面办公环境 – gogetter · 2020年5月3日 下午8:20
[…] https://blog.triplez.cn/manjaro-quick-start/#Dropbox […]