打造前端 Deepin Linux 工作环境——调节鼠标滚轮速度
2017-11-05 02:29
766 查看
打造前端 Deepin Linux 工作环境——调节鼠标滚轮速度
在deepin的系统设置里面,没有找到鼠标滚轮速度调节的选项。但是默认情况下,其滚轮的速度又特别的慢。经过一番搜索,终于解决了这个问题。
安装 imwheel
首先执行sudo apt-get install imwheel -y
安装 imwheel 软件。
创建调整脚本
# 创建自定义脚本目录 mkdir ~/.bin/ # 创建并编辑我们的脚本文件 vim ~/.bin/setwheel
然后在文件中粘贴进去以下代码:
#!/bin/bash # Version 0.1 Tuesday, 07 May 2013 # Comments and complaints http://www.nicknorton.net # GUI for mouse wheel speed using imwheel in Gnome # imwheel needs to be installed for this script to work # sudo apt-get install imwheel # Pretty much hard wired to only use a mouse with # left, right and wheel in the middle. # If you have a mouse with complications or special needs, # use the command xev to find what your wheel does. # ### see if imwheel config exists, if not create it ### if [ ! -f ~/.imwheelrc ] then cat >~/.imwheelrc<<EOF ".*" None, Up, Button4, 1 None, Down, Button5, 1 Control_L, Up, Control_L|Button4 Control_L, Down, Control_L|Button5 Shift_L, Up, Shift_L|Button4 Shift_L, Down, Shift_L|Button5 EOF fi ########################################################## CURRENT_VALUE=$(awk -F 'Button4,' '{print $2}' ~/.imwheelrc) NEW_VALUE=$(zenity --scale --window-icon=info --ok-label=Apply --title="Wheelies" --text "Mouse wheel speed:" --min-value=1 --max-value=100 --value="$CURRENT_VALUE" --step 1) if [ "$NEW_VALUE" == "" ]; then exit 0 fi sed -i "s/\($TARGET_KEY *Button4, *\).*/\1$NEW_VALUE/" ~/.imwheelrc # find the string Button4, and write new value. sed -i "s/\($TARGET_KEY *Button5, *\).*/\1$NEW_VALUE/" ~/.imwheelrc # find the string Button5, and write new value. cat ~/.imwheelrc imwheel -kill # END OF SCRIPT FILE
粘贴进去以上代码之后,再运行下面的命令:
# 给运行权限 chmod +x ~/.bin/setwheel # 将 ~/.bin/ 目录加入系统程序执行目录并立即生效 echo 'export PATH="$PATH:~/.bin"' >> ~/.bash_profile && . ~/.bash_profile # 运行脚本 setwheel
然后就会打开如下图的设置面板
我设置到3,你可以根据自己的情况进行设置。
参考资料:http://www.nicknorton.net/
本文由FungLeo原创,允许转载,但转载必须附注首发链接。谢谢。
相关文章推荐
- 打造前端 Deepin Linux 工作环境——安装最新版本的火狐firefox浏览器
- 打造前端 Deepin Linux 工作环境——配置 XAMPP 集成环境
- 打造前端 Deepin Linux 工作环境——系统设置以及安装软件
- 打造前端 Deepin Linux 工作环境——安装系统
- 打造前端 Deepin Linux 工作环境——配置静态服务器
- 打造前端 Deepin Linux 工作环境——GUI图形压缩软件 PeaZip 的安装与设置
- 打造前端 Deepin Linux 工作环境——安装 nodejs 环境,git 版本管理
- 打造前端 Deepin Linux 工作环境——安装配置 atom 编辑器
- 打造前端 Deepin Linux 工作环境——安装 koala css 预编译工具(安装deb包的方法
- 打造前端 Deepin Linux 工作环境——开机自动加载 ~/.bash_profile 文件
- 打造前端 Deepin Linux 工作环境——系统更新以及配置字体
- 打造前端 Deepin Linux 工作环境——配置 XAMPP 集成环境2 虚拟主机、数据库
- 打造一个perfect的linux开发环境(加入对鼠标滚轮的支持)
- Deepin Linux下配置.NetCore开发环境
- 打造高效前端工作环境-tmuxinator
- Deepin Linux安装node.js并搭建vue环境
- vmware 10.0.1 workstation在Deepin Linux 2014下无法工作
- deepin linux 15.5 + 小米笔记本pro 下的深度学习环境tensorflow-gpu 1.4版本搭建过程
- 打造高效前端工作环境_-_tmux