Archlinux 2022 安装配置之 KDE
字体优化
- 系统字体 - 推荐字体 ttf-sarasa-gothic
1 | yay -S ttf-sarasa-gothic |
konsole 字体 - 推荐 nerd-fonts-jetbrains-mono
1
yay -S nerd-fonts-jetbrains-mono
充电域值
配置详解 https://linrunner.de/tlp/settings/battery.html
archlinux wiki https://wiki.archlinux.org/title/TLP_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
安装 tlp
1 | yay -S tlp |
修改配置 /etc/tlp.conf
充电达到 80% 停止充电,低于 75 开始充电1
2
3
4
5
6
7
8sudo vim /etc/tlp.conf
# 搜索取消注释以下四行
START_CHARGE_THRESH_BAT0=75
STOP_CHARGE_THRESH_BAT0=80
START_CHARGE_THRESH_BAT1=75
STOP_CHARGE_THRESH_BAT1=80
一键设置充电域值脚本1
2
3
4
5
6
7
8
9
10
11
12
13#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo -e "\n\e[31mError!\e[0m\n\nThis script must be run as root!" 1>&2
exit 1
fi
echo -e "START_CHARGE_THRESH_BAT0=75\nSTOP_CHARGE_THRESH_BAT0=80\nSTART_CHARGE_THRESH_BAT1=75\nSTOP_CHARGE_THRESH_BAT1=80" > /etc/tlp.conf
# restart tpl server
systemctl restart tlp.service
echo -e "\n\e[32mSUCCESS!\e[0m \n\nSet the charging threshold to 80%."
给予可执行权限1
2
3
4
5chmod +x battery80
# 链接到 /usr/local/bin 目录
sudo ln -s /home/likfees/software/shell/battery80 /usr/local/bin
# 执行
battery80
1
2
3
4
5## 开机自启
sudo systemctl enable tlp.service
sudo systemctl restart tlp.service
## 查看电池信息
sudo tlp-stat -b
触摸版配置
开启三指切换工作区等多触控手势
应该只支持 X11 (xorg),其他请自行测试
- 安装多触控 GnomeExtends 插件
https://extensions.gnome.org/extension/4033/x11-gestures/ - 安装触摸版手势 Touchégg
Github:https://github.com/JoseExposito/touchegg#gnome - 安装 touche Gui 软件管理触摸版手势(可选)
1
yay -S touchegg touche
笔记本最大亮度
笔记本有时候拔出电源会自动将亮度调整最低,所以写个脚本设置最高亮度
shell 脚本vim ~/software/shell/max-brightness
1
2#!/bin/sh
sudo sh -c 'echo `cat /sys/class/backlight/amdgpu_bl0/max_brightness` > /sys/class/backlight/amdgpu_bl0/brightness'
设置可执行权限并链接到 /usr/local/bin
1
2chmod +x max-brightness
sudo ln -s /home/likfees/software/shell/max-brightness /usr/local/bin
完成后在设置中增加快捷键即可
触摸板配置
开启三指切换工作区等多触控手势
libinput-gestures(推荐)
1 | yay -S libinput-gestures xdotool |
添加当前用户到 input 组中并启动 libinput-gestures1
2sudo gpasswd -a $USER input
libinput-gestures-setup autostart start
重启生效
方式一: 手动配置
1 | vim ~/.config/libinput-gestures.conf |
添加以下内容,并将配置修改为你自己的快捷键1
2
3
4
5
6
7
8
9
10
11
12
13
14# 三指滑动
gesture swipe right 3 xdotool key ctrl+super+Left # 切换桌面
gesture swipe left 3 xdotool key ctrl+super+Right # 切换桌面
gesture swipe up 3 xdotool key ctrl+alt+Up # 最大化窗口
gesture swipe down 3 xdotool key ctrl+alt+Down # 最小化窗口
# 四指滑动
gesture swipe down 4 xdotool key super+d # 最小化所有窗口
gesture swipe up 4 xdotool key super+Tab # 显示窗口预览
# 三指捏合
gesture pinch in 3 xdotool key alt+F4 # 关闭窗口
# gesture pinch out 3 xdotool key alt+F4 # (向外)关闭窗口
~
重启启动 libinput-gestures 即可生效1
libinput-gestures-setup restart
方式二: gestures GUI
安装 gestures
后即可在 gestures GUI 中添加手势操作
Touchégg
只支持 X11 (xorg),其他请自行测试
- 安装触摸版手势 Touchégg
Github:https://github.com/JoseExposito/touchegg#gnome - 安装 touche Gui 软件管理触摸版手势(可选)
1
yay -S touchegg touche