added some stuff i need

This commit is contained in:
2026-02-27 10:41:45 -05:00
parent 19a8b335d9
commit 3e07d1558c
8 changed files with 621 additions and 0 deletions

63
alacritty/alacritty.toml Normal file
View File

@@ -0,0 +1,63 @@
[terminal.shell]
program = "pwsh.exe"
[font]
size = 10.0
[font.normal]
family = "MesloLGM Nerd Font"
style = "Regular"
[font.bold]
family = "MesloLGM Nerd Font"
style = "Bold"
[font.italic]
family = "MesloLGM Nerd Font"
style = "Italic"
# Fleury Theme - Alacritty Configuration
[colors.primary]
background = "#020202"
foreground = "#b99468"
[colors.cursor]
text = "#020202"
cursor = "#fcaa05"
[colors.vi_mode_cursor]
text = "#020202"
cursor = "#f0c674"
[colors.selection]
text = "#b99468"
background = "#303040"
[colors.search.matches]
foreground = "#020202"
background = "#fcaa05"
[colors.search.focused_match]
foreground = "#020202"
background = "#f0c674"
[colors.normal]
black = "#121212"
red = "#dc7575"
green = "#66bc11"
yellow = "#edb211"
blue = "#2895c7"
magenta = "#f0500c"
cyan = "#8ffff2"
white = "#9ba290"
[colors.bright]
black = "#404040"
red = "#ff0000"
green = "#66bc11"
yellow = "#f0bb0c"
blue = "#2f2f38"
magenta = "#f0500c"
cyan = "#8ffff2"
white = "#b99468"

83
emacs/init.el Normal file
View File

