Archlinux 2022安装配置之KDE
安装 KDE
sudo pacman -S plasma konsole dolphin dolphin-plugins
设置登陆管理器自启
sudo systemctl enable gdm
# 建议重启
reboot
充电域值
配置详解 https://linrunner.de/tlp/settings/battery.html
archlinux wiki https://wiki.archlinux.org/title/TLP_(简体中文)
安装tlp
yay -S tlp
# 查看电池信息
sudo tlp-stat -b
修改配置 /etc/tlp.conf
充电达到80%停止充电,低于75开始充电
sudo vim /etc/tlp.conf
# 搜索取消注释以下四行
START_CHARGE_THRESH_BAT0=75
STOP_CHARGE_THRESH_BAT0=80
START_CHARGE_THRESH_BAT1=75
STOP_CHARGE_THRESH_BAT1=80
一键设置充电域值脚本
#!/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%."
给予可执行权限
chmod +x battery80
# 链接到 /usr/local/bin 目录
sudo ln -s /home/lzscxb/software/shell/battery80 /usr/local/bin
# 执行
battery80
## 开机自启
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 软件管理触摸版手势(可选)
yay -S touchegg touche
笔记本最大亮度
笔记本有时候拔出电源会自动将亮度调整最低,所以写个脚本设置最高亮度
shell脚本
vim ~/software/shell/max-brightness
#!/bin/sh
sudo sh -c 'echo `cat /sys/class/backlight/amdgpu_bl0/max_brightness` > /sys/class/backlight/amdgpu_bl0/brightness'
设置可执行权限并链接到/usr/local/bin
chmod +x max-brightness
sudo ln -s /home/lzscxb/software/shell/max-brightness /usr/local/bin
完成后在设置中增加快捷键即可
触摸板配置
开启三指切换工作区等多触控手势
libinput-gestures(推荐)
yay -S libinput-gestures xdotool
添加当前用户到input组中并启动libinput-gestures
sudo gpasswd -a $USER input
libinput-gestures-setup autostart start
重启生效
方式一: 手动配置
vim ~/.config/libinput-gestures.conf
添加以下内容,并将配置修改为你自己的快捷键
# 三指滑动
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即可生效
libinput-gestures-setup restart
方式二: gestures GUI
安装gestures
后即可在gestures GUI中添加手势操作
Touchégg
只支持 X11(xorg),其他请自行测试
- 安装触摸版手势 Touchégg
Github:https://github.com/JoseExposito/touchegg#gnome - 安装 touche Gui 软件管理触摸版手势(可选)
yay -S touchegg touche