个人wsl2设置

个人环境记录使用操作 Archlinux

wsl2

k8s

1
2
3
4
5
6
7
8
9
sudo pacman -S kubectx
yay -S skaffold
pacman -S base-devel which diffutils man openssh tree p7zip bc wget \
  htop strace most \
  yarn npm python-pip \
  zathura-ps zathura-pdf-poppler \
  feh imagemagick mediainfo ffmpeg \
  opencc dos2unix jq net-tools bind-tools nload
yarn global add hexo-cli nali-cli http-server

安装 minikube

1
2
3
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
minikube start

语言设置

1
2
3
4
sed -i '/zh_CN.UTF-8/s/^#//' /etc/locale.gen
locale-gen
sed -i 's/en_US/zh_CN/' /etc/locale.conf
source /etc/locale.conf
1
sudo pacman -S gedit nautilus x11-apps
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
🥳🌈🩷 cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo

个人 darclua 全面化

image-20231103165528431

sway 配置也成了

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
#
# author  : Xu Xiaodong <xuxiaodong@pm.me>
# modified: 2019 May 02
#
# Swaywm 配置文件 (https://github.com/xuxiaodong/swaywmconf)
#
# 复制或链接本文件到 ~/.config/sway/config
#
# 阅读 `man 5 sway` 了解详情
#

### 变量
#
# 使用徽标键作为修饰键
set $mod Mod1
# Vim 风格的方向键
set $left h
set $down j
set $up k
set $right l
# 首选终端模拟器
set $term kitty
# 首选应用启动器
set $menu rofi -show run -theme solarized -show-icons
# GNOME 界面
set $gnome-schema org.gnome.desktop.interface

### 显示输出配置
#
# 设置壁纸
output * bg /home/xfhuang/img/Avatar.png fill
# 显示器
# 通过运行 `swaymsg -t get_outputs` 可以获得显示器名称
# 笔记本自带显示器
output eDP-1 pos 0,0 res 1920x1080
# 外置显示器
output DP-1 pos 1920,0 res 1440x900

### 空闲配置
#
# 未活动 300 秒后锁屏,再 300 秒后关闭显示
exec swayidle -w \
         timeout 300 'swaylock -f -c 000000' \
         timeout 600 'swaymsg "output * dpms off"' \
              resume 'swaymsg "output * dpms on"' \
         before-sleep 'swaylock -f -c 000000'

### 输入配置
#
# 通过运行 `swaymsg -t get_inputs` 可以获得输入名称
# 阅读 `man 5 sway-input` 了解详情
# 笔记本触摸板配置
input 1739:30382:DLL0704:01_06CB:76AE_Touchpad {
    tap enabled
    natural_scroll enabled
    middle_emulation enabled
}
# 键盘配置,交换 Ctrl 和大写键
input * {
    xkb_layout "us"
    xkb_options "ctrl:swapcaps"
}

### 按键绑定
#
# 基本:
#
    # 启动终端
    bindsym $mod+Return exec $term

    # 关闭聚焦的窗口
    bindsym $mod+Shift+q kill

    # 运行启动器
    bindsym $mod+d exec $menu

    # 按修饰键和鼠标左键:拖动浮动窗口
    # 按修饰键和鼠标右键:调整窗口大小
    #
    floating_modifier $mod normal

    # 重载配置
    bindsym $mod+Shift+c reload

    # 退出 Sway (注销 Wayland 会话)
    bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
#
# 移动:
#
    # 移动聚焦
    bindsym $mod+$left focus left
    bindsym $mod+$down focus down
    bindsym $mod+$up focus up
    bindsym $mod+$right focus right
    # 或使用 $mod+[up|down|left|right]
    bindsym $mod+Left focus left
    bindsym $mod+Down focus down
    bindsym $mod+Up focus up
    bindsym $mod+Right focus right

    # 移动聚焦的窗口
    bindsym $mod+Shift+$left move left
    bindsym $mod+Shift+$down move down
    bindsym $mod+Shift+$up move up
    bindsym $mod+Shift+$right move right
    # 同上,使用方向键
    bindsym $mod+Shift+Left move left
    bindsym $mod+Shift+Down move down
    bindsym $mod+Shift+Up move up
    bindsym $mod+Shift+Right move right

    # 移动聚焦的窗口:左上角|中央 (浮动模式)
    bindsym $mod+y move position 5 5
    bindsym $mod+m move position center
