Hail to Wayland!

This commit is contained in:
rydesun 2026-06-29 22:58:15 +08:00
parent 7996a1cbbe
commit 75ae9af916
17 changed files with 61 additions and 70 deletions

View file

@ -10,11 +10,13 @@ shadow-opacity = 0.48
shadow-exclude = [
"argb && (
window_type = 'menu'
|| window_type = 'dropdown_menu'
(window_type = 'menu' && class_g != 'fcitx')
|| window_type = 'popup_menu'
|| window_type = 'utility'
|| window_type = 'tooltip'
|| (window_type = 'combo' && class_g != 'fcitx')
|| (window_type = 'utility' && class_g != 'Dunst')
)"
, "QTILE_INTERNAL = 1"
, "class_g = 'TelegramDesktop' && argb && override_redirect"
]
@ -33,13 +35,13 @@ corner-radius = 12
rounded-corners-exclude = [
"QTILE_INTERNAL"
, "IS_FLOATING@:c = 0"
, "IS_FLOATING@ = 0"
, "class_g = 'kitty'"
, "class_g = 'mpv'",
, "class_g = 'mpv'"
];
#################################
# Background-Blurring #
# Blur #
#################################
blur-method = "dual_kawase"
@ -54,14 +56,13 @@ blur-background-exclude = [
#################################
backend = "glx"
glx-no-stencil = true
glx-no-rebind-pixmap = true
vsync = true
mark-wmwin-focused = true
use-damage = true
unredir-if-possible = true
use-ewmh-active-win = true
mark-ovredir-focused = true
detect-rounded-corners = true
detect-client-opacity = true
use-ewmh-active-win = true
detect-transient = true
detect-client-leader = true
use-damage = true

View file

@ -1,2 +1,6 @@
[Unit]
Description=Run desktop applications under Wayland
BindsTo=graphical-session.target
Wants=graphical-session-pre.target graphical-session.target
After=graphical-session-pre.target

View file

@ -1,2 +1,6 @@
[Unit]
Description=Run desktop applications under X11
BindsTo=graphical-session.target
Wants=graphical-session-pre.target graphical-session.target
After=graphical-session-pre.target

View file

@ -1,9 +0,0 @@
[Unit]
Description=blueman
[Service]
ExecStart=/usr/bin/blueman-applet
[Install]
WantedBy=X11.target
WantedBy=Wayland.target

View file

@ -6,4 +6,3 @@ ExecStart=/usr/bin/copyq
[Install]
WantedBy=X11.target
WantedBy=Wayland.target

View file

@ -1,10 +1,11 @@
[Unit]
Description=fcitx5
After=graphical-session.target
PartOf=graphical-session.target
[Service]
Type=forking
ExecStart=/usr/bin/fcitx5 -d
[Install]
WantedBy=X11.target
WantedBy=Wayland.target
WantedBy=graphical-session.target

View file

@ -1,9 +1,10 @@
[Unit]
Description=kdeconnect
After=graphical-session.target
PartOf=graphical-session.target
[Service]
ExecStart=/usr/bin/kdeconnect-indicator
[Install]
WantedBy=X11.target
WantedBy=Wayland.target
WantedBy=graphical-session.target

View file

@ -1,9 +0,0 @@
[Unit]
Description=lxqt-config-monitor
[Service]
Type=oneshot
ExecStart=/usr/bin/lxqt-config-monitor -l
[Install]
WantedBy=X11.target

View file

@ -1,9 +1,10 @@
[Unit]
Description=network-manager-applet
After=graphical-session.target
PartOf=graphical-session.target
[Service]
ExecStart=/usr/bin/nm-applet
[Install]
WantedBy=X11.target
WantedBy=Wayland.target
WantedBy=graphical-session.target

View file

@ -1,3 +1,2 @@
[Install]
WantedBy=X11.target
WantedBy=Wayland.target
WantedBy=graphical-session.target

View file

@ -1,9 +0,0 @@
[Unit]
Description=playerctld
[Service]
Type=oneshot
ExecStart=/usr/bin/playerctld daemon
[Install]
WantedBy=default.target

View file

@ -1,9 +1,10 @@
[Unit]
Description=udiskie
After=graphical-session.target
PartOf=graphical-session.target
[Service]
ExecStart=/usr/bin/udiskie --smart-tray
[Install]
WantedBy=X11.target
WantedBy=Wayland.target
WantedBy=graphical-session.target

View file

@ -0,0 +1,3 @@
[Install]
WantedBy=
WantedBy=Wayland.target

View file

@ -1,8 +0,0 @@
[Unit]
Description=xsettingsd
[Service]
ExecStart=/usr/bin/xsettingsd
[Install]
WantedBy=X11.target

View file

@ -16,6 +16,8 @@ fi
if [[ -n "$@" ]]; then
# 启动锁屏程序
xss-lock -- betterlockscreen -l &
# 托盘
snixembed &
exec "$@"
fi

View file

@ -1,8 +1,6 @@
typeset -U path PATH
path=($path ~/.bin)
if [[ "$HOME" == */ ]]; then HOME=${HOME:0:-1}; fi
### XDG目录
if [[ "$HOME" == */ ]]; then HOME=${HOME:0:-1}; fi
export XDG_CONFIG_HOME=$HOME/.config
export XDG_CACHE_HOME=$HOME/.cache
export XDG_DATA_HOME=$HOME/.data
@ -73,8 +71,8 @@ export XDG_MENU_PREFIX=plasma-
export XCURSOR_PATH="$XDG_DATA_HOME"/icons:/usr/share/icons
### Qt
# 无桌面环境用qt5ct配置Qt主题
export QT_QPA_PLATFORMTHEME=qt5ct
# 假装成kde
export QT_QPA_PLATFORMTHEME=kde
# 禁止Qt自动缩放。用xrdb手动设置DPI
export QT_AUTO_SCREEN_SCALE_FACTOR=0
@ -85,7 +83,6 @@ export QT_ENABLE_HIGHDPI_SCALING=0
export GTK_USE_PORTAL=1
### Fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export SDL_IM_MODULE=fcitx
@ -97,17 +94,28 @@ export GLFW_IM_MODULE=ibus
command -v dbus-update-activation-environment &>/dev/null && \
dbus-update-activation-environment --systemd --all 2>/dev/null
USE_WAYLAND=true
# NOTE: 直接在登录shell中自启桌面环境
if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
# 只在桌面环境使用中文
command -v dbus-update-activation-environment &>/dev/null && \
dbus-update-activation-environment --systemd LANG=zh_CN.UTF-8 2>/dev/null
if $USE_WAYLAND; then
export QT_FONT_DPI=144
export GDK_DPI_SCALE=1.5
fi
export LANG=zh_CN.UTF-8
## QTile尚不支持wayland输入法相关协议
export GTK_IM_MODULE=fcitx
if true; then
LANG=zh_CN.UTF-8 xinit qtile start
command -v dbus-update-activation-environment &>/dev/null && \
dbus-update-activation-environment --systemd --all 2>/dev/null
if $USE_WAYLAND; then
qtile start -b wayland
else
LANG=zh_CN.UTF-8 qtile start -b wayland
xinit qtile start
fi
fi
# 只在桌面环境使用中文tty保持英文
unset LANG
# vim:foldmethod=marker

4
.zshrc
View file

@ -1,4 +1,7 @@
# {{{ 环境
typeset -U path PATH
path+=(/usr/sbin /usr/local/sbin $HOME/.bin)
Z_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"/zsh
Z_DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}"/zsh
Z_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}"/zsh
@ -60,7 +63,6 @@ setopt extended_history # 记录时间戳
if [[ -f "$Z_ZINIT_BIN" ]]; then
source "$Z_ZINIT_BIN"
else
echo "zinit: not found" >/dev/stderr
zinit() {}
fi