ubuntu 18.04 configurations and customizations

ubuntu 18.04 安装完之后,个人定制的一些系统软件安装与设置。

disable CapsLock

所有电脑上我都习惯禁用大小写切换键Caps Lock,在命令行中执行如下命令:

 setxkbmap -layout us -option ctrl:nocaps

disable Super

禁用ubuntu的Super键,在用户根目录这个文件~/.Xmodmap中写入以下内容,注销当前用户再重新登录生效:

keycode 133 = NoSymbolkeycode 134 = NoSymbol

using gnome shell integration extentions

安装这2个插件,隐藏系统顶部的工具栏和应用程序的标题栏:

  1. Hide top bar
  2. No title bar

安装中文输入法

使用fcitx小企鹅输入法,删除自带的ibus相关的组件,其中fcitx有自带一个非常好用的剪贴板历史,快捷键默认是ctrl + ;

 sudo apt-get remove ibus sudo apt install fcitx fcitx-bin fcitx-table fcitx-table-wupy im-config im-config

安装 google-chrome

系统中自带了firefox和chromium-browser都很好用,但习惯还是安装一个google-chrome。

安装其他工具

其中indicator-netspeed-unity可以在工具栏托盘中显示系统当前的网速,tilda配置为ctrl + F12快捷键从顶部呼出的命令行工具。

 sudo apt install -y indicator-netspeed-unity shadowsocks tilda gnome-tweaks sudo apt install -y neovim vim.gtk wireshark uget

设置用户登录自启动项

  1. /usr/bin/fcitx-autostart
  2. /usr/bin/google-chrome
  3. /usr/bin/indicator-netspeed-unity
  4. /usr/local/bin/sslocal -c ~/.ssh/sslocal.conf
  5. /usr/bin/tilda

安装配置 bash/zsh

 sudo apt install -y zsh git clone https://github.com/yuweijun/dotfiles.git cd dotfiles ./install.sh

disabled ubuntu dock

禁用ubuntu dock,或者直接删除此目录:ubuntu-dock@ubuntu.com ,重启生效。

 cd /usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com sudo mv metadata.json metadata.orig.json reboot

修改 gnome-terminal 的复制粘贴快捷键

设置Preferences > General,不要勾选中enable mnemonics(...)

避免命令行的中断命令快捷键Ctrl + c与系统的Ctrl + c冲突,可将复制快捷键和粘贴快捷键修改为Alt + cAlt + p

关闭部分系统原生设定的快捷键

#!/bin/shgsettings set org.gnome.desktop.wm.keybindings begin-move "['disabled']"gsettings set org.gnome.desktop.wm.keybindings begin-resize "['disabled']"gsettings set org.gnome.desktop.wm.keybindings cycle-group "['disabled']"gsettings set org.gnome.desktop.wm.keybindings toggle-shaded "['disabled']"gsettings set org.gnome.desktop.wm.keybindings minimize "['disabled']"gsettings set org.gnome.desktop.wm.keybindings maximize "['disabled']"gsettings set org.gnome.desktop.wm.keybindings unmaximize "['disabled']"gsettings set org.gnome.desktop.wm.keybindings toggle-maximized "['disabled']"gsettings set org.gnome.desktop.wm.keybindings activate-window-menu "['disabled']"gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['disabled']"gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['disabled']"# gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['disabled']"

修改系统常用快捷键

进入gnome-control-center -> keyboard,设置相关应用程序的快捷键,保留截屏相关的组合快捷键,禁用其他所有组合快捷键:

name shortcuts
gvim Ctrl + Alt + g
terminal Ctrl + Alt + t
settings Ctrl + Alt + .
home Ctrl + Alt + h
switch directly Alt + Escape
show the activities overview Alt + F1
show the run command prompt Alt + F2
hide window Alt + F3
close window Alt + F4

卸载不常用的自带软件

 sudo apt-get remove unity-webapps-common sudo apt-get remove libreoffice-common sudo apt-get remove thunderbird totem rhythmbox empathy brasero simple-scan gnome-mahjongg aisleriot gnome-mines cheese transmission-common gnome-orca webbrowser-app gnome-sudoku landscape-client-ui-install sudo apt-get autoremove