计算机无鼠标论

Taboo 发布于 2024-10-19 215 次阅读


在高中的时候,我就问过好兄弟嘉哲(高中打信息竞赛,现任深圳大学ACM集训队队长)一个问题:能不能只用键盘来完成各种电脑操作?好兄弟的答案我已经不记得了,但也给我当时幼小的心灵埋下了一颗种子。

仔细想想,好像只用键盘也难以完成图形化界面中的各种操作,这当然也肯定是图形化界面被发明出来用于更精确的控制操作的初衷。但是,只用两根指头来完成各种操作好像有点太累了,能不能也用左手辅助完成一些操作呢?

零 · 快捷键

在各种系统下都有许多的快捷键,比如说Windows-的键盘快捷方式,还有软件中通用的一些快捷键,比如说Ctrl + A是全选,Ctrl + S是保存,Ctrl + Z是后退,Ctrl + X是剪切,Ctrl + C是复制,Ctrl + V是粘贴等等等等,网上相关的教程都很多,这里就不再赘述了。

一般能把这些系统中的快捷键用上,就已经可以提升很大一部分工作效率了,当然也是赛博小白们最好能会的。

壹 · 软件启动器

当初去了解网安知识的时候,看到了爱穿黑白丝袜的探姬写的网站——Hello CTF,里面工具一览页面中提到了两款软件:Maya LiteuTools,这两款工具的基础定位都是软件快速启动器。其中uTools好像更符合本文的主题,通过按下Alt+Space唤出uTools,再按下要启动的软件拼音首字母,最后回车即可打开软件,主打一个操作流畅舒适。更不要说其自带的插件市场,功能极度舒适,而且与软件本体功能毫无违和。

俺已经在好多课程上推荐过uTools了,但好像没多少人用,可能他们就喜欢用鼠标点吧(笑哭)。

一般的电脑用户呢到这里也就够用了,再往下走就要开始折腾了。

贰 · Linux

说到纯键盘操作,就不得不提伟大的Linux家族,毕竟是能只拥有CLI界面的大哥,就算是不装GUI,也能完成各类开发必要操作,当然其对游戏的支持emmm确实还有提升空间。

让我最印象深刻的软件还得是vim,其强大的编辑功能,高度可定制化,强大的扩展能力,让众多程序员和云计算工程师对其爱不释手,甚至现代各种主流编辑器中都保留有vim的操作模式。可谓是将按键功能压榨到极致的典范之作。

后面所提到的,多多少少都与vim有一定联系,vim就是键盘流的神!

叁 · 平铺窗口管理器

在Linux世界中遨游时,突然看到了一个视频,讲的是Hyprland这一平铺窗口管理器,发现这玩意有点太适合我了吧,想着后面在自己的爱机上用。后来我装了一台debian12.5,发现hyprland官方对debian发行版就没有做适配(苦笑),又经过一番探索,决定转去使用i3wm,配置了一番还是蛮舒服的。在文章最后呢会附上我对i3wm的配置。

大部分的平铺窗口管理器都是Linux下面的,当然Windows下也是有的:Komorebi。但是我还没有用过,就留个坑以后填吧(听说好像性能损失有点严重,也不知道有没有再做优化)。

肆 · Vimium

Vimium是一个浏览器扩展,支持在绝大部分浏览器页面在不触摸鼠标的情况下来浏览网页。在无鼠标中,对于浏览器的操作一直是个麻烦的事情,这个插件直接弥补了这一空缺。我在firefox下还搭配了sidebery来一起使用,然后把切换标签页前后操作调换了一下,这样切换标签页时候能够更加直观。其他就按照默认设置就很舒服了。

伍 · 混合UI系统

win-vind这软件让我猝不及防的就知道了,但是我还没有用过,也留个坑吧。对于Linux下的混合UI系统我还没有找到。