@@ -0,0 +1,83 @@
;; this is my current emacs config -subwafer
;; melpa stuff
(require 'package)
;; Add MELPA to the list of package archives
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
;; Initialize the package system
(package-initialize)
;; Optional: refresh package list if needed
(unless package-archive-contents
(package-refresh-contents))
(defun rc/get-default-font ()
(cond
((eq system-type 'windows-nt) "CaskaydiaMono Nerd Font")
((eq system-type 'gnu-linux) "CaskaydiaMono Nerd Font")))
;;(load-theme 'tsdh-dark t)
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
;;(load-theme 'ayu-dark t)
(load-theme 'fleury t)
; ui
(tool-bar-mode 0)
(menu-bar-mode 0)
(scroll-bar-mode 0)
(show-paren-mode 1)
(setq display-line-numbers-type 'relative)
(global-display-line-numbers-mode 1)
(setq-default fill-column 80)
(global-display-fill-column-indicator-mode 1)
; theme related
(set-frame-parameter (selected-frame) 'alpha '(95 . 95))
(setq initial-scratch-message "")
(setq-default inhibit-splash-screen t
make-backup-files nil)
(setq-default mode-line-format
(list
" "
'mode-line-buffer-identification
" "
'mode-line-position
" "
'mode-name))
;;; ido
(require 'ido-completing-read+)
(ido-mode 1)
(ido-everywhere 1)
(ido-ubiquitous-mode 1)
(setq ido-auto-merge-work-directories-length -1) ;; dont merge directories
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "C-c C-c M-x") 'execute-extended-command)
(recentf-mode 1) ;; enable recent files tracking
(setq recentf-max-menu-items 25) ;; optional: how many files to track
(global-set-key (kbd "C-x r") 'recentf-open-files)
(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.
'(package-selected-packages '(markdown-mode smex ido-completing-read+)))
(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.
)

View File

@@ -0,0 +1,72 @@
;;; ayu-dark-theme.el --- Ayu dark -*- lexical-binding: t; -*-
;; SPDX-License-Identifier: MIT
;; URL: https://github.com/vutran1710/Ayu-Theme-Emacs
;; Package-Version: 1.0
;; Package-Requires: ((emacs "24.1"))
;;; Commentary:
;; Auy dark
;;; Code:
(deftheme ayu-dark
"Created 2018-05-06. An emacs-port of the dark verions of the amazing Ayu-theme")
(custom-theme-set-faces
'ayu-dark
'(default ((t (:foreground "#c3c0bb" :background "#000919" ))))
'(cursor ((t (:background "DarkOrange1"))))
'(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown"))))
'(minibuffer-prompt ((t (:foreground "#9DA5B4"))))
'(highlight ((t (:background "#3E4451"))))
'(region ((t (:background "#3E4451"))))
'(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50")) (((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70")) (((class color) (min-colors 8) (background light)) (:foreground "green")) (((class color) (min-colors 8) (background dark)) (:foreground "yellow"))))
'(secondary-selection ((t (:background "#121417"))))
'(trailing-whitespace ((((class color) (background light)) (:background "red1")) (((class color) (background dark)) (:background "red1")) (t (:inverse-video t))))
'(font-lock-builtin-face ((t (:foreground "DeepSkyBlue1"))))
'(font-lock-comment-delimiter-face ((t (:inherit (font-lock-comment-face)))))
'(font-lock-comment-face ((t (:foreground "#5C6370"))))
'(font-lock-constant-face ((t (:foreground "#01fcff"))))
'(font-lock-doc-face ((t (:inherit (font-lock-string-face)))))
'(font-lock-function-name-face ((t (:foreground "#00bbea"))))
'(font-lock-keyword-face ((t (:foreground "#ff6503"))))
'(font-lock-negation-char-face ((t nil)))
'(font-lock-preprocessor-face ((t (:foreground "#828997"))))
'(font-lock-regexp-grouping-backslash ((t (:inherit (bold)))))
'(font-lock-regexp-grouping-construct ((t (:inherit (bold)))))
'(font-lock-string-face ((t (:slant italic :foreground "#bfe438"))))
'(font-lock-type-face ((t (:foreground "#eec900"))))
'(font-lock-variable-name-face ((t (:foreground "#9ba0a9"))))
'(font-lock-warning-face ((t (:weight bold :foreground "#5C6370"))))
'(button ((t (:inherit (link)))))
'(link ((t (:weight bold :underline (:color foreground-color :style line) :foreground "#61AFEF"))))
'(link-visited ((t (:weight normal :underline (:color foreground-color :style line) :foreground "#61AFEF"))))
'(fringe ((t (:background "black"))))
'(header-line ((t (:box nil :foreground "grey90" :background "grey20" :inherit (mode-line)))))
'(tooltip ((t (:foreground "black" :background "lightyellow" :inherit (variable-pitch)))))
'(mode-line ((t (:box (:line-width 1 :color "#181A1F" :style nil) :foreground "#9DA5B4" :background "#21252B"))))
'(mode-line-buffer-id ((t (:weight bold))))
'(mode-line-emphasis ((t (:weight bold))))
'(mode-line-highlight ((((class color) (min-colors 88)) (:box (:line-width 2 :color "grey40" :style released-button))) (t (:inherit (highlight)))))
'(mode-line-inactive ((t (:box (:line-width 1 :color "#181A1F" :style nil) :foreground "#3E4451" :background "#181A1F"))))
'(isearch ((t (:foreground "#282C34" :background "#C678DD"))))
'(isearch-fail ((t (:foreground "#BE5046"))))
'(lazy-highlight ((t (:underline (:color "#C678DD" :style line) :foreground "#C678DD" :background "#121417"))))
'(match ((((class color) (min-colors 88) (background light)) (:background "yellow1")) (((class color) (min-colors 88) (background dark)) (:background "RoyalBlue3")) (((class color) (min-colors 8) (background light)) (:foreground "black" :background "yellow")) (((class color) (min-colors 8) (background dark)) (:foreground "white" :background "blue")) (((type tty) (class mono)) (:inverse-video t)) (t (:background "gray"))))
'(next-error ((t (:inherit (region)))))
'(query-replace ((t (:inherit (isearch)))))
'(linum-highlight-face ((t (:foreground "gray70"))))
'(linum ((t (:foreground "gray30")))))
;;;###autoload
(and load-file-name
(add-to-list 'custom-theme-load-path
(file-name-as-directory
(file-name-directory load-file-name))))
(provide-theme 'ayu-dark)
;;; ayu-dark-theme.el ends here

View File

@@ -0,0 +1,72 @@
/;;; ayu-dark-theme.el --- Ayu dark -*- lexical-binding: t; -*-
;; SPDX-License-Identifier: MIT
;; URL: https://github.com/vutran1710/Ayu-Theme-Emacs
;; Package-Version: 1.0
;; Package-Requires: ((emacs "24.1"))
;;; Commentary:
;; Auy dark
;;; Code:
(deftheme ayu-dark
"Created 2018-05-06. An emacs-port of the dark verions of the amazing Ayu-theme")
(custom-theme-set-faces
'ayu-dark
'(default ((t (:foreground "#c3c0bb" :background "#000919" ))))
'(cursor ((t (:background "DarkOrange1"))))
'(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown"))))
'(minibuffer-prompt ((t (:foreground "#9DA5B4"))))
'(highlight ((t (:background "#3E4451"))))
'(region ((t (:background "#3E4451"))))
'(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50")) (((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70")) (((class color) (min-colors 8) (background light)) (:foreground "green")) (((class color) (min-colors 8) (background dark)) (:foreground "yellow"))))
'(secondary-selection ((t (:background "#121417"))))
'(trailing-whitespace ((((class color) (background light)) (:background "red1")) (((class color) (background dark)) (:background "red1")) (t (:inverse-video t))))
'(font-lock-builtin-face ((t (:foreground "DeepSkyBlue1"))))
'(font-lock-comment-delimiter-face ((t (:inherit (font-lock-comment-face)))))
'(font-lock-comment-face ((t (:foreground "#5C6370"))))
'(font-lock-constant-face ((t (:foreground "#01fcff"))))
'(font-lock-doc-face ((t (:inherit (font-lock-string-face)))))
'(font-lock-function-name-face ((t (:foreground "#00bbea"))))
'(font-lock-keyword-face ((t (:foreground "#ff6503"))))
'(font-lock-negation-char-face ((t nil)))
'(font-lock-preprocessor-face ((t (:foreground "#828997"))))
'(font-lock-regexp-grouping-backslash ((t (:inherit (bold)))))
'(font-lock-regexp-grouping-construct ((t (:inherit (bold)))))
'(font-lock-string-face ((t (:slant italic :foreground "#bfe438"))))
'(font-lock-type-face ((t (:foreground "#eec900"))))
'(font-lock-variable-name-face ((t (:foreground "#9ba0a9"))))
'(font-lock-warning-face ((t (:weight bold :foreground "#5C6370"))))
'(button ((t (:inherit (link)))))
'(link ((t (:weight bold :underline (:color foreground-color :style line) :foreground "#61AFEF"))))
'(link-visited ((t (:weight normal :underline (:color foreground-color :style line) :foreground "#61AFEF"))))
'(fringe ((t (:background "black"))))
'(header-line ((t (:box nil :foreground "grey90" :background "grey20" :inherit (mode-line)))))
'(tooltip ((t (:foreground "black" :background "lightyellow" :inherit (variable-pitch)))))
'(mode-line ((t (:box (:line-width 1 :color "#181A1F" :style nil) :foreground "#9DA5B4" :background "#21252B"))))
'(mode-line-buffer-id ((t (:weight bold))))
'(mode-line-emphasis ((t (:weight bold))))
'(mode-line-highlight ((((class color) (min-colors 88)) (:box (:line-width 2 :color "grey40" :style released-button))) (t (:inherit (highlight)))))
'(mode-line-inactive ((t (:box (:line-width 1 :color "#181A1F" :style nil) :foreground "#3E4451" :background "#181A1F"))))
'(isearch ((t (:foreground "#282C34" :background "#C678DD"))))
'(isearch-fail ((t (:foreground "#BE5046"))))
'(lazy-highlight ((t (:underline (:color "#C678DD" :style line) :foreground "#C678DD" :background "#121417"))))
'(match ((((class color) (min-colors 88) (background light)) (:background "yellow1")) (((class color) (min-colors 88) (background dark)) (:background "RoyalBlue3")) (((class color) (min-colors 8) (background light)) (:foreground "black" :background "yellow")) (((class color) (min-colors 8) (background dark)) (:foreground "white" :background "blue")) (((type tty) (class mono)) (:inverse-video t)) (t (:background "gray"))))
'(next-error ((t (:inherit (region)))))
'(query-replace ((t (:inherit (isearch)))))
'(linum-highlight-face ((t (:foreground "gray70"))))
'(linum ((t (:foreground "gray30")))))
;;;###autoload
(and load-file-name
(add-to-list 'custom-theme-load-path
(file-name-as-directory
(file-name-directory load-file-name))))
(provide-theme 'ayu-dark)
;;; ayu-dark-theme.el ends here

View File

@@ -0,0 +1,148 @@
;;; fleury-theme.el --- The fleury color theme
;; Copyright (C) 2025 Shams Parvez Arka
;; See end of file for extended copyright information
;; Author : Shams Parvez Arka <parvez6826@gmail.com>
;; URL : https://github.com/ShamsParvezArka/fleury-theme.el
;; Version : 0.5
;; Commentary: "Coming up with an original idea in 21st century
;; is tough, even my dreams aren't original anymore!"
(deftheme fleury "The fleury color theme")
;; Color palette
(let ((rich-black "#020202")
(light-bronze "#b99468")
(charcoal-gray "#212121")
(charcoal-gray-lite "#1e1e1e")
(gunmetal-blue "#303040")
(dark-slate "#222425")
(amber-gold "#fcaa05")
(medium-gray "#404040")
(jet-black "#121212")
(dim-gray "#666666")
(goldenrod "#f0c674")
(bright-orange "#ffaa00")
(dusty-rose "#dc7575")
(sunflower-yellow "#edb211")
(burnt-orange "#de451f")
(sky-blue "#2895c7")
(sky-blue-lite "#2f2f38")
(bright-red "#ff0000")
(fresh-green "#66bc11")
(lime-green "#003939")
(vivid-vermilion "#f0500c")
(golden-yellow "#f0bb0c")
(pure-black "#000000")
(aqua-ice "#8ffff2")
(dusty-sage "#9ba290")
(coffee-brown "#63523d")
(mode-line-foreground-active "#e7aa4d")
(mode-line-background-active "#1a120b")
(mode-line-border "#161616")
)
(custom-theme-set-faces
'fleury
;; UI Elements
`(default ((t (:background ,rich-black :foreground ,light-bronze))))
`(cursor ((t (:background ,fresh-green))))
`(region ((t (:background ,lime-green))))
`(highlight ((t (:background ,charcoal-gray-lite))))
`(fringe ((t (:background ,dark-slate))))
`(vertical-border ((t (:foreground ,dark-slate))))
`(minibuffer-prompt ((t (:foreground ,amber-gold :weight bold))))
;; Line Numbers
`(line-number ((t (:foreground ,medium-gray :background ,rich-black))))
`(line-number-current-line ((t (:background ,charcoal-gray-lite :foreground ,light-bronze))))
;; Font Lock Faces
`(font-lock-comment-face ((t (:foreground ,dim-gray))))
`(font-lock-keyword-face ((t (:foreground ,goldenrod))))
`(font-lock-string-face ((t (:foreground ,bright-orange))))
`(font-lock-constant-face ((t (:foreground ,bright-orange))))
`(font-lock-builtin-face ((t (:foreground ,dusty-rose))))
`(font-lock-preprocessor-face ((t (:foreground,dusty-rose))))
`(font-lock-type-face ((t (:foreground ,sunflower-yellow))))
`(font-lock-function-name-face ((t (:foreground ,burnt-orange))))
`(font-lock-variable-name-face ((t (:foreground ,light-bronze))))
`(font-lock-variable-use-face ((t (:foreground ,sky-blue))))
`(font-lock-preprocessor-face ((t (:foreground ,dusty-rose))))
`(font-lock-warning-face ((t (:foreground ,bright-red :weight bold))))
`(font-lock-doc-face ((t (:foreground ,fresh-green))))
;; Mode Line
`(mode-line ((t (:background ,mode-line-background-active
:foreground ,mode-line-foreground-active
:box (:line-width 1 :color ,mode-line-border :style nil)))))
`(mode-line-inactive ((t (:background ,rich-black
:foreground ,mode-line-foreground-active
:box (:line-width 1 :color ,mode-line-border :style nil)))))
;; Search
`(isearch ((t (:background ,vivid-vermilion :foreground ,pure-black))))
`(lazy-highlight ((t (:background ,golden-yellow :foreground ,pure-black))))
;; Custom Elements
`(show-paren-match ((t (:background ,sky-blue-lite))))
`(show-paren-mismatch ((t (:background ,dusty-sage))))
;; Tooltip and Popup
`(tooltip ((t (:background ,coffee-brown :foreground ,amber-gold))))
;; Compilation
`(flycheck-error ((t (:underline (:color ,bright-red :style wave)))))
`(compilation-info ((t ,(list :foreground fresh-green
:inherit 'unspecified))))
`(compilation-warning ((t ,(list :foreground coffee-brown
:bold t
:inherit 'unspecified))))
`(compilation-error ((t (:foreground ,bright-red))))
`(compilation-mode-line-fail ((t ,(list :foreground bright-red
:weight 'bold
:inherit 'unspecified))))
`(compilation-mode-line-exit ((t ,(list :foreground fresh-green
:weight 'bold
:inherit 'unspecified))))
))
(add-hook 'prog-mode-hook 'hl-line-mode)
(setq-default cursor-type 'box)
(defun custom/update-cursor-type ()
(setq cursor-type
(if (derived-mode-p 'prog-mode 'text-mode)
'(bar . 2)
'box)))
(add-hook 'post-command-hook 'custom/update-cursor-type)
(provide-theme 'fleury)
;; MIT License
;; Copyright (c) 2025 Shams Parvez Arka
;; Permission is hereby granted, free of charge, to any person obtaining a copy
;; of this software and associated documentation files (the "Software"), to deal
;; in the Software without restriction, including without limitation the rights
;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;; copies of the Software, and to permit persons to whom the Software is
;; furnished to do so, subject to the following conditions:
;; The above copyright notice and this permission notice shall be included in all
;; copies or substantial portions of the Software.
;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
;; SOFTWARE.

View File

@@ -0,0 +1,112 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#b99468",
"leading_diamond": "<#fcaa05> \ue200 </>",
"style": "diamond",
"template": "{{ .UserName }} <#b99468>on</>",
"type": "session"
},
{
"foreground": "#edb211",
"options": {
"time_format": "Monday <#b99468>at</> 3:04 PM"
},
"style": "diamond",
"template": " {{ .CurrentDate | date .Format }} ",
"type": "time"
},
{
"foreground": "#8ffff2",
"options": {
"branch_icon": "\ue725 ",
"fetch_status": true,
"fetch_upstream_icon": true
},
"style": "diamond",
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
"type": "git"
}
],
"type": "prompt"
},
{
"alignment": "right",
"segments": [
{
"foreground": "#66bc11",
"style": "plain",
"type": "text"
},
{
"foreground": "#66bc11",
"options": {
"style": "dallas",
"threshold": 0
},
"style": "diamond",
"template": " {{ .FormattedMs }}s <#b99468>\ue601</>",
"type": "executiontime"
},
{
"options": {
"root_icon": "\uf292 "
},
"style": "diamond",
"template": " \uf0e7 ",
"type": "root"
},
{
"foreground": "#fcaa05",
"style": "diamond",
"template": " <#b99468>MEM:</> {{ round .PhysicalPercentUsed .Precision }}% ({{ (div ((sub .PhysicalTotalMemory .PhysicalAvailableMemory)|float64) 1073741824.0) }}/{{ (div .PhysicalTotalMemory 1073741824.0) }}GB)",
"type": "sysinfo"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#b99468",
"leading_diamond": "<#2895c7> \ue285 </><#fcaa05>{</>",
"options": {
"folder_icon": "\uf07b",
"folder_separator_icon": " \uebcb ",
"home_icon": "home",
"style": "agnoster_full"
},
"style": "diamond",
"template": " \ue5ff {{ .Path }} ",
"trailing_diamond": "<#fcaa05>}</>",
"type": "path"
},
{
"foreground": "#66bc11",
"foreground_templates": ["{{ if gt .Code 0 }}#dc7575{{ end }}"],
"options": {
"always_enabled": true
},
"style": "plain",
"template": " \ue286 ",
"type": "status"
}
],
"type": "prompt"
}
],
"console_title_template": "{{ .Folder }}",
"transient_prompt": {
"background": "transparent",
"foreground": "#b99468",
"template": "\ue285 "
},
"version": 4
}

7
powershell/profile.ps1 Normal file
View File

@@ -0,0 +1,7 @@
$env:PATH = [System.Environment]::GetEnvironmentVariable("PATH","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("PATH","User")
$env:MAGICK_CODER_MODULE_PATH = "$(scoop prefix imagemagick)\modules\coders"
oh-my-posh init pwsh --config "$HOME\oh-my-posh-themes\1_shell_fluery.json" | Invoke-Expression
if (Test-Path "$HOME\.secrets.ps1") { . "$HOME\.secrets.ps1" }

64
setup.ps1 Normal file
View File

@@ -0,0 +1,64 @@
# setup.ps1
# $dotfiles = "$HOME\.dotfiles"
$dotfiles = $PSScriptRoot
$mappings = @(
@{
Src = "$dotfiles\alacritty\alacritty.toml"
Dst = "$HOME\AppData\Roaming\alacritty\alacritty.toml"
}
@{
Src = "$dotfiles\emacs\init.el"
Dst = "$HOME\.emacs.d\init.el"
}
@{
Src = "$dotfiles\emacs\themes"
Dst = "$HOME\.emacs.d\themes"
}
@{
Src = "$dotfiles\oh-my-posh-themes"
Dst = "$HOME\oh-my-posh-themes"
}
@{
Src = "$dotfiles\powershell\profile.ps1"
Dst = $PROFILE
}
# @{ Src = "$dotfiles\nvim\init.lua"; Dst = "$HOME\AppData\Local\nvim\init.lua" }
# @{ Src = "$dotfiles\powershell\profile.ps1"; Dst = $PROFILE }
# @{ Src = "$dotfiles\wezterm\.wezterm.lua"; Dst = "$HOME\.wezterm.lua" }
)
function New-Symlink($src, $dst) {
$dir = Split-Path $dst
if (!(Test-Path $dir)) {
New-Item -ItemType Directory -Path $dir -Force | Out-Null
Write-Host " Created dir: $dir" -ForegroundColor DarkGray
}
if (Test-Path $dst) {
$existing = Get-Item $dst -Force
if ($existing.LinkType -eq "SymbolicLink" -and $existing.Target -eq $src) {
Write-Host " [skip] Already linked: $dst" -ForegroundColor DarkGray
return
} else {
Write-Host " [warn] Already exists (not a matching symlink): $dst" -ForegroundColor Yellow
Write-Host " Remove it manually if you want to replace it."
return
}
}
if (!(Test-Path $src)) {
Write-Host " [error] Source not found: $src" -ForegroundColor Red
return
}
New-Item -ItemType SymbolicLink -Path $dst -Target $src | Out-Null
Write-Host " [ok] $dst -> $src" -ForegroundColor Green
}
Write-Host "`nSetting up dotfile symlinks...`n"
foreach ($m in $mappings) {
New-Symlink $m.Src $m.Dst
}
Write-Host "`nDone.`n"