Manjaro安装后的配置

换源

sudo pacman-mirrors -i -c China -m rank
sudo nano /etc/pacman.conf
末尾添加

[archlinuxcn]
SigLevel = Optional TrustedOnly
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch

sudo pacman -Syy
sudo pacman -S archlinuxcn-keyring
sudo pacman -S yay
yay --aururl "https://aur.tuna.tsinghua.edu.cn" --save

Nvidia Prime与intel核显切换

https://blog.csdn.net/sherpahu/article/details/103193009
不切换关机会卡死

rEFInd

sudo pacman -S refind-efi
refind-install

常用软件

搜狗输入法(真正能用的方法)

按照网上排得最靠前的方法都会出现很多问题。
https://www.manjaro.top/?id=12
这个方法可行。

sudo pacman -S fcitx-sogoupinyin fcitx-im fcitx-configtool yay
yay -S aur/fcitx-qt4
sudo nano /etc/environment

写入

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"

作者: 紫色妖姬半岛
链接: https://liyepan.github.io//post/manjaro-an-zhuang-sou-gou-shu-ru-fa

Caps Lock切换中英文输入

设置-›硬件-›输入设备中,键盘布局添加英文,高级中设置“大写锁定也是Ctrl键”,同时添加Capslock为将fcitx的切换键。Manjaro安装后的配置_第1张图片Manjaro安装后的配置_第2张图片

ZSH

安装ZSH:sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
安装zsh-autosuggestions:git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
修改~/.zshrc

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH="/home/gz/.oh-my-zsh"
export PATH="/home/gz/anaconda3/bin:$PATH"
export PATH="/home/gz/analog_flavor_eval/bin:$PATH"

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
# ZSH_THEME="robbyrussell"
ZSH_THEME="ys"

# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"

# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"

# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13

# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS=true

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
	git
	zsh-autosuggestions
)

source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias vizsh="micro ~/.zshrc"
alias rezsh="source ~/.zshrc"
alias nv="nvidia-smi"
alias wcnv="watch -n 10 nvidia-smi"
alias newyuan="sudo pacman -Syy && sudo pacman -S archlinuxcn-keyring"
alias mt="sudo mount -t ntfs /dev/sdb2 /mnt/file"
alias proxy="export http_proxy=http://127.0.0.1:1080 && https_proxy=http://127.0.0.1:1080"
alias unproxy="unset http_proxy && unset https_proxy"
alias dcstart="systemctl start docker"
alias dcstop="systemctl stop docker"

micro编辑器

默认使用类似Windows的快捷键,ctrl+c复制ctrl+v粘贴很爽
yay -S micro

深度学习环境配置

Anaconda

在Anaconda官网下载Anaconda
目前最新的Anaconda支持Tensorflow2.0
sh Anaconda3-xxx.sh
换源
修改~/.condarc(没有就新建一个)

channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

清华
上交
有的时候镜像在同步就可能用不了了,可以换一下。
还可以使用魔法直接从官网下载:

cuda,cudnn配置

方法一:
从conda安装,安装比较快占用位置也小,可以使用tensorflow、pytorch、catboost,lightgbm、xgboost没法用。

conda install cudatoolkit=10.0
conda install cudnn=7.6

方法二:
使用pacman安装sudo pacman+-S+cuda+cudnn
降级sudo pacman -U http://mirrors.sohu.com/archlinux/community/os/x86_64/cuda-10.0.130-2-x86_64.pkg.tar.xz
截至2019/11,tensorflow只能使用cuda10.0

lightgbm gpu

用方式二安装cuda,cudnn

git clone --recursive https://github.com/Microsoft/LightGBM
cd LightGBM                                                                                               
mkdir build ; cd build
cmake -DUSE_GPU=1 -DOpenCL_LIBRARY=/opt/cuda/lib64/libOpenCL.so -DOpenCL_INCLUDE_DIR=/opt/cuda/include/ ..
make -j$(nproc) 
cd ../python-package
python setup.py install --precompile

使用pacman安装的cuda位置在/opt/cuda/中,依据具体情况修改

VScode C++配置

微软的产品总是让人用得火冒三丈。。。
安装Vscode:sudo pacman -S visual-studio-code-bin
按照这位的教程或者https://blog.csdn.net/Rem_boot/article/details/89391798在工作文件夹里新建.vscode, 新建几个json文件。
安装Code Runner,按照这个教程配置Code Runner使之与终端结合。
Ctrl+Alt+N就可以运行了。

nodejs npm

sudo pacman -S nodejs npm
换源npm config set registry https://registry.npm.taobao.org
下载cnpm:sudo npm install -g cnpm --registry=https://registry.npm.taobao.org