其实我刚开始写这篇文章的时候,有人说,这不是相当于返祖了吗。仔细想想好像也确实是这样的,但是这篇文章肯定是适用在特定领域下的,比如说天天不停敲键盘的程序员,对这类人群来说,从键盘上移开去拿起鼠标,本身可能就是一种低效的动作。当然我也并没有想让所有的人都这样做,那样也不现实对吧,我也就用这篇文章来记录我探索这个领域的过程和经历。一般的电脑用户使用到前两节的内容就已经能够提升很高的工作学习效率了。前面留的坑,后面慢慢再来填吧~

附录

i3wm配置文件:config

include ~/.config/i3/exec.conf
include ~/.config/i3/bind.conf
include ~/.config/i3/workspace.conf
include ~/.config/i3/display.conf
include ~/.config/i3/resize.conf

exec.conf

font pango:monospace 10

exec --no-startup-id dex --autostart --environment i3
exec xrandr --output DP-1 --mode 1600x900
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
exec --no-startup-id nm-applet
exec --no-startup-id ibus
exec_always feh --bg-fill ~/Pictures/wallpaper/wp1.jpg
exec_always --no-startup-id bash /home/taboo/.config/polybar/docky/launch.sh

bind.conf

# Set mod key
set $mod Mod4

# Set key binding to start and close applications
bindsym $mod+Return exec kitty
bindsym $mod+q kill
bindsym $mod+g exec --no-startup-id i3lock
bindsym $mod+d exec --no-startup-id bash ~/.config/polybar/docky/scripts/launcher.sh

# Set key binding to change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
bindsym $mod+space focus mode_toggle

# Set key binding to move focused window
floating_modifier $mod
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

# Set key binding to set windows layout
bindsym $mod+c split h
bindsym $mod+v split v
bindsym $mod+f fullscreen toggle
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+Shift+space floating toggle

# Set key binding to set i3 config
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit>

# Set key binding to adjust volume in PulseAudio
set $refresh_i3status killall -SIGUSR1 i3status
bindsym $mod+u exec --no-startup-id amixer sset Master 5%+ && $refresh_i3status
bindsym $mod+i exec --no-startup-id amixer sset Master 5%- && $refresh_i3status
bindsym $mod+o exec --no-startup-id amixer sset Master mute && $refresh_i3status
bindsym $mod+p exec --no-startup-id amixer sset Master unmute && $refresh_i3status

workspace.conf

# Set mod key
set $mod Mod4

# Set names for workspaces
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"

# Set key binding to switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
bindsym $mod+Ctrl+Left workspace prev
bindsym $mod+Ctrl+Right workspace next

# Set key binding to move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1;workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2;workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3;workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4;workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5;workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6;workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7;workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8;workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9;workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10;workspace number $ws10

display.conf

# Set title
title_align center

# Set border
default_border pixel 2
default_floating_border pixel 2
hide_edge_borders both
#smart_borders on

# Set fullscreen
popup_during_fullscreen smart

# Set workspace switching automatic
workspace_auto_back_and_forth no

# Set showing marks
show_marks yes

# Set gaps
gaps inner 5
gaps outer 1

resize.conf

# Set mod key
set $mod Mod4

# Set resize mode
bindsym $mod+r mode "resize"
mode "resize" {
        bindsym h resize shrink width 10 px or 10 ppt
        bindsym j resize grow height 10 px or 10 ppt
        bindsym k resize shrink height 10 px or 10 ppt
        bindsym l resize grow width 10 px or 10 ppt
        bindsym Left resize shrink width 10 px or 10 ppt
        bindsym Down resize grow height 10 px or 10 ppt
        bindsym Up resize shrink height 10 px or 10 ppt
        bindsym Right resize grow width 10 px or 10 ppt
        # Back to normal
        bindsym Return mode "default"
        bindsym Escape mode "default"
        bindsym $mod+r mode "default"
}

此作者没有提供个人介绍
最后更新于 2024-10-19