#
# 工作区:
#
    # 切换到工作区
    bindsym $mod+1 workspace 1
    bindsym $mod+2 workspace 2
    bindsym $mod+3 workspace 3
    bindsym $mod+4 workspace 4
    bindsym $mod+5 workspace 5
    bindsym $mod+6 workspace 6
    bindsym $mod+7 workspace 7
    bindsym $mod+8 workspace 8
    bindsym $mod+9 workspace 9
    bindsym $mod+0 workspace 10
    # 移动聚焦的容器到工作区
    bindsym $mod+Shift+1 move container to workspace 1
    bindsym $mod+Shift+2 move container to workspace 2
    bindsym $mod+Shift+3 move container to workspace 3
    bindsym $mod+Shift+4 move container to workspace 4
    bindsym $mod+Shift+5 move container to workspace 5
    bindsym $mod+Shift+6 move container to workspace 6
    bindsym $mod+Shift+7 move container to workspace 7
    bindsym $mod+Shift+8 move container to workspace 8
    bindsym $mod+Shift+9 move container to workspace 9
    bindsym $mod+Shift+0 move container to workspace 10
    # 注意:工作区也能被命名,默认使用数字。
#
# 布局:
#
    # $mod+b 水平分屏
    # $mod+v 垂直分屏
    bindsym $mod+b splith
    bindsym $mod+v splitv

    # 在不同的布局样式之间切换
    bindsym $mod+s layout stacking
    bindsym $mod+w layout tabbed
    bindsym $mod+e layout toggle split

    # 全屏
    bindsym $mod+f fullscreen

    # 在平铺和浮动模式之间切换
    bindsym $mod+Shift+space floating toggle

    # 在平铺和浮动区域之间交换聚焦
    bindsym $mod+space focus mode_toggle

    # 移动聚焦到父容器
    bindsym $mod+a focus parent
#
# 暂存器:
#
    # 暂存器可以隐藏窗口

    # 移动聚焦的窗口到暂存器
    bindsym $mod+Shift+minus move scratchpad

    # 显示隐藏的暂存窗口
    bindsym $mod+minus scratchpad show
