• manjaro i3wm 简单配置(后续待更新……)


    manjaro i3wm 配置美化


    入了i3wm的坑,浪费时间


    更改国内源

    sudo pacman-mirrors -i -c China -m rank

    修改/etc/pacman.conf

    在文件末尾加上163镜像源

    [archlinuxcn]
    SigLevel = Optional TrustedOnly
    Server = http://mirrors.163.com/archlinux-cn/$arch
    

    之后执行安装archlinuxcn-keyring

    输入法

    sudo pacman -S fcitx fcitx-im fcitx-configtool fcitx-googlepinyin

    vim ~/.xprofile

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

    终端运行fcitx就可以设置输入法了

    zsh 配置

    sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
    

    sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
    

    ZSH_THEME="steeef"

    git clone git://github.com/zsh-users/zsh-autosuggestions $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

    plugins=(
    	git
    	zsh-autosuggestions
    	zsh-syntax-highlighting
    	z
    )
    

    解决蜂鸣声

    sudo vim /etc/inputrc
    

    set bell-style none前面的注释符号去掉

    简单的自定义 i3wm 的配置文件

    原有的配置文件首先进行备份~/.i3/config,然后在该配置文件末尾加上下面的语句

    注意自定义的语句有些和默认配置冲突,要把默认配置修改一下

    #########################################################
    #               my configuration                        #
    #########################################################
    
    # terminator
    bindsym $mod+Return exec terminator
    
    # fcitx 
    exec_always --no-startup-id fcitx
    
    # browser
    bindsym $mod+F2 exec google-chrome-stable
    
    # xrandr 配置显示器
    exec xrandr --output HDMI1 --auto --output LVDS1 --off
    

    manjaro i3wm 自带了一个截图软件scrot,可以不用下载其他的截图软件了,只不过它的配置我依然没有成功……


    关于feh配置背景不生效的问题

    有一个现象:使用feh配置了桌面背景,但是每次开机启动还是显示默认的桌面背景。
    在查看.i3/config后可知,manjaro-i3 默认使用nitrogen来管理桌面背景的,为了省事,我就直接把feh给删除了,使用系统自带的工具。nitrogen的配置文件可以在.config/nitrogen目录中。

    [xin_-1]                                                                                   
    # file=/usr/share/backgrounds/i3_default_background.jpg                                    
    file=/home/chaos/Pictures/wallpaper/1.jpg                                                  
    mode=5                                                                                     
    bgcolor=#002A36
    

    修改bg-saved.cfg就可以了。


    关于设置双屏幕显示的一些说明

    首先要使用xrandr命令查看显示器参数,根据实际情况修改

    • 打开外接显示器,双屏幕显示相同的内容--克隆,(auto为最高分辨率)
    xrandr --output HDMI-1 --same-as DVI-D-1 --auto
    
    • 若要指定外接显示器的分辨率可以使用下面的命令(1280*1024):
    xrandr --output HDMI-1 --same-as DVI-D-1 --mode 1280x1024
    
    • 打开外接显示器,设置为右侧扩展
    xrandr --output HDMI-1 --right-of DVI-D-1 --auto
    
    • 关闭显示器
    xrandr --output DVI-D-1 --off
    
    • 打开HDMI-1接口显示器,关闭DVI-D-1接口显示器
    xrandr --output HDMI-1 --auto --output DVI-D-1 --off
    
    • 设置主屏幕
    xrandr --output HDMI-0 --primary
    
    • arandr

    下载 arandr 这个软件可以图形界面设置多屏


    rofi的配置

    rofi的配置参考了(https://www.cnblogs.com/siyingcheng/p/11706215.html)
    rofi和dmenu都是程序启动器,我在配置文件里保留了默认的dmenu,只是另外赋予了一个快捷键

    1. 首先下载并生成自定义配置文件
    sudo pacman -S rofi
    mkdir -p ~/.config/rofi
    rofi -dump-config > ~/.config/rofi/config.rasi
    
    1. 编辑配置文件(这是我的配置)
    configuration {
            /*本行是指,rofi默认启动的mode ???*/
    	modi: "window,run,ssh,drun,combi";
            /*展示图标*/
    	show-icons: true;
            /*展示的图标主题,这里要配置一下,可以从/usr/share/icons/目录下copy图标主题到~/.icons或者~/.local/share/icons/目录下*/
    	icon-theme: "Papirus-Dark-Maia";
    	font: "Hack Nerd Font Mono Regular 13";
    }
    
    1. 编辑.i3/config文件
    # start program launcher
    bindsym $mod+d exec --no-startup-id rofi -show drun -theme Adapta-Nokto
    bindsym $mod+Shift+d exec --no-startup-id dmenu_recency
    
    1. rofi默认是带有几个主题的,主题目录在/usr/share/rofi/themes/,也可以直接使用命令rofi-theme-selector来选择,最简单的就是直接在.i3/config配置文件中直接指定,就像我的这个一样

    ranger的配置

    ranger是一个终端文件管理器,可以在终端中很方便的管理文件和目录,我只想在终端里显示图片和高亮一些文件
    复杂的用法可以参考以下博客:
    (http://www.huangpan.net/posts/ji-ke/2019-08-21-ranger.html)
    (https://www.52gvim.com/post/ranger-tool-usage)

    1. 创建配置文件,会在home目录下的.config/ranger里生成几个配置文件,类似下面的样子
    ranger --copy-config=all
    
    creating: /Users/test/.config/ranger/rifle.conf    # 指定不同类型的文件的默认打开程序
    creating: /Users/test/.config/ranger/commands.py    # 能通过 : 执行的命令
    creating: /Users/test/.config/ranger/commands_full.py    # 能通过 : 执行的命令,但这个更全
    creating: /Users/test/.config/ranger/rc.conf    # 选项设置和快捷键
    creating: /Users/test/.config/ranger/scope.sh    # 当 use_preview_script = true,这个脚本会被调用
    
    1. 下载一些必须的插件
    w3m      # 预览网页
    highlight      # 高亮
    atool      # 压缩
    
    
    1. 简单配置,修改rc.conf文件
    set use_preview_script true    # 显示简单的文本文件或者图片的预览
    
    set preview_script ~/.config/ranger/scope.sh    # 为其它预览功能指定脚本文件
    
    set preview_images true    # 预览图片
    
    set preview_images_method w3m    # 使用什么方法来预览图片
    
    set vcs_aware true    # 开启 svn、git 之类的工具
    
    1. 在ranger中显示的文件类型图标
    # 需要配置nerd系列字体
    # https://github.com/alexanderjeurissen/ranger_devicons
    git clone https://github.com/alexanderjeurissen/ranger_devicons ~/.config/ranger/plugins/ranger_devicons
    
    # 配置文件
    echo "default_linemode devicons" >> $HOME/.config/ranger/rc.conf
    
    

    wps for linux 无法使用fcitx输入法的问题

    这个问题在manjaro中没有发现,但是在ubuntu里出现了这种情况,解决办法如下:

    # 修改 /usr/bin/wps /usr/bin/et /usr/bin/wpp
    
    $ sudo vi /usr/bin/wps
    
    export XMODIFIERS="@im=fcitx"
    export QT_IM_MODULE="fcitx"
    
    gOpt=
    #gOptExt=-multiply
    gTemplateExt=("wpt" "dot" "dotx")
    
    

    后续继续,现在我也不会配置了……

  • 相关阅读:
    phontomjs debug with webkit inspector
    《Node Web开发》((美)David Herron)【摘要 书评 试读】 京东图书
    PhantomJS in nonheadless mode Google Groups
    Backbone.js
    Underscore.js
    Free HTTP Sniffer: a free HTTP packet sniffer to find the URLs.
    phantomjs node.js parse child process output line by line (spawn) Stack Overflow
    Getting Started · jashkenas/rubyprocessing Wiki
    使用 JSONP 实现跨域通信,第 2 部分: 使用 JSONP、jQuery 和 Yahoo! 查询语言构建 mashup
    JavaScript中的正则表达式
  • 原文地址:https://www.cnblogs.com/rookieagle/p/12549565.html
Copyright © 2020-2023  润新知