zoukankan      html  css  js  c++  java
  • 我的Manjaro i3自用软件记录

    Manjaro i3 自用软件归档

    字体安装

    参考:https://www.jianshu.com/p/26fa3a803439

    1. 基本字体

      sudo pacman -S ttf-roboto noto-fonts ttf-dejavu
      
      
    2. 文泉驿

      sudo pacman -S wqy-bitmapfont wqy-microhei wqy-microhei-lite wqy-zenhei
      
      
    3. 思源字体

      sudo pacman -S noto-fonts-cjk adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts</pre>
      
      
    4. Awesome 字体

      sudo pacman -S ttf-font-awesome
      
      
    5. Powerline Font

      sudo pacman -S powerline-fonts
      
      
    6. 撸代码用 Source Code Pro 和 Fira Code

      sudo pacman -S ttf-fira-code ttf-fira-mono ttf-rira-sans
      sudo pacman -S adobe-source-code-pro-fonts
      
      

    配置字体:

    编辑文件~/.config/fontconfig/conts.conf(如果没有就创建)

    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    
    <fontconfig>
        <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
            <its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
        </its:rules>
        <description>Manjaro Font Config</description>
        <!-- Font directory list -->
        <dir>/usr/share/fonts</dir>
        <dir>/usr/local/share/fonts</dir>
        <dir prefix="xdg">fonts</dir>
        <dir>~/.fonts</dir> <!-- this line will be removed in the future -->
    
        <!-- 自动微调 微调 抗锯齿 内嵌点阵字体 -->
        <match target="font">
            <edit name="autohint"> <bool>false</bool> </edit>
            <edit name="hinting"> <bool>true</bool> </edit>
            <edit name="antialias"> <bool>true</bool> </edit>
            <edit name="embeddedbitmap" mode="assign"> <bool>false</bool> </edit>
        </match>
    
        <!-- 英文默认字体使用 Roboto 和 Noto Serif ,终端使用 DejaVu Sans Mono. -->
        <match>
            <test qual="any" name="family">
                <string>serif</string>
            </test>
            <edit name="family" mode="prepend" binding="strong">
                <string>Noto Serif</string>
            </edit>
        </match>
        <match target="pattern">
            <test qual="any" name="family">
                <string>sans-serif</string>
            </test>
            <edit name="family" mode="prepend" binding="strong">
                <string>Roboto</string>
            </edit>
        </match>
        <match target="pattern">
            <test qual="any" name="family">
                <string>monospace</string>
            </test>
            <edit name="family" mode="prepend" binding="strong">
                <string>DejaVu Sans Mono</string>
            </edit>
        </match>
    
        <!-- 中文默认字体使用思源宋体,不使用 Noto Sans CJK SC 是因为这个字体会在特定情况下显示片假字. -->
        <match>
            <test name="lang" compare="contains">
                <string>zh</string>
            </test>
            <test name="family">
                <string>serif</string>
            </test>
            <edit name="family" mode="prepend">
                <string>Source Han Serif CN</string>
            </edit>
        </match>
        <match>
            <test name="lang" compare="contains">
                <string>zh</string>
            </test>
            <test name="family">
                <string>sans-serif</string>
            </test>
            <edit name="family" mode="prepend">
                <string>Source Han Sans CN</string>
            </edit>
        </match>
        <match>
            <test name="lang" compare="contains">
                <string>zh</string>
            </test>
            <test name="family">
                <string>monospace</string>
            </test>
            <edit name="family" mode="prepend">
                <string>Noto Sans Mono CJK SC</string>
            </edit>
        </match>
    
        <!-- 把Linux没有的中文字体映射到已有字体,这样当这些字体未安装时会有替代字体 -->
        <match target="pattern">
            <test qual="any" name="family">
                <string>SimHei</string>
            </test>
            <edit name="family" mode="assign" binding="same">
                <string>Source Han Sans CN</string>
            </edit>
        </match>
        <match target="pattern">
            <test qual="any" name="family">
                <string>SimSun</string>
            </test>
            <edit name="family" mode="assign" binding="same">
                <string>Source Han Serif CN</string>
            </edit>
        </match>
        <match target="pattern">
            <test qual="any" name="family">
                <string>SimSun-18030</string>
            </test>
            <edit name="family" mode="assign" binding="same">
                <string>Source Han Serif CN</string>
            </edit>
        </match>
        <!--
        <match target="pattern">
            <test qual="any" name="family">
                <string>Microsoft YaHei</string>
            </test>
            <edit name="family" mode="assign" binding="same">
                <string>Source Han Sans CN</string>
            </edit>
        </match>
        --> 
        <!-- Load local system customization file -->
        <include ignore_missing="yes">conf.d</include>
        <!-- Font cache directory list -->
        <cachedir>/var/cache/fontconfig</cachedir>
        <cachedir prefix="xdg">fontconfig</cachedir>
        <!-- will be removed in the future -->
        <cachedir>~/.fontconfig</cachedir>
        <config>
            <!-- Rescan in every 30s when FcFontSetList is called -->
            <rescan> <int>30</int> </rescan>
        </config>
    </fontconfig>
    

    中文输入法 - 搜狗拼音

    sudo pacman -S fcitx-sogoupinyin
    sudo pacman -S fcitx-im 
    sudo pacman -S fcitx-configtool
    sudo pacman -S fcitx-gtk2 fcitx-gtk3
    sudo pacman -S fcitx-qt5
    

    编辑~/.profile文件指定输入法

    vim ~/.profile
    
    
    # 在文件后面加上
    export LC_CTYPE=zh_CN.UTF-8
    export GTK_IM_MODULE=fcitx
    export QT_IM_MODULE=fcitx
    export XMODIFIERS="@im=fcitx"
    

    重启,打开fcitxfcitx-configtool应该就能看到搜狗输入法配置上了,如果提示“搜狗输入法不能正常工作,请删除~/.config/SougouPY后重启”之类的,就按照提示删除~/.config/SougouPY然后重启。

    如果重启还不能解决,就安装fcitx-qt4,我是安装这个直接解决的。

    sudo pacman -S fcitx-qt4
    

    安装AUR插件 —— yay

    sudo pacman -S yay
    

    yay安装软件和pacman安装软件时不要使用sudo,其他和pacman使用方法差不多。

    pacmanyay的区别就像一个是正式发行收录的,一个是开发中或者共享软件。

    更多AUR信息:https://aur.archlinux.org/

    Zsh & oh-my-zsh

    查看已安装的shell列表:

    cat /etc/shells
    
    

    manjaro默认安装了zsh只需要切换shell就行了。但是这里先别急着换,先安装oh-my-zsh插件;

    sh -c“$(curl -fsSL https:``//raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)”
    
    

    安装oh-my-zsh后应该会自动生成一份zsh的默认配置:~/.zshrc

    更换shell:

    chsh -s /bin/zsh
    
    

    安装插件,推荐:自动跳转、自动建议、语法高亮插件

    sudo pacman -S autojump
    
    git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
    
    git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
    
    

    配置插件和主题:

    vim ~/.zshrc
    
    
    #主题
    ZSH_THEME="agnoster"
    
    #插件
    plugins=(git zsh-autosuggestions web-search autojump zsh-syntax-highlighting)
    

    本地更多主题和插件:~/.oh-my-zsh/plugins

    关于oh-my-zsh更多:https://github.com/robbyrussell/oh-my-zsh/wiki

    Typora —— Markdown 编辑软件

    sudo pacman -S typora
    

    Sublime-Text3

    安装Sublime-Text3的方法很多,例如:

    # 方法1
    yay -S sublime-text-3-imfix
    
    # 方法2
    yay -S sublime-text
    
    # 方法3
    curl -O https://download.sublimetext.com/sublimehq-pub.gpg && sudo pacman-key --add sublimehq-pub.gpg && sudo pacman-key --lsign-key 8A8F901A && rm sublimehq-pub.gpg
    
    echo -e "
    [sublime-text]
    Server = https://download.sublimetext.com/arch/stable/x86_64" | sudo tee -a /etc/pacman.conf
    
    sudo pacman -Syu sublime-text
    
    

    因为我网络很不好,我是通过方法3安装的。当然方法有很多。

    Rofi —— 代替dmenu

    sudo pacman -S rofi
    
    

    安装完成后运行rofi-theme-selector选择各种主题

    See More: Rofi配置

    其他配置相关链接

    1. ~/.zshrc

      # Path to your oh-my-zsh installation.
      # 如果觉得东西都放HOME想移动.oh-my-zsh目录,记得改一下这里
      export ZSH=$HOME/.oh-my-zsh 
      
      # zsh 主题
      ZSH_THEME="agnoster"
      
      # 插件
      plugins=(git zsh-autosuggestions web-search autojump zsh-syntax-highlighting colored-man-pages colorize)
      
      source $ZSH/oh-my-zsh.sh
      
      # 用alias自定义指令
      alias showtime="tty-clock -c -C 5 -r -s -f '%A, %B %d'"
      
      
      # 定制prompt, 下面配置为空,就是什么也不显示
      prompt_context(){
        #if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
            # prompt_segment red default " %(!.%{%F{yellow}%}.)CN "
        #fi
      }
      
      
    2. ~/.config/i3status/config 我的i3status配置说明

      See More: i3status配置

    3. ~/.i3/conifg我的i3wm配置说明

      See More: i3config配置文件说明

    4. 我的compton配置说明

      See More: compton配置说明.md

    附录:我的相关配置归档:

    Gitee:https://gitee.com/siyingcheng/my_manjaro_i3wm_config

  • 相关阅读:
    LeetCode120 Triangle
    LeetCode119 Pascal's Triangle II
    LeetCode118 Pascal's Triangle
    LeetCode115 Distinct Subsequences
    LeetCode114 Flatten Binary Tree to Linked List
    LeetCode113 Path Sum II
    LeetCode112 Path Sum
    LeetCode111 Minimum Depth of Binary Tree
    Windows下搭建PHP开发环境-WEB服务器
    如何发布可用于azure的镜像文件
  • 原文地址:https://www.cnblogs.com/siyingcheng/p/11706127.html
Copyright © 2011-2022 走看看