mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
chezmoi: windows migration dir
This commit is contained in:
parent
52b70819bf
commit
c24adf35d4
51 changed files with 3403 additions and 3840 deletions
17
home/dot_config/systemd/user/symlink-wayland-socket.service
Normal file
17
home/dot_config/systemd/user/symlink-wayland-socket.service
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# NOTE: FOR WSL ONLY
|
||||
# https://github.com/microsoft/WSL/issues/11261
|
||||
# ~/.config/systemd/user/symlink-wayland-socket.service
|
||||
# Usage:
|
||||
# systemctl --user enable symlink-wayland-socket.service
|
||||
# Cannot use GUI apps/tools as Wayland socket doesn't exist in `XDG_RUNTIME_DIR`
|
||||
|
||||
[Unit]
|
||||
Description=Symlink Wayland socket to XDG_RUNTIME_DIR
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/ln -s /mnt/wslg/runtime-dir/wayland-0 $XDG_RUNTIME_DIR
|
||||
ExecStart=/usr/bin/ln -s /mnt/wslg/runtime-dir/wayland-0.lock $XDG_RUNTIME_DIR
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
|
@ -16,7 +16,7 @@ case "$(uname)" in
|
|||
if grep -q Microsoft /proc/version || [[ -n "$WSL_DISTRO_NAME" ]]; then
|
||||
# WSL-specific configuration
|
||||
export IS_WSL=true
|
||||
source $DOTFILES/platforms/wsl/winterop.zsh
|
||||
source $DOTFILES/home/dot_config/zsh/winterop.zsh
|
||||
else
|
||||
# Native Linux configuration
|
||||
if [ -n "$WAYLAND_DISPLAY" ]; then
|
||||
|
|
|
|||
30
home/dot_config/zsh/winterop.zsh
Normal file
30
home/dot_config/zsh/winterop.zsh
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# $DOTFILES/platforms/wsl/winterop.zsh
|
||||
# Sourced by $DOTFILES/platforms/wsl/zshrc 在 $DOTFILES/platforms/wsl/zshrc 中被引用
|
||||
|
||||
# Defines the interop commands between WSL and Windows
|
||||
|
||||
export FILE_EXPLORER="explorer.exe" # Directory Opus
|
||||
|
||||
alias psw="tasklist.exe"
|
||||
alias killw="taskkill.exe"
|
||||
alias shutdownw="shutdown.exe /s /t 0"
|
||||
alias rebootw="shutdown.exe /r /t 0"
|
||||
alias ipconfig="ipconfig.exe"
|
||||
alias netstatw="netstat.exe"
|
||||
alias diskpart="diskpart.exe"
|
||||
alias winget="winget.exe"
|
||||
alias pastew='pwsh.exe -NoProfile -Command "Get-Clipboard"'
|
||||
alias ollama="ollama.exe"
|
||||
# https://github.com/stuartleeks/wsl-notify-send
|
||||
alias notify-send="wsl-notify-send.exe"
|
||||
|
||||
# WSL open
|
||||
open() {
|
||||
local target=$1
|
||||
|
||||
if command -v "$FILE_EXPLORER" >/dev/null 2>&1; then
|
||||
"$FILE_EXPLORER" "$target"
|
||||
else
|
||||
command open "$target"
|
||||
fi
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue