这篇用来整理记录ubuntu的当前使用配置,内容包括:

  1. 强化Gnome桌面
  2. 强化触摸板
  3. 优化终端
  4. 快捷键的设置及二狗蛋的配合使用
  5. bug解决
  6. 待继续探索的区域

1. 强化Gnome桌面

gnome-tweaks

  • 外观

    • 主题库:https://www.gnome-look.org/
    • 使用:下载后,在gnome-tweaks的外观中依次设置主题(目前用的Qogir)图标(目前用的Newaita)Shell(目前用的Qogir-dark)(先安装user themes)。
  • 字体

    • 缩放比例:当前1.5
  • 工作区

    • 静态工作区
    • 数量4
    • 只在主显示屏上显示工作区
  • 开机启动程序

    • fusuma
    • 终端
  • 扩展

    • chrome中安装:Gnome shell integration,用来方便的安装插件
    • ubuntu appindicators:不记得这个干嘛的了…
    • Disable workspace switcher popup:用来禁掉switching bar
    • ubuntu dock:设置dock
    • user themes:加载自定义主题,安装这个才能实现上面说的更改主题
    • workspace grid: 更改工作区行为

      工作区配置

  • 桌面

    当前桌面图标打开,其他都关闭


2. 强化触摸板

  • 安装fusuma:https://github.com/iberianpig/fusuma#installation
  • 当前配置:

    • 位置:~/.config/fusuma
    • 配置

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      swipe:
      3:
      left:
      shortcut: 'alt+Left'
      right:
      shortcut: 'alt+Right'
      up:
      shortcut: 'ctrl+t'
      down:
      shortcut: 'ctrl+w'
      4:
      left:
      shortcut: 'ctrl+alt+Down'
      right:
      shortcut: 'ctrl+alt+Up'
      up:
      shortcut: 'alt+Tab'
      down:
      shortcut: 'super'
      pinch:
      in:
      shortcut: ''
      out:
      shortcut: ''

      threshold:
      swipe: 0.6
      pinch: 1

      interval:
      swipe: 0.5

3. 优化终端

  • 安装oh-my-zsh

    • 字符不能正确显示需要先安装powerline
    • 当前配置
      • 位置:~/.zshrc
      • 配置:
        1
        2
        3
        4
        5
        6
        7
        8
        9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
        39
        40
        41
        42
        43
        44
        45
        46
        47
        48
        49
        50
        51
        52
        53
        54
        55
        56
        57
        58
        59
        60
        61
        62
        63
        64
        65
        66
        67
        68
        69
        70
        71
        72
        73
        74
        75
        76
        77
        78
        79
        80
        81
        82
        83
        84
        85
        86
        87
        88
        89
        90
        91
        92
        93
        94
        95
        96
        97
        98
        99
        100
        101
        102
        103
        104
        105
        106
        107
        108
        109
        110
        111
        112
        113
        114
        115
        116
        117
        118
        119
        120
        121
        122
        123
        124
        125
        126
        127
        # If you come from bash you might have to change your $PATH.
        # export PATH=$HOME/bin:/usr/local/bin:$PATH
        export PATH=$PATH:/opt/google/chrome

        # java alg4.jar 环境变量
        export CLASSPATH=$CLASSPATH:~/algs4/algs4.jar

        # Path to your oh-my-zsh installation.
        export ZSH="/home/yangyin/.oh-my-zsh"
        export CLASSPATH=$CLASSPATH:/home/yangyin/others/algs4.jar

        # 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="agnoster"

        # 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 change how often to auto-update (in days).
        # export UPDATE_ZSH_DAYS=13

        # 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)

        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

        # If not running interactively, do not do anything
        # 自启动tmux
        [[ $- != *i* ]] && return
        [[ -z "$TMUX" ]] && exec tmux

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

        # ssh
        # export SSH_KEY_PATH="~/.ssh/rsa_id"

        # 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"
        #
        #
        # ydict查词
        alias dd="ydict"
        #启动微信小程序工具
        alias ww="bash ~/ginnko/wechat_web_devtools/bin/wxdt"
        #启动mongodb可视化工具Robomongo
        # 二进制程序使用 exec 关键字
        alias ro="exec /home/yangyin/ginnko/robo3t/bin/robo3t"
        #mongodb的启动、停止和重启
        alias mgstart="sudo service mongod start"
        alias mgstop="sudo service mongod stop"
        alias mgrestart="sudo service mongod restart"
        # 设置、取消全局代理
        alias setproxy="export ALL_PROXY=socks5://127.0.0.1:1080"
        alias unsetproxy="unset ALL_PROXY"

        export DEFAULT_USER=$USER
        source ~/.nvm/nvm.sh
        source /home/yangyin/ginnko/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  • 安装Tmux

    • 当前配置

      • 位置:~/.tmux.conf
      • 配置:

        1
        2
        3
        4
        5
        6
        7
        8
        9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        # remap prefix from 'C-b' to 'C-a'
        unbind C-b
        set-option -g prefix C-a
        bind-key C-a send-prefix

        # reload config file (change file location to your the tmux.conf you want to use)
        bind r source-file ~/.tmux.conf

        # split panes using | and -
        bind \ split-window -h
        bind - split-window -v
        unbind '"'
        unbind %

        # switch panes using Alt-arrow without prefix
        bind -n M-Left select-pane -L
        bind -n M-Right select-pane -R
        bind -n M-Up select-pane -U
        bind -n M-Down select-pane -D

        # Enable mouse mode (tmux 2.1 and above)
        set -g mouse on

        # status
        set -g status-right ''
        set -g status-left ''
        set -g status off

        ######################
        ### DESIGN CHANGES ###
        ######################

4. 快捷键的设置及二狗蛋的配合使用

  • 系统默认快捷键查询:设备>键盘
  • 自定义快捷键:
    • 将窗口移入上一个屏幕:ctrl+up
    • 将窗口移入下一个屏幕:ctrl+down
    • 直接切换窗口:ctrl+tab
    • shutter:ctrl+shift+a
  • 二狗蛋目前键位设定

    二狗蛋键位设定


5. bug解决

  • 问题:终端右上角的终端图标尺寸巨大,且显示不完整

    解决办法:将gnome-tweaks中的顶栏>应用程序菜单 打开,即可隐藏图标。


6. 待继续探索的区域

  • 指定特定程序到特定工作区
  • 触摸板手势优化(看到fusuma的readme有了重大更新)
  • Tmux的使用