diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf index fc67dc0..1b988bb 100644 --- a/.config/picom/picom.conf +++ b/.config/picom/picom.conf @@ -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 diff --git a/.config/systemd/user/Wayland.target b/.config/systemd/user/Wayland.target index df980cf..26a9335 100644 --- a/.config/systemd/user/Wayland.target +++ b/.config/systemd/user/Wayland.target @@ -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 diff --git a/.config/systemd/user/X11.target b/.config/systemd/user/X11.target index 7376a0d..82ffa42 100644 --- a/.config/systemd/user/X11.target +++ b/.config/systemd/user/X11.target @@ -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 diff --git a/.config/systemd/user/blueman.service b/.config/systemd/user/blueman.service deleted file mode 100644 index 22ea4a1..0000000 --- a/.config/systemd/user/blueman.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=blueman - -[Service] -ExecStart=/usr/bin/blueman-applet - -[Install] -WantedBy=X11.target -WantedBy=Wayland.target diff --git a/.config/systemd/user/copyq.service b/.config/systemd/user/copyq.service index 45efd10..915a33b 100644 --- a/.config/systemd/user/copyq.service +++ b/.config/systemd/user/copyq.service @@ -6,4 +6,3 @@ ExecStart=/usr/bin/copyq [Install] WantedBy=X11.target -WantedBy=Wayland.target diff --git a/.config/systemd/user/fcitx5.service b/.config/systemd/user/fcitx5.service index 18fdf35..a81ff59 100644 --- a/.config/systemd/user/fcitx5.service +++ b/.config/systemd/user/fcitx5.service @@ -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 diff --git a/.config/systemd/user/kdeconnect.service b/.config/systemd/user/kdeconnect.service index 0506212..5268705 100644 --- a/.config/systemd/user/kdeconnect.service +++ b/.config/systemd/user/kdeconnect.service @@ -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 diff --git a/.config/systemd/user/lxqt-config-monitor.service b/.config/systemd/user/lxqt-config-monitor.service deleted file mode 100644 index 969ba66..0000000 --- a/.config/systemd/user/lxqt-config-monitor.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=lxqt-config-monitor - -[Service] -Type=oneshot -ExecStart=/usr/bin/lxqt-config-monitor -l - -[Install] -WantedBy=X11.target diff --git a/.config/systemd/user/network-manager-applet.service b/.config/systemd/user/network-manager-applet.service index 2e8bfb2..6297229 100644 --- a/.config/systemd/user/network-manager-applet.service +++ b/.config/systemd/user/network-manager-applet.service @@ -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 diff --git a/.config/systemd/user/plasma-polkit-agent.service.d/override.conf b/.config/systemd/user/plasma-polkit-agent.service.d/override.conf index 56f8031..5b991c7 100644 --- a/.config/systemd/user/plasma-polkit-agent.service.d/override.conf +++ b/.config/systemd/user/plasma-polkit-agent.service.d/override.conf @@ -1,3 +1,2 @@ [Install] -WantedBy=X11.target -WantedBy=Wayland.target \ No newline at end of file +WantedBy=graphical-session.target diff --git a/.config/systemd/user/playerctld.service b/.config/systemd/user/playerctld.service deleted file mode 100644 index 5b8cb5f..0000000 --- a/.config/systemd/user/playerctld.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=playerctld - -[Service] -Type=oneshot -ExecStart=/usr/bin/playerctld daemon - -[Install] -WantedBy=default.target diff --git a/.config/systemd/user/udiskie.service b/.config/systemd/user/udiskie.service index cfa8ce1..0147d56 100644 --- a/.config/systemd/user/udiskie.service +++ b/.config/systemd/user/udiskie.service @@ -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 diff --git a/.config/systemd/user/waybar.service.d/override.conf b/.config/systemd/user/waybar.service.d/override.conf new file mode 100644 index 0000000..12f4cac --- /dev/null +++ b/.config/systemd/user/waybar.service.d/override.conf @@ -0,0 +1,3 @@ +[Install] +WantedBy= +WantedBy=Wayland.target diff --git a/.config/systemd/user/xsettingsd.service b/.config/systemd/user/xsettingsd.service deleted file mode 100644 index 75b649a..0000000 --- a/.config/systemd/user/xsettingsd.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=xsettingsd - -[Service] -ExecStart=/usr/bin/xsettingsd - -[Install] -WantedBy=X11.target diff --git a/.xinitrc b/.xinitrc index 0ebe777..3eff8b2 100644 --- a/.xinitrc +++ b/.xinitrc @@ -16,6 +16,8 @@ fi if [[ -n "$@" ]]; then # 启动锁屏程序 xss-lock -- betterlockscreen -l & + # 托盘 + snixembed & exec "$@" fi diff --git a/.zprofile b/.zprofile index cbb866d..f396b33 100644 --- a/.zprofile +++ b/.zprofile @@ -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 diff --git a/.zshrc b/.zshrc index 09f9062..e384706 100644 --- a/.zshrc +++ b/.zshrc @@ -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