安装fanyi

sudo cnpm i -g fanyi
sudo pacman -S festival festival-english

安装tldr

sudo cnpm i -g tldr

微信

https://github.com/countstarlight/deepin-wine-wechat-arch/releases
下载2.7的最新版,2.8及以上有bug
https://github.com/countstarlight/deepin-wine-wechat-arch/releases/tag/v2.7.1.88-1
Github下载慢可以到https://g.widora.cn/下载
安装
再参考https://github.com/countstarlight/deepin-wine-wechat-arch#%E6%B6%88%E9%99%A4%E9%98%B4%E5%BD%B1%E8%BE%B9%E6%A1%86
消除KDE下的阴影边框
WINEPREFIX=~/.deepinwine/Deepin-WeChat /usr/bin/wine winecfg设置版本为XP,就可以打开公众号文章了

其他

  1. 网易云音乐:
    • 下载APPImage版本:https://github.com/ZetaoYang/netease-cloud-music-appimage/releases,直接pacman安装的有各种bug,懒得折腾了,而且APPImage的体积比直接安装还小。
    • https://github.com/springzfx/archlinux/tree/master/netease-cloud-music
  2. QQ:添加和删除软件里下载qq-linux,2019/10/24,QQ linux版又复活了,文件传输不能用,可以给小号发消息实现传文件的功能。
  3. 微信:用Deepin-wine效果还还行,wine4.18不能使用中文输入法,这是wine的bug,wine4.20修复了,我更新了wine之后就打不开了(通过rm -rf ~/.deepinwine/Deepin-WeChat解决),AUR上说可以回退到4.16或者升级4.20。这个版本打开公众号的文章后会闪退,按照Deepin论坛的设置默认浏览器打开即可。
    网页版可以凑合着用,容易被封,在微信团队里找客服反馈可以解封。
    字体过小修改DPI:WINEPREFIX=~/.deepinwine/Deepin-WeChat /usr/bin/wine winecfg改为96
  4. Chorme:sudo pacman -S google-chrome,Chrome昨天更新恢复了“关闭其他标签”的功能。
  5. Typora:添加和删除软件里下载
  6. flameshot:截图,yay -S flameshot,系统设置添加自定义快捷键,命令:flameshot gui
  7. WPS:添加和删除软件里下载,还可以在微软的网页版office里查看和编辑office,都不太好用,编辑Word、PPT还是去Win10吧。字体缺失的解决https://zhuanlan.zhihu.com/p/31848590
  8. KDE Connect听说很不错,但是我在校园网下手机电脑连接同一Wifi分配的ip不同没法用,我明明记得在我大一上学期还可以用FTP进行手机、电脑的文件传输,可是后来就用不了了,可能校园网的局域网策略改变了吧。
  9. debtap:很多软件只有Debian系的包,使用debtap可以在Manjaro上安装。yay -S debtap,sudo debtap -u,sudo debtap xxxx.deb
  10. CSV图形界面阅读器:在Tad官网下载deb包,之后使用debtap安装sudo debtap tad_0.9.0_amd64.deb功能很强大。Manjaro安装后的配置_第3张图片
  11. firefox配置:
    • 缩放:地址栏about:configlayout.css.devPixelsPerPx
    • 双击关闭标签页:about:configbrowser.tabs.closeTabByDblclick
    • 地址栏点击全选:about:configbrowser.urlbar.clickSelectsAll
    • 多线程下载管理器:about:confignetwork.http.max-persistent-connections-per-server,network.http.max-persistent-connections-per-proxy
  12. yakuake配置:
    取消让窗口管理器显示动画,防止出现鼠标焦点不在yakuake中时yakuake缩回的闪动。 Manjaro安装后的配置_第4张图片
  13. matplotlib乱码:https://blog.csdn.net/qq_43497702/article/details/99892701

其余的Manjaro KDE默认的工具都比较好用,比如说Alt+F2搜索文件快速打开应用程序(但不能使用拼音索引很烦),Okular看pdf很舒服。
很多时候很无奈,腾讯、阿里这种大公司都很排斥Linux,向钉钉提出添加Linux版的需求被无情拒绝,微信还总是封掉Linux下的网页版,QQ在十年只推出了两个版本。
华为Mate14推出了默认Deepin的版本销量还有一些,但愿以后的Linux生态越来越好。

目录路径修改

只能手动改,修改默认语言好像没有用。
https://blog.csdn.net/jeffrey_li/article/details/54947502
Manjaro安装后的配置_第5张图片

你可能感兴趣的:(瞎折腾)