跳至正文
首页 » Linux KDE下使用快捷键进行截屏

Linux KDE下使用快捷键进行截屏

在windows环境下使用笔记本上的PrtSc键可以很方便进行截屏,但是在Linux环境中PrtSc键在没有经过设置的情况下无法进行截屏操作。本文介绍在 Linux KDE下使用快捷键进行截屏 。本文使用的环境的archlinux,其他的系统也类似。因为archlinux默认没有截屏软件,这里使用spectacle作为截屏软件。

Linux KDE下使用快捷键进行截屏 - Spectacle 软件界面

spectacle是archlinux wiki中推荐KDE使用的截屏软件。使用 pacman -S spectacle 命令即可安装。在启动spectacle软件时就会自动截屏。除了启动时的截屏外,他还提供了很多实用的功能:例如矩阵截屏、延迟截屏、软件截取等。

在有了截屏软件下一步工作就是通过KDE的shortcuts来调用spectacle。先用spectale –help查看启动选项

Usage: spectacle [options] 
KDE Screenshot Utility

Options: 
-v, --version Displays version information. 
-h, --help Displays this help. 
-f, --fullscreen Capture the entire desktop (default) 
-m, --current Capture the current monitor 
-a, --activewindow Capture the active window 
-u, --windowundercursor Capture the window currently under the cursor, 
-t, --transientonly Capture the window currently under the cursor
-r, --region Capture a rectangular region of the screen 
-g, --gui Start in GUI mode (default) 
-b, --background Take a screenshot and exit without showing the GUI 
-s, --dbus Start in DBus-Activation mode 
-n, --nonotify In background mode, do not pop up a notification

其中常用的是以下几个模式

-f 整屏截取 如果使用多个显示器,每个显示器都会被保存下来
-a 截取当前运行的窗口 如果仅保存一个窗口,尽量选择这个模式。像本文中第一截图,在该窗口后面还有其他界面。如果使用region模式,窗口边界的阴影中会包含其他界面。但是使用activewindow模式可以得到一个纯净的窗口。
-r 划屏截取 画一个矩形,截取选择的区域
可以在终端中尝试几个模式启动软件以检测软件工作正常。

下一步启动系统设置中的Custom Shortcuts设置快捷键。Custom Shortcuts可以在Application Launcher中直接搜索名字启动。在软件左侧列表空白处右键 New –> Global Shortcut –> Command/URL 。Trigger中设置快捷键。Action中填入spectale及其后面的启动选项。如整屏截屏为“spectale -f ”。为注意如果使用完整拼写名称的启动选项,前面需要写两个“-”。可以设置多个项,分别设置不同的快捷键对应不同的模式。

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注