#
# 调整窗口大小:
#
mode "resize" {
    # left 缩小容器宽度
    # right 放大容器宽度
    # up 缩小容器高度
    # down 放大容器高度
    bindsym $left resize shrink width 10px
    bindsym $down resize grow height 10px
    bindsym $up resize shrink height 10px
    bindsym $right resize grow width 10px

    # 同上,使用方向键
    bindsym Left resize shrink width 10px
    bindsym Down resize grow height 10px
    bindsym Up resize shrink height 10px
    bindsym Right resize grow width 10px

    # 返回默认模式
    bindsym Return mode "default"
    bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# 重新调整窗口到 1280x720 (录屏)
bindsym $mod+n resize set 1280 720

#
# 其它:
#
# 锁屏
bindsym $mod+c exec "swaylock -f -c 000000"
# 启动 tmux
bindsym $mod+t exec "urxvtc -e sh -c tmuxen"
# 截图
# 使用 grim:全屏 / 选区 / 窗口 (https://github.com/emersion/grim)
bindsym Print exec --no-startup-id grim-wrapper
bindsym Shift+Print exec --no-startup-id "grim-wrapper -s"
bindsym Control+Print exec --no-startup-id "grim-wrapper -w"
# 录屏
# 使用 wf-recorder (https://github.com/ammen99/wf-recorder)
bindsym $mod+Shift+r exec --no-startup-id record-720p
bindsym $mod+Control+c exec --no-startup-id "pkill -f --signal INT wf-recorder"

#
# 状态栏:
#
bar {
    # 使用 Waybar (https://github.com/Alexays/Waybar)
    swaybar_command waybar
}

#
# 杂项:
#
# 主题和字体设置
exec_always {
    gsettings set $gnome-schema gtk-theme 'NumixSolarizedDarkBlue'
    gsettings set $gnome-schema icon-theme 'Papirus-Dark'
    gsettings set $gnome-schema cursor-theme 'Neutral_Plus'
    gsettings set $gnome-schema font-name 'FiraGO 9'
    gsettings set $gnome-schema monospace-font-name 'Fira Code 11'
}
# 边框设置
default_border pixel 2
default_floating_border pixel 2
# 间隙设置
gaps outer 5
gaps inner 5
# 隐藏光标 (5 秒)
seat * hide_cursor 5000

#
# 自动启动程序:
#
# 输入法
exec fcitx
# 终端
exec urxvtd -q -f -o
# 通知 (https://github.com/emersion/mako)
exec mako

# 导入配置片断
include /etc/sway/config.d/*

查看到 sway 窗口

image-20231103165622293

dracula 安装

1
yay -S dracula-gtk-theme

设置命令在 zshrc 中添加

1
2
3
gsettings set org.gnome.desktop.interface gtk-theme Dracula
gsettings set org.gnome.desktop.wm.preferences theme Dracula
gsettings set org.gnome.desktop.interface icon-theme "Dracula"

sway 配置解决 rofi 打开问题

1
2
3
4
您的/dev/rfkill文件缺失或损坏。您需要重新创建/dev/rfkill文件,它是一个特殊的字符设备,主设备号为10,次设备号为2422。您可以在WSL终端中输入sudo mknod /dev/rfkill c 10 242来创建该文件。
sudo mount -o remount,rw /tmp/.X11-unix

# mount -o remount,rw /tmp/.X11-unix

参考 i 文档

/tmp/.X11-unix is being mounted read-only · Issue #9303 · microsoft/WSL · GitHub

解决 fcitx5,不能使用的问题

1
2
3
4
5
6
7
8

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export SDL_IM_MODULE=fcitx
export GLFW_IM_MODULE=ibus

fcitx5 --disable=wayland -d  --verbose '*'=0

参考文档:

/tmp/.X11-unix is being mounted read-only · Issue #9303 · microsoft/WSL · GitHub

fcitx5

https://www.cnblogs.com/inshua/p/17446957.html

image-20231107160411564

Wayland 的作用是提供一个更加简单、安全和高效的显示服务器协议,用于替代传统的 X Window System。 Wayland 可以更好地支持现代的图形硬件和技术,如 OpenGL ES 和 Vulkan,从而提供更好的图形性能和用户体验。 Wayland 还可以减少延迟、提高帧率、降低 CPU 占用率、提高响应时间等。 Wayland 还可以让应用程序直接渲染,无需向显示服务器请求,从而提高灵活性和效率。 Wayland 还可以确保不同应用程序之间的隔离,从而提高系统的安全性和稳定性。 1234

Xwayland 和 /tmp/.X11-unix 是两个与 Linux 图形界面相关的概念。Xwayland 是一个在 Wayland 上运行 X11 应用程序的代理,它可以将 X11 协议转换为 Wayland 协议或相反,从而使旧的 X11 应用程序可以与基于 Wayland 的显示服务器一起工作12。/tmp/.X11-unix 是一个用于存放 X11 服务器监听的套接字的文件夹,它可以让不同的进程通过这个文件夹下的套接字连接到 X11 服务器34。Xwayland 和 /tmp/.X11-unix 的关系是,Xwayland 会在 /tmp/.X11-unix 下创建一个套接字,以便 X11 应用程序可以通过这个套接字连接到 Xwayland 的 X11 服务器,然后 Xwayland 会将 X11 应用程序的图形输出转换为 Wayland 协议,并发送给 Wayland 合成器12。这样,Xwayland 就可以在 Wayland 上提供一个 X11 的接口,让 X11 应用程序可以与 Wayland 应用程序共享同一个图形界面12

image-20231107172514175

解决下拉菜单不出现的方式

1
sudo mount -o remount,rw /tmp/.X11-unix
1
2
3
sudo umount /tmp/.X11-unix
ln -sf /mnt/wslg/.X11-unix/X0 /tmp/.X11-unix/
#这种方式解决了sway下menu打不开的。

输出环境如下

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
👉👉👉➡️ ➡️ ➡️  sway
00:00:00.086 [wlr] [types/wlr_drm_lease_v1.c:715] No DRM backend supplied, failed to create wlr_drm_lease_v1_manager
00:00:01.071 [sway/config/output.c:817] execvp failed: Permission denied
Environment variable $XDG_CURRENT_DESKTOP not set, ignoring.
Failed to set environment: Process org.freedesktop.systemd1 exited with status 1
Failed to import environment: Process org.freedesktop.systemd1 exited with status 1
I2023-11-14 15:18:56.779655 instance.cpp:1323] Override Enabled Addons: {}
I2023-11-14 15:18:56.779871 instance.cpp:1324] Override Disabled Addons: {}
libEGL warning: MESA-LOADER: failed to open vgem: /usr/lib/dri/vgem_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)

libEGL warning: failed to open /dev/dri/card0: Permission denied

Failed to initialize glamor, falling back to sw
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86CameraAccessEnable
> Warning:          Could not resolve keysym XF86CameraAccessDisable
> Warning:          Could not resolve keysym XF86CameraAccessToggle
> Warning:          Could not resolve keysym XF86NextElement
> Warning:          Could not resolve keysym XF86PreviousElement
> Warning:          Could not resolve keysym XF86AutopilotEngageToggle
> Warning:          Could not resolve keysym XF86MarkWaypoint
> Warning:          Could not resolve keysym XF86Sos
> Warning:          Could not resolve keysym XF86NavChart
> Warning:          Could not resolve keysym XF86FishingChart
> Warning:          Could not resolve keysym XF86SingleRangeRadar
> Warning:          Could not resolve keysym XF86DualRangeRadar
> Warning:          Could not resolve keysym XF86RadarOverlay
> Warning:          Could not resolve keysym XF86TraditionalSonar
> Warning:          Could not resolve keysym XF86ClearvuSonar
> Warning:          Could not resolve keysym XF86SidevuSonar
> Warning:          Could not resolve keysym XF86NavInfo
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
> Warning:          Could not resolve keysym XF86CameraAccessEnable
> Warning:          Could not resolve keysym XF86CameraAccessDisable
> Warning:          Could not resolve keysym XF86CameraAccessToggle
> Warning:          Could not resolve keysym XF86NextElement
> Warning:          Could not resolve keysym XF86PreviousElement
> Warning:          Could not resolve keysym XF86AutopilotEngageToggle
> Warning:          Could not resolve keysym XF86MarkWaypoint
> Warning:          Could not resolve keysym XF86Sos
> Warning:          Could not resolve keysym XF86NavChart
> Warning:          Could not resolve keysym XF86FishingChart
> Warning:          Could not resolve keysym XF86SingleRangeRadar
> Warning:          Could not resolve keysym XF86DualRangeRadar
> Warning:          Could not resolve keysym XF86RadarOverlay
> Warning:          Could not resolve keysym XF86TraditionalSonar
> Warning:          Could not resolve keysym XF86ClearvuSonar
> Warning:          Could not resolve keysym XF86SidevuSonar
> Warning:          Could not resolve keysym XF86NavInfo
Errors from xkbcomp are not fatal to the X server
I2023-11-14 15:18:59.446684 xcbconnection.cpp:185] Connecting to X11 display, display name::0.
I2023-11-14 15:18:59.446832 xcbconnection.cpp:190] X11 display: :0 is xwayland.
I2023-11-14 15:18:59.447037 addonmanager.cpp:193] Loaded addon xcb
I2023-11-14 15:18:59.874592 addonmanager.cpp:193] Loaded addon quickphrase
I2023-11-14 15:19:00.083601 addonmanager.cpp:193] Loaded addon imselector
I2023-11-14 15:19:00.447126 addonmanager.cpp:193] Loaded addon keyboard
I2023-11-14 15:19:00.619565 addonmanager.cpp:193] Loaded addon dbus
I2023-11-14 15:19:01.280432 addonmanager.cpp:193] Loaded addon fcitx4frontend
I2023-11-14 15:19:01.437476 addonmanager.cpp:193] Loaded addon ibusfrontend
I2023-11-14 15:19:01.662300 addonmanager.cpp:193] Loaded addon xim
I2023-11-14 15:19:01.866913 addonmanager.cpp:193] Loaded addon wayland
I2023-11-14 15:19:01.925270 addonmanager.cpp:193] Loaded addon dbusfrontend
I2023-11-14 15:19:01.968532 addonmanager.cpp:193] Loaded addon clipboard
I2023-11-14 15:19:02.130146 addonmanager.cpp:193] Loaded addon waylandim
I2023-11-14 15:19:02.219544 addonmanager.cpp:193] Loaded addon unicode
I2023-11-14 15:19:02.548363 addonmanager.cpp:193] Loaded addon pinyinhelper
I2023-11-14 15:19:03.390468 inputmethodmanager.cpp:198] Found 737 input method(s) in addon keyboard
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86CameraAccessEnable
> Warning:          Could not resolve keysym XF86CameraAccessDisable
> Warning:          Could not resolve keysym XF86CameraAccessToggle
> Warning:          Could not resolve keysym XF86NextElement
> Warning:          Could not resolve keysym XF86PreviousElement
> Warning:          Could not resolve keysym XF86AutopilotEngageToggle
> Warning:          Could not resolve keysym XF86MarkWaypoint
> Warning:          Could not resolve keysym XF86Sos
> Warning:          Could not resolve keysym XF86NavChart
> Warning:          Could not resolve keysym XF86FishingChart
> Warning:          Could not resolve keysym XF86SingleRangeRadar
> Warning:          Could not resolve keysym XF86DualRangeRadar
> Warning:          Could not resolve keysym XF86RadarOverlay
> Warning:          Could not resolve keysym XF86TraditionalSonar
> Warning:          Could not resolve keysym XF86ClearvuSonar
> Warning:          Could not resolve keysym XF86SidevuSonar
> Warning:          Could not resolve keysym XF86NavInfo
Errors from xkbcomp are not fatal to the X server
I2023-11-14 15:19:03.641356 addonmanager.cpp:193] Loaded addon kimpanel
I2023-11-14 15:19:03.746329 addonmanager.cpp:193] Loaded addon virtualkeyboard
I2023-11-14 15:19:04.799556 classicui.cpp:75] Created classicui for x11 display::0
I2023-11-14 15:19:04.799683 classicui.cpp:96] Created classicui for wayland display:
I2023-11-14 15:19:04.799820 addonmanager.cpp:193] Loaded addon classicui
I2023-11-14 15:19:04.938253 addonmanager.cpp:193] Loaded addon notificationitem
I2023-11-14 15:19:05.123780 addonmanager.cpp:193] Loaded addon notifications
I2023-11-14 15:19:05.803057 kimpanel.cpp:116] Kimpanel new owner:
I2023-11-14 15:19:05.803119 virtualkeyboard.cpp:223] VirtualKeyboard new owner:
I2023-11-14 15:19:06.203161 addonmanager.cpp:193] Loaded addon punctuation
[2023-11-14 15:19:06.315] [info] Using configuration file /home/xfhuang/.config/waybar/config
[2023-11-14 15:19:09.681] [info] Using CSS file /home/xfhuang/.config/waybar/style.css
basic_string::_M_create
[2023-11-14 15:19:10.274] [error] Can't open RFKILL control device
[2023-11-14 15:19:10.283] [warning] Can't resolve nl80211 interface
[2023-11-14 15:19:10.289] [warning] module temperature: Disabling module "temperature", Can't open /sys/class/thermal/thermal_zone0/temp
[2023-11-14 15:19:10.290] [warning] module backlight: Disabling module "backlight", No backlight found
[2023-11-14 15:19:10.368] [warning] No batteries.
[2023-11-14 15:19:11.453] [info] Bar configured (width: 1280, height: 30) for output: WL-1
I2023-11-14 15:19:15.169195 addonmanager.cpp:193] Loaded addon pinyin
I2023-11-14 15:19:15.212738 addonmanager.cpp:193] Loaded addon cloudpinyin
E2023-11-14 15:19:15.213328 portalsettingmonitor.cpp:115] DBus call error: org.freedesktop.DBus.Error.NoReply Method call timed out
I2023-11-14 15:19:15.213430 portalsettingmonitor.cpp:91] A new portal show up, start a new query.
E2023-11-14 15:19:15.215110 portalsettingmonitor.cpp:115] DBus call error: org.freedesktop.portal.Error.NotFound Requested setting not found
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
> Warning:          Could not resolve keysym XF86CameraAccessEnable
> Warning:          Could not resolve keysym XF86CameraAccessDisable
> Warning:          Could not resolve keysym XF86CameraAccessToggle
> Warning:          Could not resolve keysym XF86NextElement
> Warning:          Could not resolve keysym XF86PreviousElement
> Warning:          Could not resolve keysym XF86AutopilotEngageToggle
> Warning:          Could not resolve keysym XF86MarkWaypoint
> Warning:          Could not resolve keysym XF86Sos
> Warning:          Could not resolve keysym XF86NavChart
> Warning:          Could not resolve keysym XF86FishingChart
> Warning:          Could not resolve keysym XF86SingleRangeRadar
> Warning:          Could not resolve keysym XF86DualRangeRadar
> Warning:          Could not resolve keysym XF86RadarOverlay
> Warning:          Could not resolve keysym XF86TraditionalSonar
> Warning:          Could not resolve keysym XF86ClearvuSonar
> Warning:          Could not resolve keysym XF86SidevuSonar
> Warning:          Could not resolve keysym XF86NavInfo
Errors from xkbcomp are not fatal to the X server
00:00:41.871 [wlr] [xwayland/xwm.c:1522] xcb error: op ChangeWindowAttributes (no minor), code Window (no extension), sequence 172, value 8388633
00:00:43.245 [wlr] [xwayland/xwm.c:1522] xcb error: op ChangeProperty (no minor), code Window (no extension), sequence 187, value 8388622
Error: Invalid exec command (expected at least 1 argument, got 0)
00:00:59.350 [wlr] [xwayland/xwm.c:1522] xcb error: op ChangeWindowAttributes (no minor), code Window (no extension), sequence 214, value 8388633
00:01:02.215 [wlr] [xwayland/xwm.c:1522] xcb error: op ChangeProperty (no minor), code Window (no extension), sequence 217, value 8388622

jdk17 idea.vmoptions

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# custom IntelliJ IDEA VM options
-server
-Xms3G
-Xmx5G
-XX:ParallelGCThreads=14
-Dfile.encoding=UTF-8
# Enable ZGC
-XX:+UnlockExperimentalVMOptions
-XX:+UseZGC
# Jetbrins toolbox

# Other optimizations
-Dkotlinx.coroutines.debug=off
-Djdk.attach.allowAttachSelf=true
-XX:+OmitStackTraceInFastThrow
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:-HeapDumpOnOutOfMemoryError
-XX:CICompilerCount=12
# Enable IDEA on JDK 17
-Djdk.module.illegalAccess.silent=true
-Dsun.java2d.metal=true
--illegal-access=permit
--add-opens=java.desktop/java.awt.event=ALL-UNNAMED
--add-opens=java.desktop/sun.font=ALL-UNNAMED
--add-opens=java.desktop/java.awt=ALL-UNNAMED
--add-opens=java.desktop/sun.awt=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED
--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED
--add-opens=java.desktop/javax.swing=ALL-UNNAMED
--add-opens=java.desktop/sun.swing=ALL-UNNAMED
--add-opens=java.desktop/sun.lwawt.macosx=ALL-UNNAMED
--add-opens=java.desktop/sun.lwawt=ALL-UNNAMED
--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED
--add-opens=java.desktop/java.awt.peer=ALL-UNNAMED
--add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED
--add-opens=java.desktop/sun.awt.windows=ALL-UNNAMED
--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED
--add-opens=java.desktop/sun.java2d=ALL-UNNAMED
--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-opens=jdk.jdi/com.sun.tools.javac.code=ALL-UNNAMED
--add-opens=jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED
--add-opens=java.base/com.sun.tools.jdi=ALL-UNNAMED
--add-exports=java.desktop/sun.font=ALL-UNNAMED
--add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED
--add-exports=java.desktop/com.apple.laf=ALL-UNNAMED
--add-exports=java.desktop/com.apple.eawt.event=ALL-UNNAMED
--add-exports=java.desktop/sun.awt.image=ALL-UNNAMED
-XX:+IgnoreUnrecognizedVMOptions

windows 文件被其他进程使用,如何强制删除

image-20231130171455765

更新一下:

终于解决 wsl2 下 sway 的窗口太小,发现只需要设置 WSL-1 为 output 即可。 设置 waybar

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
    "layer": "top",
    "position": "top",
    "height": 24,
    "margin-left": 5,
    "margin-right": 5,
    "margin-top": 5,
    "modules-left": ["sway/workspaces"],
    "modules-center": [],
    "modules-right": ["network", "temperature", "cpu", "memory", "battery", "clock", "custom/japan"],
    "sway/workspaces": {
        "disable-scroll": true,
        "disable-click": true,
    },
    "tray": {
        "spacing": 10,
    },
    "clock": {
        "format": "{:%a %Y %b %d %R}"
    },
    "custom/japan": {
        "format": "{}",
        "exec": "TZ=America/Vancouver date \"+%H:%M %Z\"",
        "interval": 30,
    },
    "custom/germany": {
        "format": "{}",
        "exec": "TZ=Europe/Berlin date \"+%H:%M %Z\"",
        "interval": 30,
    },
    "cpu": {
        "format": " {usage}%"
    },
    "memory": {
        "format": " {}%"
    },
    "temperature": {
        "critical-threshold": 75,
        "format": " {temperatureC}°C"
    },
    "battery": {
        "bat": "BAT0",
        "full-at": 95,
        "states": {
            "good": 95,
            "warning": 30,
            "critical": 15
        },
        "format": "{icon} {capacity}%",
        "format-icons": ["", "", "", "", ""]
    },
    "network": {
        "format-wifi": " {essid}",
        "format-disconnected": "⚠ Disconnected"
    },
    "pulseaudio": {
        "format": "{icon} {volume}%",
        "format-muted": "",
        "format-icons": {
            "headphones": "",
            "default": ["", ""]
        },
        "on-click": "pavucontrol"
    },
}

来看看 fastfetch 展示的样子 image.png ![[image-20240910150015320.png]]

重新回归 sway 怀抱 image.png ![[image-20240910150054796.png]]

image.png ![[image-20240910150725495.png]]

(✧∀✧)

Licensed under CC BY-NC-SA 4.0
最后更新于 Jan 06, 2025 05:52 UTC
comments powered by Disqus
Built with Hugo
主题 StackJimmy 设计
Caret Up