This commit is contained in:
2026-06-03 01:22:16 +02:00
parent 8aa0d0ff61
commit b3194e66e2
13 changed files with 90 additions and 34 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
theme = "catppuccin_mocha"
[editor]
default-yank-register = "+"
# default-yank-register = "+"
shell = ["bash", "-c"]
line-number = "relative"
indent-guides.render = true
@@ -97,3 +97,12 @@ window-rule {
// open-maximized-to-edges true
// open-on-output "HDMI-A-1"
}
// Steam toasts
window-rule {
match app-id="^steam$" title=r#"^notificationtoasts_\d+_desktop$"#
open-floating true
open-focused false
default-floating-position x=2 y=3 relative-to="bottom-right"
}
+17 -8
View File
@@ -1,17 +1,26 @@
[Settings]
gtk-theme-name=catppuccin-mocha-blue-standard+default
gtk-icon-theme-name=Papirus
gtk-font-name=Sarasa UI SC 10
gtk-application-prefer-dark-theme=true
gtk-button-images=true
gtk-cursor-blink=true
gtk-cursor-blink-time=1000
gtk-cursor-theme-name=Bibata-Modern-Ice
gtk-cursor-theme-size=24
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=0
gtk-decoration-layout=icon:minimize,maximize,close
gtk-enable-animations=true
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=0
gtk-font-name=Sarasa UI SC, 10
gtk-icon-theme-name=Papirus
gtk-menu-images=true
gtk-modules=colorreload-gtk-module:appmenu-gtk-module
gtk-primary-button-warps-slider=true
gtk-shell-shows-menubar=1
gtk-sound-theme-name=ocean
gtk-theme-name=catppuccin-mocha-blue-standard+default
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-toolbar-style=3
gtk-xft-antialias=1
gtk-xft-dpi=122880
gtk-xft-hinting=1
gtk-xft-hintstyle=hintslight
gtk-xft-rgba=rgb
gtk-application-prefer-dark-theme=1
+11 -4
View File
@@ -1,7 +1,14 @@
[Settings]
gtk-theme-name=catppuccin-mocha-blue-standard+default
gtk-icon-theme-name=Papirus
gtk-font-name=Sarasa UI SC 10
gtk-application-prefer-dark-theme=true
gtk-cursor-blink=true
gtk-cursor-blink-time=1000
gtk-cursor-theme-name=Bibata-Modern-Ice
gtk-cursor-theme-size=24
gtk-application-prefer-dark-theme=1
gtk-decoration-layout=icon:minimize,maximize,close
gtk-enable-animations=true
gtk-font-name=Sarasa UI SC, 10
gtk-icon-theme-name=Papirus
gtk-primary-button-warps-slider=true
gtk-sound-theme-name=ocean
gtk-theme-name=catppuccin-mocha-blue-standard+default
gtk-xft-dpi=122880
+13 -8
View File
@@ -72,7 +72,6 @@ cleanup() {
}
trap cleanup EXIT INT TERM
# --- Nested Partition Logic ---
OUTER_MOUNT_POINT=""
handle_nested_partition() {
local uuid="$1"
@@ -89,14 +88,20 @@ handle_nested_partition() {
echo "[INFO] Found outer device: $outer_device" >&2
# Create a temporary mount point for the outer partition
OUTER_MOUNT_POINT=$(mktemp -d -t luks_outer_XXXXXX)
# Check if already mounted
if findmnt -n "$outer_device" >/dev/null; then
echo "[INFO] Outer device is already mounted." >&2
OUTER_MOUNT_POINT=$(findmnt -n -o TARGET "$outer_device")
else
# Create a temporary mount point for the outer partition
OUTER_MOUNT_POINT=$(mktemp -d -t luks_outer_XXXXXX)
echo "[INFO] Mounting outer device to $OUTER_MOUNT_POINT..." >&2
if ! sudo mount "$outer_device" "$OUTER_MOUNT_POINT"; then
echo "[ERROR] Failed to mount outer device." >&2
rmdir "$OUTER_MOUNT_POINT"
exit 1
echo "[INFO] Mounting outer device to $OUTER_MOUNT_POINT..." >&2
if ! sudo mount "$outer_device" "$OUTER_MOUNT_POINT"; then
echo "[ERROR] Failed to mount outer device." >&2
rmdir "$OUTER_MOUNT_POINT"
exit 1
fi
fi
local luks_image="$OUTER_MOUNT_POINT/$NESTED_path"
+9 -7
View File
@@ -2,15 +2,15 @@
set -euo pipefail
[[ "$XDG_CURRENT_DESKTOP" != "niri" ]] && exit 1
# [[ "$XDG_CURRENT_DESKTOP" != "niri" ]] && exit 1
# if grep -q 'prefer_order=(nvidia intel)' "$HOME/.local/snippets/set_display"; then
if grep -q '[^[:space:]]' "$HOME/.config/niri/config/prime.kdl"; then
# sed -i 's/prefer_order=(nvidia intel)/prefer_order=(intel nvidia)/' "$HOME/.local/snippets/set_display"
sed -i -E 's/prefer_order=\([^)]*\)/prefer_order=(intel nvidia)/' "$HOME/.local/snippets/set_display"
echo "" >"$HOME/.config/niri/config/prime.kdl"
echo "Disabled global Nvidia Prime offloading."
else
# sed -i 's/prefer_order=(intel nvidia)/prefer_order=(nvidia intel)/' "$HOME/.local/snippets/set_display"
sed -i -E 's/prefer_order=\([^)]*\)/prefer_order=(nvidia intel)/' "$HOME/.local/snippets/set_display"
cat >"$HOME/.config/niri/config/prime.kdl" <<EOF
environment {
__NV_PRIME_RENDER_OFFLOAD "1"
@@ -23,8 +23,10 @@ fi
# Restart session
printf "Session restart is required to apply changes.\nDo it now? (Y/n): "
read -r answer
if [[ "$answer" =~ ^[Yy]$ || -z "$answer" ]]; then
niri msg action quit
if [[ $XDG_CURRENT_DESKTOP == niri ]]; then
printf "Session restart is required to apply changes.\nDo it now? (Y/n): "
read -r answer
if [[ $answer =~ ^[Yy]$ || -z $answer ]]; then
niri msg action quit
fi
fi
-46
View File
@@ -1,46 +0,0 @@
#!/bin/sh
# Description:
# Mount a WSL VHDX file to a specified mount point using guestmount.
#
# Requirements:
# - libguestfs-tools
# - sudo privileges
#
# Memo:
# - set `LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1` to show details when guestmount fails.
# - A common issue is that the VHDX file has logs that needs to be "replayed".
# This can be done using `qemu-img check -r all <VHDX_PATH>`
[ "$(id -u)" -eq 0 ] && {
echo "Do not run this script in sudo mode."
exit 1
}
[ -z "$1" ] && echo "Usage: $0 <VHDX_PATH>" && exit 1
vhdx_path="$1"
[ -z "$2" ] && mount_point="/mnt/wsl" || mount_point="$2"
[ -d "$mount_point" ] || sudo mkdir -p "$mount_point"
username=$(whoami)
sudo chown "$username:$username" "$mount_point"
export LIBGUESTFS_BACKEND=direct
# replay log
# qemu-img check -r all "$VHDX_PATH" || {
# echo "Failed to check VHDX file."
# exit 1
# }
guestmount --add "$vhdx_path" --inspector --ro "$mount_point" || {
echo "Failed to mount VHDX file."
exit 1
}
echo "Successfully mounted $vhdx_path to $mount_point"
+2 -1
View File
@@ -17,7 +17,8 @@
},
"theme": {
"dark": {
"name": "catppuccin-mocha"
"name": "catppuccin-mocha",
"icon_theme": "Papirus"
}
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ prepend_keymap = [
{ on = [
"#",
"#",
], run = "plugin yamb jump_by_fzf", desc = "Jump bookmark by fzf" },
], run = "plugin yamb jump_by_key", desc = "Jump bookmark by key" },
{ on = [
"#",
"r",
+2 -2
View File
@@ -1,11 +1,11 @@
[[plugin.deps]]
use = "yazi-rs/plugins:git"
rev = "5d5c480"
rev = "598cdb6"
hash = "88e56a64b7ce7c4314427452343fef17"
[[plugin.deps]]
use = "yazi-rs/plugins:smart-enter"
rev = "5d5c480"
rev = "598cdb6"
hash = "187cc58ba7ac3befd49c342129e6f1b6"
[[plugin.deps]]