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

image

## 開機自啟
sudo systemctl enable tlp.service
sudo systemctl restart tlp.service
## 查看電池信息
sudo tlp-stat -b

觸摸版配置

開啟三指切換工作區等多觸控手勢
應該只支持 X11(xorg),其他請自行測試

  1. 安裝多觸控 GnomeExtends 插件
    https://extensions.gnome.org/extension/4033/x11-gestures/
  2. 安裝觸摸版手勢 Touchégg
    Github:https://github.com/JoseExposito/touchegg#gnome
  3. 安裝 touche Gui 軟件管理觸摸版手勢(可選)
yay -S touchegg touche

image

筆記本最大亮度

筆記本有時候拔出電源會自動將亮度調整最低,所以寫個腳本設置最高亮度

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

完成后在設置中增加快捷鍵即可
image

觸摸板配置

開啟三指切換工作區等多觸控手勢

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中添加手勢操作
image

Touchégg

只支持 X11(xorg),其他請自行測試

  1. 安裝觸摸版手勢 Touchégg
    Github:https://github.com/JoseExposito/touchegg#gnome
  2. 安裝 touche Gui 軟件管理觸摸版手勢(可選)
yay -S touchegg touche

image


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM