VJWQP4DXJRA4UJRYBWIRFT5T76ZO6KE2IQCLAO5EAXWOZH2LRAVQC
local wezterm = require("wezterm")
local color_scheme = "CLRS"
local start_dir = "~"
if wezterm.target_triple == "x86_64-pc-windows-msvc" then
start_dir = "B:"
color_scheme = "Tomorrow Night Burns"
end
local launch_menu = {}
if wezterm.home_dir == "/home/hieuhg" then
table.insert(launch_menu, {
label = "s",
args = { "sh", "-c", "ssh -At setup 'tmux -u a -d || exec tmux -u'" },
})
table.insert(launch_menu, {
label = "v",
cwd = "/home/hieuhg/cc/staff-vpn-2025",
args = { "sh", "-c", "doas openvpn staff_ca_2025.ovpn" },
})
table.insert(launch_menu, {
label = "i",
cwd = "/home/hieuhg/cc/ipmi/jre/bin",
args = { "./java", "-jar", "../../IPMIView20.jar" },
})
else
table.insert(launch_menu, {
label = "map",
args = { "ssh", "map-v6", "tmux", "-u", "a", "-d" },
})
end
local keys = {
{ key = "phys:K", mods = "CTRL|SHIFT", action = wezterm.action{SpawnTab="CurrentPaneDomain"} },
{ key = ",", mods = "CTRL|SHIFT", action = wezterm.action{CloseCurrentTab={confirm=true}} },
{ key = "phys:I", mods = "CTRL|SHIFT", action = wezterm.action{CopyTo="Clipboard"} },
{ key = ".", mods = "CTRL|SHIFT", action = wezterm.action{PasteFrom="Clipboard"} },
{ key = "phys:H", mods = "CTRL|SHIFT", action = "ShowLauncher" },
}
return {
enable_scroll_bar = true,
color_scheme = color_scheme,
font = wezterm.font_with_fallback({"monospace", "Cascadia Code",}),
font_size = 9.0,
default_cwd = start_dir,
default_prog = { "/home/hieuhg/run/nu" },
keys = keys,key_map_preference = "Physical",
launch_menu = launch_menu,
use_ime = false,
}
mkdir -p ~/.config/{emacs,pijul,wezterm,fish,environment.d,i3,nushell,rclone,tridactylrc}/
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(auth-source-save-behavior nil)
'(blink-cursor-mode nil)
'(custom-safe-themes
'("dad40020beea412623b04507a4c185079bff4dcea20a93d8f8451acb6afc8358" "c414f69a02b719fb9867b41915cb49c853489930be280ce81385ff7b327b4bf6" "74a50f18c8c88eac44dc73d7a4c0bbe1f3e72ff5971aac38fcf354ddad0d4733" "aa72e5b41780bfff2ff55d0cc6fcd4b42153386088a4025fed606c1099c2d9b8" "5d6cc3e22172f051d68c0c95d79f3dff0e800f2d107f6f6b9220ed5380285c50" "6fc03df7304728b1346091dd6737cb0379f348ddc9c307f8b410fba991b3e475" "7397cc72938446348521d8061d3f2e288165f65a2dbb6366bb666224de2629bb" "fede08d0f23fc0612a8354e0cf800c9ecae47ec8f32c5f29da841fe090dfc450" "93268bf5365f22c685550a3cbb8c687a1211e827edc76ce7be3c4bd764054bad" default))
'(desktop-save-mode t)
'(repeat-mode t)
'(indent-tabs-mode nil)
'(menu-bar-mode t)
'(package-selected-packages
'(markdown-mode markdownfmt mermaid-mode tree-sitter-langs json-mode eglot rust-mode go-mode jinja2-mode dockerfile-mode company-shell groovy-mode rainbow-delimiters yaml-mode modus-themes magit-delta use-package))
'(require-final-newline 't)
'(rust-format-on-save t)
'(safe-local-variable-values '((markdownfmt-enable-on-save . t)))
'(show-trailing-whitespace t)
'(tool-bar-mode nil)
'(use-package-always-ensure t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(package-install 'use-package)
(use-package magit-delta
:bind ("C-x g" . #'magit-status)
:config (add-hook 'magit-mode-hook #'magit-delta-mode))
(use-package rainbow-delimiters
:config (add-hook 'prog-mode-hook #'rainbow-delimiters-mode))
(use-package tree-sitter
:config (global-tree-sitter-mode))
(use-package tree-sitter-langs
:config (add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))
;; (custom-set-variables '(font-lock-support-mode 'tree-sitter-lock-mode))
(use-package markdown-mode)
(use-package markdownfmt) ; go get -u github.com/shurcooL/markdownfmt
(use-package yaml-mode)
(use-package json-mode)
;; (use-package lsp-mode
;; :config (setq lsp-rust-server 'rust-analyzer))
(use-package eglot
:config (add-to-list 'eglot-server-programs '(rust-mode . ("rust-analyzer")))
)
(global-set-key [remap dabbrev-expand] #'hippie-expand)
(use-package rust-mode
:config (add-hook 'rust-mode-hook #'eglot))
(use-package modus-themes
:config (load-theme 'modus-operandi t))
(add-to-list 'magic-mode-alist '("^$TTL" . zone-mode))
(add-to-list 'magic-mode-alist '("^$ORIGIN" . zone-mode))
; (desktop-read)
(server-start)