From 16ffd644c4de438c025a3ee3b16aeff166aa4fb9 Mon Sep 17 00:00:00 2001 From: Nigel Date: Tue, 21 Jan 2025 20:07:49 +0100 Subject: [PATCH 1/8] git config removed gpg signkey, rofi theme updated to catpuccin emacs config update Signed-off-by: Nigel --- .gitmodules | 3 - git/dot-gitconfig | 3 +- rofi/config.rasi | 142 ++-------------------------------------- wezterm/dot-wezterm.lua | 82 +++++++++++++++++++++++ 4 files changed, 87 insertions(+), 143 deletions(-) delete mode 100644 .gitmodules create mode 100644 wezterm/dot-wezterm.lua diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index bdd2ec1..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "nvim"] - path = nvim - url = gitea@git.barink.dev:Nigel/neovim_config.git diff --git a/git/dot-gitconfig b/git/dot-gitconfig index 99a4bf5..97727e5 100644 --- a/git/dot-gitconfig +++ b/git/dot-gitconfig @@ -1,7 +1,6 @@ [user] email = nigelbarink@hotmail.com name = Nigel - signingkey = C54278C495538619 [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f @@ -10,4 +9,4 @@ [init] defaultBranch = main [commit] - gpgsign = true + gpgsign = false diff --git a/rofi/config.rasi b/rofi/config.rasi index cde2b85..1c63e73 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -1,141 +1,6 @@ configuration { -/* modi: "window,run,ssh";*/ -/* font: "mono 12";*/ -/* location: 0;*/ -/* yoffset: 0;*/ -/* xoffset: 0;*/ -/* fixed-num-lines: true;*/ -/* show-icons: false;*/ -/* terminal: "rofi-sensible-terminal";*/ -/* ssh-client: "ssh";*/ -/* ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]";*/ -/* run-command: "{cmd}";*/ -/* run-list-command: "";*/ -/* run-shell-command: "{terminal} -e {cmd}";*/ -/* window-command: "wmctrl -i -R {window}";*/ -/* window-match-fields: "all";*/ -/* icon-theme: ;*/ -/* drun-match-fields: "name,generic,exec,categories,keywords";*/ -/* drun-categories: ;*/ -/* drun-show-actions: false;*/ -/* drun-display-format: "{name} [({generic})]";*/ -/* drun-url-launcher: "xdg-open";*/ -/* disable-history: false;*/ -/* ignored-prefixes: "";*/ -/* sort: false;*/ -/* sorting-method: "normal";*/ -/* case-sensitive: false;*/ -/* cycle: true;*/ -/* sidebar-mode: false;*/ -/* hover-select: false;*/ -/* eh: 1;*/ -/* auto-select: false;*/ -/* parse-hosts: false;*/ -/* parse-known-hosts: true;*/ -/* combi-modi: "window,run";*/ -/* matching: "normal";*/ -/* tokenize: true;*/ -/* m: "-5";*/ -/* filter: ;*/ -/* dpi: -1;*/ -/* threads: 0;*/ -/* scroll-method: 0;*/ -/* window-format: "{w} {c} {t}";*/ -/* click-to-exit: true;*/ -/* max-history-size: 25;*/ -/* combi-hide-mode-prefix: false;*/ -/* combi-display-format: "{mode} {text}";*/ -/* matching-negate-char: '-' /* unsupported */;*/ -/* cache-dir: ;*/ -/* window-thumbnail: false;*/ -/* drun-use-desktop-cache: false;*/ -/* drun-reload-desktop-cache: false;*/ -/* normalize-match: false;*/ -/* steal-focus: false;*/ -/* application-fallback-icon: ;*/ -/* pid: "/run/user/1000/rofi.pid";*/ -/* display-window: ;*/ -/* display-windowcd: ;*/ -/* display-run: ;*/ -/* display-ssh: ;*/ -/* display-drun: ;*/ -/* display-combi: ;*/ -/* display-keys: ;*/ -/* display-filebrowser: ;*/ -/* kb-primary-paste: "Control+V,Shift+Insert";*/ -/* kb-secondary-paste: "Control+v,Insert";*/ -/* kb-clear-line: "Control+w";*/ -/* kb-move-front: "Control+a";*/ -/* kb-move-end: "Control+e";*/ -/* kb-move-word-back: "Alt+b,Control+Left";*/ -/* kb-move-word-forward: "Alt+f,Control+Right";*/ -/* kb-move-char-back: "Left,Control+b";*/ -/* kb-move-char-forward: "Right,Control+f";*/ -/* kb-remove-word-back: "Control+Alt+h,Control+BackSpace";*/ -/* kb-remove-word-forward: "Control+Alt+d";*/ -/* kb-remove-char-forward: "Delete,Control+d";*/ -/* kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h";*/ -/* kb-remove-to-eol: "Control+k";*/ -/* kb-remove-to-sol: "Control+u";*/ -/* kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";*/ -/* kb-accept-custom: "Control+Return";*/ -/* kb-accept-custom-alt: "Control+Shift+Return";*/ -/* kb-accept-alt: "Shift+Return";*/ -/* kb-delete-entry: "Shift+Delete";*/ -/* kb-mode-next: "Shift+Right,Control+Tab";*/ -/* kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";*/ -/* kb-mode-complete: "Control+l";*/ -/* kb-row-left: "Control+Page_Up";*/ -/* kb-row-right: "Control+Page_Down";*/ -/* kb-row-up: "Up,Control+p,ISO_Left_Tab";*/ -/* kb-row-down: "Down,Control+n";*/ -/* kb-row-tab: "Tab";*/ -/* kb-page-prev: "Page_Up";*/ -/* kb-page-next: "Page_Down";*/ -/* kb-row-first: "Home,KP_Home";*/ -/* kb-row-last: "End,KP_End";*/ -/* kb-row-select: "Control+space";*/ -/* kb-screenshot: "Alt+S";*/ -/* kb-ellipsize: "Alt+period";*/ -/* kb-toggle-case-sensitivity: "grave,dead_grave";*/ -/* kb-toggle-sort: "Alt+grave";*/ -/* kb-cancel: "Escape,Control+g,Control+bracketleft";*/ -/* kb-custom-1: "Alt+1";*/ -/* kb-custom-2: "Alt+2";*/ -/* kb-custom-3: "Alt+3";*/ -/* kb-custom-4: "Alt+4";*/ -/* kb-custom-5: "Alt+5";*/ -/* kb-custom-6: "Alt+6";*/ -/* kb-custom-7: "Alt+7";*/ -/* kb-custom-8: "Alt+8";*/ -/* kb-custom-9: "Alt+9";*/ -/* kb-custom-10: "Alt+0";*/ -/* kb-custom-11: "Alt+exclam";*/ -/* kb-custom-12: "Alt+at";*/ -/* kb-custom-13: "Alt+numbersign";*/ -/* kb-custom-14: "Alt+dollar";*/ -/* kb-custom-15: "Alt+percent";*/ -/* kb-custom-16: "Alt+dead_circumflex";*/ -/* kb-custom-17: "Alt+ampersand";*/ -/* kb-custom-18: "Alt+asterisk";*/ -/* kb-custom-19: "Alt+parenleft";*/ -/* kb-select-1: "Super+1";*/ -/* kb-select-2: "Super+2";*/ -/* kb-select-3: "Super+3";*/ -/* kb-select-4: "Super+4";*/ -/* kb-select-5: "Super+5";*/ -/* kb-select-6: "Super+6";*/ -/* kb-select-7: "Super+7";*/ -/* kb-select-8: "Super+8";*/ -/* kb-select-9: "Super+9";*/ -/* kb-select-10: "Super+0";*/ -/* ml-row-left: "ScrollLeft";*/ -/* ml-row-right: "ScrollRight";*/ -/* ml-row-up: "ScrollUp";*/ -/* ml-row-down: "ScrollDown";*/ -/* me-select-entry: "MousePrimary";*/ -/* me-accept-entry: "MouseDPrimary";*/ -/* me-accept-custom: "Control+MouseDPrimary";*/ + modi: "window,run,ssh"; + font: "SF Mono 12"; timeout { action: "kb-cancel"; delay: 0; @@ -145,4 +10,5 @@ configuration { sorting-method: "name"; } } -@theme "/home/nigel/.local/share/rofi/themes/rounded-purple-dark.rasi" + +@theme "/home/nigel/.local/share/rofi/themes/catppuccin-frappe.rasi" diff --git a/wezterm/dot-wezterm.lua b/wezterm/dot-wezterm.lua new file mode 100644 index 0000000..07f4d19 --- /dev/null +++ b/wezterm/dot-wezterm.lua @@ -0,0 +1,82 @@ +-- pull in the wezterm API +local wezterm = require('wezterm') +local launch_menu = {} + +-- This will hold the configuration +local config = wezterm.config_builder() +config.colors = { background = "#1e1e2e" } +config.color_scheme = 'Catppuccin Mocha' +config.window_background_opacity = 0.8 + +config.window_frame = { + font = wezterm.font { family = 'Roboto', weight = 'Bold' }, + font_size = 12, + active_titlebar_bg = '#1e1e2e', + inactive_titlebar_bg = '#1e1e2e', +} + +config.colors = { + tab_bar = { + active_tab = { + + bg_color = '#181825', + fg_color = "#B4BEFE" + }, + inactive_tab = { + bg_color = '#1e1e2e', + fg_color = "#CDD6F4" + }, + new_tab = { + bg_color = '#1e1e2e', + fg_color = "#CDD6F4" + }, + new_tab_hover = { + bg_color = '#1b1032', + fg_color = '#808080', + } + }, +} + +-- Keys +local act = wezterm.action +config.leader = { key = "a", mods = "CTRL", timeout_milliseconds = 1000 } + +config.keys = { + { key = "s", mods = "LEADER", action = act.SplitVertical { domain = "CurrentPaneDomain" } }, + { key = "v", mods = "LEADER", action = act.SplitHorizontal { domain = "CurrentPaneDomain" } }, + { key = "h", mods = "LEADER", action = act.ActivatePaneDirection("Left") }, + { key = "j", mods = "LEADER", action = act.ActivatePaneDirection("Down") }, + { key = "k", mods = "LEADER", action = act.ActivatePaneDirection("Up") }, + { key = "l", mods = "LEADER", action = act.ActivatePaneDirection("Right") }, + { key = "q", mods = "LEADER", action = act.CloseCurrentPane { confirm = false } }, + { key = "n", mods = "LEADER", action = act.ShowTabNavigator }, + { key = "t", mods = "LEADER", action = act.ShowLauncher }, +} + +config.enable_tab_bar = false +config.window_decorations = "INTEGRATED_BUTTONS | TITLE | RESIZE" +if wezterm.target_triple == 'x86_64-pc-windows-msvc' then + table.insert(launch_menu, { + label = 'PowerShell 7', + args = { 'pwsh.exe', '-NoLogo' }, + }) + table.insert(launch_menu, { + label = 'PowerShell', + args = { 'PowerShell.exe', '-NoLogo' }, + }) + + for _, vsvers in + ipairs(wezterm.glob('VisualStudio20*', 'D:/')) do + local year = vsvers:gsub('VisualStudio', '') + table.insert(launch_menu, { + label = 'X64 Native Tools VS ' .. year, + args = { + 'cmd.exe', + '/k', + 'D:/' .. vsvers .. '/VC/Auxiliary/Build/vcvars64.bat' }, + }) + end +end + +config.launch_menu = launch_menu +return config From 817b29e229617b4d1faa598dfb884135c45db8c8 Mon Sep 17 00:00:00 2001 From: Nigel Barink Date: Sat, 6 Dec 2025 15:58:20 +0100 Subject: [PATCH 2/8] Adding Powershell profile --- Powershell/powershell_profile.ps1 | 59 +++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Powershell/powershell_profile.ps1 diff --git a/Powershell/powershell_profile.ps1 b/Powershell/powershell_profile.ps1 new file mode 100644 index 0000000..6d7de5d --- /dev/null +++ b/Powershell/powershell_profile.ps1 @@ -0,0 +1,59 @@ +# Import the module +Import-Module Catppuccin + +# Set a flavor for easy access +$Flavor = $Catppuccin['Mocha'] +Import-Module -Name Microsoft.WinGet.CommandNotFound +Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r' +Invoke-Expression (& { (zoxide init powershell | Out-String ) }) + +# The following colors are used by PowerShell's formatting +# Again PS 7.2+ only +$PSStyle.Formatting.Debug = $Flavor.Sky.Foreground() +$PSStyle.Formatting.Error = $Flavor.Red.Foreground() +$PSStyle.Formatting.ErrorAccent = $Flavor.Blue.Foreground() +$PSStyle.Formatting.FormatAccent = $Flavor.Teal.Foreground() +$PSStyle.Formatting.TableHeader = $Flavor.Rosewater.Foreground() +$PSStyle.Formatting.Verbose = $Flavor.Yellow.Foreground() +$PSStyle.Formatting.Warning = $Flavor.Peach.Foreground() + +# Modified from the official Catppuccin fzf configuration at: https://github.com/catppuccin/fzf/ +$ENV:FZF_DEFAULT_OPTS = @" +--color=bg+:$($Flavor.Surface0),bg:$($Flavor.Base),spinner:$($Flavor.Rosewater) +--color=hl:$($Flavor.Red),fg:$($Flavor.Text),header:$($Flavor.Red) +--color=info:$($Flavor.Mauve),pointer:$($Flavor.Rosewater),marker:$($Flavor.Rosewater) +--color=fg+:$($Flavor.Text),prompt:$($Flavor.Mauve),hl+:$($Flavor.Red) +--color=border:$($Flavor.Surface2) +"@ + +$ENV:HOME="C:\Users\nigel" +$ENV:EDITOR="nvim" +set-alias -Name emacs -Value 'runemacs.exe -nw' +Set-PSReadlineOption -Colors $Colors +$ENV:YAZI_FILE_ONE = 'C:\Program Files\Git\usr\bin\file.exe' +function y (){ + $tmp = [System.IO.Path]::GetTempFileName() + yazi $args --cwd-file="$tmp" + $cwd = Get-Content -Path $tmp -Encoding UTF8 + if ( -not [String]::IsNullOrEmpty($cwd) -and $cwd -ne $PWD.Path) { + Set-Location -LiteralPath ([System.IO.Path]::GetFullPath($cwd)) + } + + Remove-Item -Path $tmp +} + +function Watch { + param ( + [ScriptBlock]$Function, + [int]$Time = 2 + ) + + while ($true) { + Clear-Host + & $Function + Start-Sleep -Seconds $Time + } +} + + +podman completion powershell | Out-string | Invoke-Expression From ccc165fbb647a5b40551cdf3f620c0df8c76f0c7 Mon Sep 17 00:00:00 2001 From: Nigel Barink Date: Mon, 29 Dec 2025 19:28:38 +0100 Subject: [PATCH 3/8] Adding yazi to dotfile --- yazi/theme.toml | 1 + yazi/yazi.toml | 224 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 225 insertions(+) create mode 100644 yazi/theme.toml create mode 100644 yazi/yazi.toml diff --git a/yazi/theme.toml b/yazi/theme.toml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/yazi/theme.toml @@ -0,0 +1 @@ + diff --git a/yazi/yazi.toml b/yazi/yazi.toml new file mode 100644 index 0000000..0a8ad6c --- /dev/null +++ b/yazi/yazi.toml @@ -0,0 +1,224 @@ +# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config. +# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas. +"$schema" = "https://yazi-rs.github.io/schemas/yazi.json" + +[manager] +sort_by = "alphabetical|mtime" +sort_sensitive = false +sort_dir_first = true +show_hidden = true +show_symlink = true +ratio = [ 1, 4, 3 ] +sort_reverse = false +sort_translit = false +linemode = "none" +scrolloff = 5 +mouse_events = [ "click", "scroll" ] +title_format = "Yazi: {cwd}" + +[preview] +wrap = "yes" +tab_size = 4 +max_width = 600 +max_height = 900 +cache_dir = "" +image_delay = 30 +image_filter = "triangle" +image_quality = 75 +sixel_fraction = 15 +ueberzug_scale = 1 +ueberzug_offset = [ 0, 0, 0, 0 ] + +[opener] +edit = [ + { run = '${EDITOR:-vi} "$@"', desc = "$EDITOR", block = true, for = "unix" }, + { run = 'code %*', orphan = true, desc = "code", for = "windows" }, + { run = 'code -w %*', block = true, desc = "code (block)", for = "windows" }, +] +open = [ + { run = 'xdg-open "$1"', desc = "Open", for = "linux" }, + { run = 'open "$@"', desc = "Open", for = "macos" }, + { run = 'file "%1"', orphan = true, desc = "Open", for = "windows" }, + { run = 'termux-open "$1"', desc = "Open", for = "android" }, +] +reveal = [ + { run = 'xdg-open "$(dirname "$1")"', desc = "Reveal", for = "linux" }, + { run = 'open -R "$1"', desc = "Reveal", for = "macos" }, + { run = 'explorer /select,"%1"', orphan = true, desc = "Reveal", for = "windows" }, + { run = 'termux-open "$(dirname "$1")"', desc = "Reveal", for = "android" }, + { run = '''clear; exiftool "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show EXIF", for = "unix" }, +] +extract = [ + { run = 'ya pub extract --list "$@"', desc = "Extract here", for = "unix" }, + { run = 'ya pub extract --list %*', desc = "Extract here", for = "windows" }, +] +play = [ + { run = 'mpv --force-window "$@"', orphan = true, for = "unix" }, + { run = 'mpv --force-window %*', orphan = true, for = "windows" }, + { run = '''mediainfo "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show media info", for = "unix" }, +] + +[open] +rules = [ + # Folder + { name = "*/", use = [ "edit", "open", "reveal" ] }, + # Text + { mime = "text/*", use = [ "edit", "reveal" ] }, + # Image + { mime = "image/*", use = [ "open", "reveal" ] }, + # Media + { mime = "{audio,video}/*", use = [ "play", "reveal" ] }, + # Archive + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", use = [ "extract", "reveal" ] }, + # JSON + { mime = "application/{json,ndjson}", use = [ "edit", "reveal" ] }, + { mime = "*/javascript", use = [ "edit", "reveal" ] }, + # Empty file + { mime = "inode/empty", use = [ "edit", "reveal" ] }, + # Fallback + { name = "*", use = [ "open", "reveal" ] }, +] + +[tasks] +micro_workers = 10 +macro_workers = 10 +bizarre_retry = 3 +image_alloc = 536870912 # 512MB +image_bound = [ 0, 0 ] +suppress_preload = false + +[plugin] +fetchers = [ + # Mimetype + { id = "mime", name = "*", run = "mime", prio = "high" }, +] +spotters = [ + { name = "*/", run = "folder" }, + # Code + { mime = "text/*", run = "code" }, + { mime = "application/{mbox,javascript,wine-extension-ini}", run = "code" }, + # Image + { mime = "image/{avif,hei?,jxl}", run = "magick" }, + { mime = "image/svg+xml", run = "svg" }, + { mime = "image/*", run = "image" }, + # Video + { mime = "video/*", run = "video" }, + # Fallback + { name = "*", run = "file" }, +] +preloaders = [ + # Image + { mime = "image/{avif,hei?,jxl}", run = "magick" }, + { mime = "image/svg+xml", run = "svg" }, + { mime = "image/*", run = "image" }, + # Video + { mime = "video/*", run = "video" }, + # PDF + { mime = "application/pdf", run = "pdf" }, + # Font + { mime = "font/*", run = "font" }, + { mime = "application/ms-opentype", run = "font" }, +] +previewers = [ + { name = "*/", run = "folder" }, + # Code + { mime = "text/*", run = "code" }, + { mime = "application/{mbox,javascript,wine-extension-ini}", run = "code" }, + # JSON + { mime = "application/{json,ndjson}", run = "json" }, + # Image + { mime = "image/{avif,hei?,jxl}", run = "magick" }, + { mime = "image/svg+xml", run = "svg" }, + { mime = "image/*", run = "image" }, + # Video + { mime = "video/*", run = "video" }, + # PDF + { mime = "application/pdf", run = "pdf" }, + # Archive + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", run = "archive" }, + { mime = "application/{debian*-package,redhat-package-manager,rpm,android.package-archive}", run = "archive" }, + { name = "*.{AppImage,appimage}", run = "archive" }, + # Virtual Disk / Disk Image + { mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}", run = "archive" }, + { mime = "application/virtualbox-{vhd,vhdx}", run = "archive" }, + { name = "*.{img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}", run = "archive" }, + # Font + { mime = "font/*", run = "font" }, + { mime = "application/ms-opentype", run = "font" }, + # Empty file + { mime = "inode/empty", run = "empty" }, + # Fallback + { name = "*", run = "file" }, +] + +[input] +cursor_blink = false + +# cd +cd_title = "Change directory:" +cd_origin = "top-center" +cd_offset = [ 0, 2, 50, 3 ] + +# create +create_title = [ "Create:", "Create (dir):" ] +create_origin = "top-center" +create_offset = [ 0, 2, 50, 3 ] + +# rename +rename_title = "Rename:" +rename_origin = "hovered" +rename_offset = [ 0, 1, 50, 3 ] + +# filter +filter_title = "Filter:" +filter_origin = "top-center" +filter_offset = [ 0, 2, 50, 3 ] + +# find +find_title = [ "Find next:", "Find previous:" ] +find_origin = "top-center" +find_offset = [ 0, 2, 50, 3 ] + +# search +search_title = "Search via {n}:" +search_origin = "top-center" +search_offset = [ 0, 2, 50, 3 ] + +# shell +shell_title = [ "Shell:", "Shell (block):" ] +shell_origin = "top-center" +shell_offset = [ 0, 2, 50, 3 ] + +[confirm] +# trash +trash_title = "Trash {n} selected file{s}?" +trash_origin = "center" +trash_offset = [ 0, 0, 70, 20 ] + +# delete +delete_title = "Permanently delete {n} selected file{s}?" +delete_origin = "center" +delete_offset = [ 0, 0, 70, 20 ] + +# overwrite +overwrite_title = "Overwrite file?" +overwrite_content = "Will overwrite the following file:" +overwrite_origin = "center" +overwrite_offset = [ 0, 0, 50, 15 ] + +# quit +quit_title = "Quit?" +quit_content = "The following tasks are still running, are you sure you want to quit?" +quit_origin = "center" +quit_offset = [ 0, 0, 50, 15 ] + +[pick] +open_title = "Open with:" +open_origin = "hovered" +open_offset = [ 0, 1, 50, 7 ] + +[which] +sort_by = "none" +sort_sensitive = false +sort_reverse = false +sort_translit = false From 139c7898618e15d6c0d85f01d29a5332020aa4dd Mon Sep 17 00:00:00 2001 From: Nigel Barink Date: Mon, 29 Dec 2025 19:29:15 +0100 Subject: [PATCH 4/8] Modified the wezterm config --- wezterm/.wezterm.lua | 83 ------------------------------------ wezterm/dot-wezterm.lua | 93 ++++++++++++++++++----------------------- wezterm/keys.lua | 50 ++++++++++++++++++++++ wezterm/theme.lua | 52 +++++++++++++++++++++++ 4 files changed, 143 insertions(+), 135 deletions(-) delete mode 100644 wezterm/.wezterm.lua create mode 100644 wezterm/keys.lua create mode 100644 wezterm/theme.lua diff --git a/wezterm/.wezterm.lua b/wezterm/.wezterm.lua deleted file mode 100644 index 5fddd1c..0000000 --- a/wezterm/.wezterm.lua +++ /dev/null @@ -1,83 +0,0 @@ --- pull in the wezterm API -local wezterm = require('wezterm') -local launch_menu = {} - --- This will hold the configuration -local config = wezterm.config_builder() -config.colors = { background = "#1e1e2e" } -config.color_scheme = 'Catppuccin Mocha' -config.window_background_opacity = 1.0 -config.default_prog = { 'C:/Program Files/PowerShell/7/pwsh.exe' } - -config.window_frame = { - font = wezterm.font { family = 'Roboto', weight = 'Bold' }, - font_size = 12, - active_titlebar_bg = '#1e1e2e', - inactive_titlebar_bg = '#1e1e2e', -} - -config.colors = { - tab_bar = { - active_tab = { - - bg_color = '#181825', - fg_color = "#B4BEFE" - }, - inactive_tab = { - bg_color = '#1e1e2e', - fg_color = "#CDD6F4" - }, - new_tab = { - bg_color = '#1e1e2e', - fg_color = "#CDD6F4" - }, - new_tab_hover ={ - bg_color = '#1b1032', - fg_color = '#808080', - } - }, -} - --- Keys -local act = wezterm.action -config.leader = { key = "a", mods="CTRL", timeout_milliseconds = 1000} - -config.keys = { - { key = "s", mods = "LEADER", action = act.SplitVertical { domain = "CurrentPaneDomain"}}, - { key = "v", mods = "LEADER", action = act.SplitHorizontal { domain = "CurrentPaneDomain" }}, - { key = "h", mods = "LEADER", action = act.ActivatePaneDirection("Left") }, - { key = "j", mods = "LEADER", action = act.ActivatePaneDirection("Down") }, - { key = "k", mods = "LEADER", action = act.ActivatePaneDirection("Up") }, - { key = "l", mods = "LEADER", action = act.ActivatePaneDirection("Right") }, - { key = "q", mods = "LEADER", action = act.CloseCurrentPane { confirm = false }}, - { key = "n", mods = "LEADER", action = act.ShowTabNavigator }, - { key = "t", mods = "LEADER", action = act.ShowLauncher }, -} - --- config.enable_tab_bar = false -config.window_decorations = "INTEGRATED_BUTTONS | TITLE | RESIZE" -if wezterm.target_triple == 'x86_64-pc-windows-msvc' then - table.insert(launch_menu, { - label = 'PowerShell 7', - args = { 'pwsh.exe', '-NoLogo' }, - }) - table.insert(launch_menu, { - label = 'PowerShell', - args = { 'PowerShell.exe', '-NoLogo' }, - }) - - for _, vsvers in - ipairs ( wezterm.glob('VisualStudio20*', 'D:/')) do - local year = vsvers:gsub('VisualStudio', '') - table.insert(launch_menu, { - label = 'X64 Native Tools VS ' .. year, - args = { - 'cmd.exe', - '/k', - 'D:/' .. vsvers .. '/VC/Auxiliary/Build/vcvars64.bat' }, - }) -end -end - -config.launch_menu = launch_menu -return config diff --git a/wezterm/dot-wezterm.lua b/wezterm/dot-wezterm.lua index 07f4d19..32477ae 100644 --- a/wezterm/dot-wezterm.lua +++ b/wezterm/dot-wezterm.lua @@ -1,68 +1,49 @@ -- pull in the wezterm API local wezterm = require('wezterm') -local launch_menu = {} +require "theme" +require "keys" -- This will hold the configuration local config = wezterm.config_builder() -config.colors = { background = "#1e1e2e" } -config.color_scheme = 'Catppuccin Mocha' -config.window_background_opacity = 0.8 - -config.window_frame = { - font = wezterm.font { family = 'Roboto', weight = 'Bold' }, - font_size = 12, - active_titlebar_bg = '#1e1e2e', - inactive_titlebar_bg = '#1e1e2e', -} - -config.colors = { - tab_bar = { - active_tab = { - - bg_color = '#181825', - fg_color = "#B4BEFE" - }, - inactive_tab = { - bg_color = '#1e1e2e', - fg_color = "#CDD6F4" - }, - new_tab = { - bg_color = '#1e1e2e', - fg_color = "#CDD6F4" - }, - new_tab_hover = { - bg_color = '#1b1032', - fg_color = '#808080', - } - }, -} - --- Keys -local act = wezterm.action -config.leader = { key = "a", mods = "CTRL", timeout_milliseconds = 1000 } - -config.keys = { - { key = "s", mods = "LEADER", action = act.SplitVertical { domain = "CurrentPaneDomain" } }, - { key = "v", mods = "LEADER", action = act.SplitHorizontal { domain = "CurrentPaneDomain" } }, - { key = "h", mods = "LEADER", action = act.ActivatePaneDirection("Left") }, - { key = "j", mods = "LEADER", action = act.ActivatePaneDirection("Down") }, - { key = "k", mods = "LEADER", action = act.ActivatePaneDirection("Up") }, - { key = "l", mods = "LEADER", action = act.ActivatePaneDirection("Right") }, - { key = "q", mods = "LEADER", action = act.CloseCurrentPane { confirm = false } }, - { key = "n", mods = "LEADER", action = act.ShowTabNavigator }, - { key = "t", mods = "LEADER", action = act.ShowLauncher }, -} config.enable_tab_bar = false -config.window_decorations = "INTEGRATED_BUTTONS | TITLE | RESIZE" +-- The most common triples are: +-- +-- x86_64-pc-windows-msvc - Windows +-- x86_64-apple-darwin - macOS (Intel) +-- aarch64-apple-darwin - macOS (Apple Silicon) +-- x86_64-unknown-linux-gnu - Linux +local launch_menu = {} if wezterm.target_triple == 'x86_64-pc-windows-msvc' then + table.insert(launch_menu, { + label = 'PowerShell', + args = { 'PowerShell.exe', '-NoLogo' }, + }) table.insert(launch_menu, { label = 'PowerShell 7', args = { 'pwsh.exe', '-NoLogo' }, }) table.insert(launch_menu, { - label = 'PowerShell', - args = { 'PowerShell.exe', '-NoLogo' }, + label = "Developer PowerShell", + args = { + 'pwsh.exe', + '-noe', + '-c', + '&{Import-Module "C:/Program Files (x86)/Microsoft Visual Studio/18/BuildTools/Common7/Tools/Microsoft.VisualStudio.DevShell.dll";Enter-VsDevShell 6c43edf9 };wezterm cli set-tab-title \'Developer Powershell\'' + }, + cwd = 'G:/git' + }) + + + table.insert(launch_menu, { + label = "Conda PowerShell", + args = { + 'pwsh.exe', + '-noe', + '-c', + '& \'C:/Users/nigel/miniconda3/shell/condabin/conda-hook.ps1\'; conda activate base ' + }, + cwd = 'G:/git/Machine Learning' }) for _, vsvers in @@ -78,5 +59,13 @@ if wezterm.target_triple == 'x86_64-pc-windows-msvc' then end end +if wezterm.target_triple == 'x86_64-pc-windows-msvc' then + config.default_prog = { 'C:/Program Files/Powershell/7/pwsh.exe' } +else + config.default_prog = { '/usr/bin/bash' } +end + + config.launch_menu = launch_menu +config.window_close_confirmation = "NeverPrompt" return config diff --git a/wezterm/keys.lua b/wezterm/keys.lua new file mode 100644 index 0000000..d05b205 --- /dev/null +++ b/wezterm/keys.lua @@ -0,0 +1,50 @@ +local wezterm = require 'wezterm' + +local act = wezterm.action + + +config.leader = { key = "a", mods = "CTRL", timeout_milliseconds = 1000 } +config.keys = { + { key = "s", mods = "LEADER", action = act.SplitVertical { domain = "CurrentPaneDomain" } }, + { key = "v", mods = "LEADER", action = act.SplitHorizontal { domain = "CurrentPaneDomain" } }, + { key = "h", mods = "ALT", action = act.ActivatePaneDirection("Left") }, + { key = "j", mods = "ALT", action = act.ActivatePaneDirection("Down") }, + { key = "k", mods = "ALT", action = act.ActivatePaneDirection("Up") }, + { key = "l", mods = "ALT", action = act.ActivatePaneDirection("Right") }, + { key = "q", mods = "LEADER", action = act.CloseCurrentPane { confirm = false } }, + { key = "t", mods = "LEADER", action = act.ShowTabNavigator }, + { key = "n", mods = "LEADER", action = act.ShowLauncher }, + { key = "t", mods = "ALT", action = act.ShowLauncherArgs { flags = "TABS|FUZZY" } }, + { key = 'w', mods = 'ALT', action = act.ShowLauncherArgs { flags = 'WORKSPACES|FUZZY' } }, +} + +local function isViProcess(pane) + return pane:get_foreground_process_name():find('n?vim') ~= nil or pane:get_title():find("n?vim") ~= nil +end + +local function conditionalActivatePane(window, pane, pane_direction, vim_direction) + if isViProcess(pane) then + window:perform_action( + -- This should match the keybinds you set in Neovim. + act.SendKey({ key = vim_direction, mods = 'CTRL' }), + pane + ) + else + window:perform_action(act.ActivatePaneDirection(pane_direction), pane) + end +end +wezterm.on('ShowLauncherArgs', function(window, pane) + wezterm.info_log 'launcher args called ' +end) +wezterm.on('ActivatePaneDirection-right', function(window, pane) + conditionalActivatePane(window, pane, 'Right', 'l') +end) +wezterm.on('ActivatePaneDirection-left', function(window, pane) + conditionalActivatePane(window, pane, 'Left', 'h') +end) +wezterm.on('ActivatePaneDirection-up', function(window, pane) + conditionalActivatePane(window, pane, 'Up', 'k') +end) +wezterm.on('ActivatePaneDirection-down', function(window, pane) + conditionalActivatePane(window, pane, 'Down', 'j') +end) diff --git a/wezterm/theme.lua b/wezterm/theme.lua new file mode 100644 index 0000000..c758a43 --- /dev/null +++ b/wezterm/theme.lua @@ -0,0 +1,52 @@ +local wezterm = require 'wezterm' +config.window_decorations = "INTEGRATED_BUTTONS | TITLE | RESIZE" + +config.colors = { background = "#1e1e2e" } +config.color_scheme = 'Catppuccin Mocha' +config.window_background_opacity = 0.9 +config.window_decorations = "INTEGRATED_BUTTONS | TITLE | RESIZE" +config.window_frame = { + font = wezterm.font { family = 'Roboto', weight = 'Bold' }, + font_size = 12, + active_titlebar_bg = '#1e1e2e', + inactive_titlebar_bg = '#1e1e2e', +} + +config.colors = { + tab_bar = { + active_tab = { + + bg_color = '#181825', + fg_color = "#B4BEFE" + }, + inactive_tab = { + bg_color = '#1e1e2e', + fg_color = "#CDD6F4" + }, + new_tab = { + bg_color = '#1e1e2e', + fg_color = "#CDD6F4" + }, + new_tab_hover = { + bg_color = '#1b1032', + fg_color = '#808080', + } + }, +} + +wezterm.on('update-status', function(window) + local SOLID_LEFT_ARROW = utf8.char(0xe0b2) + + local color_scheme = window:effective_config().resolved_palette + local bg = color_scheme.background + local fg = color_scheme.foreground + + window:set_right_status(wezterm.format({ + { Background = { Color = 'none' } }, + { Foreground = { Color = bg } }, + { Text = SOLID_LEFT_ARROW }, + { Background = { Color = bg } }, + { Foreground = { Color = fg } }, + { Text = ' ' .. wezterm.hostname() .. ', WKSPC: ' .. wezterm.mux.get_active_workspace() .. '' }, + })) +end) From f8b246f1eff04a7b7292b06d758907625b35059d Mon Sep 17 00:00:00 2001 From: Nigel Barink Date: Mon, 29 Dec 2025 19:29:29 +0100 Subject: [PATCH 5/8] Refreshed the emacs config --- emacs/dot-emacs | 94 +++++++++++++++++++++++++++++-------------- emacs/emacs-custom.el | 22 ++++++++++ 2 files changed, 86 insertions(+), 30 deletions(-) create mode 100644 emacs/emacs-custom.el diff --git a/emacs/dot-emacs b/emacs/dot-emacs index ff94b3d..8e6a808 100644 --- a/emacs/dot-emacs +++ b/emacs/dot-emacs @@ -1,59 +1,66 @@ -; set variables +; set variables (setq ido-enable-flex-matching t) (setq ido-everywhere t) (setq inhibit-splash-screen t) (setq tab-width 4) (setq custom-file "~/emacs-custom.el") -(setq display-line-numbers 'relative) +(setq ring-bell-function 'ignore) +(setq display-line-numbers-type 'relative) ; Toggle modes +(require 'ido-vertical-mode ) (ido-mode 1) +(ido-vertical-mode 1) +(ido-everywhere 1) (tool-bar-mode -1) (toggle-scroll-bar -1) (menu-bar-mode -1) (global-display-line-numbers-mode 1) ; Install and load packages -(require 'package) -(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) +(require 'package) +(require 'use-package-ensure) +(setq package-archives '(("melpa" . "https://melpa.org/packages/") + ("elpa" . "https://elpa.gnu.org/packages/") + ("non-gnu" . "https://elpa.nongnu.org/nongnu/"))) +(when (not package-archive-contents) + (package-refresh-contents)) + (package-initialize) -(require 'use-package-ensure) (setq use-package-always-ensure t) (use-package catppuccin-theme) -(use-package magit) -(use-package paredit) +(use-package magit ) +(use-package paredit ) +; keyboard +(global-set-key (kbd "") 'keyboard-escape-quit) ;; Prevent me from confusion with VIM (use-package evil :init (setq evil-want-integration t) (setq evil-want-keybinding nil) + (setq evil-want-C-u-scroll t) + (setq evil-want-C-i-jump nil) :config (evil-mode 1) + (define-key evil-insert-state-map (kbd "C-n") 'evil-normal-state) ) (use-package evil-collection - :pin melpa :after evil :config (evil-collection-init)) (use-package all-the-icons) (use-package nerd-icons) - -(use-package lsp-mode - :commands (lsp lsp-deferred) - :init - (setq lsp-keymap-prefix "C-c l") + + +(use-package doom-modeline + :init (doom-modeline-mode 1) ) -(use-package lsp-ui - :after lsp-mode - :hook (lsp-mode . lsp-ui-mode) - :custom - (lsp-ui-doc-position 'bottom)) (use-package fzf :bind @@ -61,30 +68,57 @@ (setq fzf/args "-x --color bw --print-query --margin=1,0 --no-hscroll" fzf/executable "fzf" fzf/git-grep-args "-i --line-number %s" - fzf/grep-command "grep -nrH" + fzf/grep-command "rg -nrH" fzf/position-bottom t - fzf/window-height 15)) + fzf/window-height 15) 'nowarnings ) + + +(use-package projectile) +(projectile-mode +1) +(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map) + (use-package consult - :bind - ;; Keybindings :hook (completion-list-mode . consult-preview-at-point-mode) - :init - (setq register-preview-delay 0.5) - (setq xref-show-xrefs-function #'consult-xref - xref-show-definitions-function #'consult-xref)) -(use-package magit-delta - :hook (magit-mode . magit-delta-mode) ) +(use-package consult-company) +(use-package consult-flycheck) +(use-package consult-lsp) +(use-package consult-projectile) +(use-package dap-mode) +(use-package flycheck) -; activate font and theme +(use-package company) +(use-package ivy) + +(require 'eglot) +(add-to-list 'eglot-server-programs + '("gradle" + ("gradle" "--no-daemon" "tasks" "--quiet" "--info") + (mode . gradle-mode) + (file-mode . "java") + (file-types . ("java" "groovy")))) + +(use-package lsp-pyright + :custom (lsp-pyright-langserver-command "pyright") + :hook (python-mode . (lambda () + (lsp)))) +(use-package lsp-java + :config (add-hook 'java-mode-hook 'lsp)) + +;; Set font (add-to-list 'default-frame-alist '(font . "SF Mono")) (set-face-attribute 'default t :font "SF Mono") + +;; Load catppuccin theme (load-theme 'catppuccin :no-confirm) (setq catppuccin-flavor 'frappe) + +;; Create semi-transparent background (set-frame-parameter nil 'alpha-background 80) (add-to-list 'default-frame-alist '(alpha-background . 80)) -(load custom-file) +(load custom-file 'noerror 'nomessage) +(put 'dired-find-alternate-file 'disabled nil) diff --git a/emacs/emacs-custom.el b/emacs/emacs-custom.el new file mode 100644 index 0000000..cebb1ef --- /dev/null +++ b/emacs/emacs-custom.el @@ -0,0 +1,22 @@ +(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 + '(2048-game all-the-icons catppuccin-theme cmake-mode company consult + consult-company consult-flycheck consult-lsp + consult-projectile dap-mode define-word doom-modeline + evil-collection flycheck fzf gradle-mode + id-vertical-mode ido-vertical-mode ivy lsp-java + lsp-pyright lsp-ui magit mermaid-mode ob-mermaid + paredit projectile slime swift-mode tree-edit + tree-inspector tree-sitter tree-sitter-indent + tree-sitter-langs undo-tree vterm which-key + which-key-posframe))) +(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. + ) From 89b70ac02e1394bf3aa4ff0f5923c8898d606ae4 Mon Sep 17 00:00:00 2001 From: Nigel Barink Date: Mon, 29 Dec 2025 19:31:48 +0100 Subject: [PATCH 6/8] Adding Vim --- vim/dot-vimrc | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 vim/dot-vimrc diff --git a/vim/dot-vimrc b/vim/dot-vimrc new file mode 100644 index 0000000..52637b9 --- /dev/null +++ b/vim/dot-vimrc @@ -0,0 +1,6 @@ +colorscheme retrobox +set relativenumber number +set packpath^=~/.vim/pack/ +set guioptions -=m +set guioptions -=T +set guicursor = "" From 0d730db906d7485f513523ca816e3fe001a72943 Mon Sep 17 00:00:00 2001 From: Nigel Barink Date: Mon, 29 Dec 2025 19:39:08 +0100 Subject: [PATCH 7/8] Fix UI on Windows --- wezterm/dot-wezterm.lua | 4 ++-- wezterm/theme.lua | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/wezterm/dot-wezterm.lua b/wezterm/dot-wezterm.lua index 32477ae..f1d2985 100644 --- a/wezterm/dot-wezterm.lua +++ b/wezterm/dot-wezterm.lua @@ -1,10 +1,10 @@ -- pull in the wezterm API local wezterm = require('wezterm') +config = wezterm.config_builder() + require "theme" require "keys" --- This will hold the configuration -local config = wezterm.config_builder() config.enable_tab_bar = false -- The most common triples are: diff --git a/wezterm/theme.lua b/wezterm/theme.lua index c758a43..cf10d78 100644 --- a/wezterm/theme.lua +++ b/wezterm/theme.lua @@ -1,10 +1,16 @@ local wezterm = require 'wezterm' -config.window_decorations = "INTEGRATED_BUTTONS | TITLE | RESIZE" config.colors = { background = "#1e1e2e" } config.color_scheme = 'Catppuccin Mocha' config.window_background_opacity = 0.9 -config.window_decorations = "INTEGRATED_BUTTONS | TITLE | RESIZE" + + +if wezterm.target_triple == 'x86_64-pc-windows-msvc' then + config.window_decorations = "TITLE | RESIZE" +else + config.window_decorations = "INTEGRATED_BUTTONS | TITLE | RESIZE" +end + config.window_frame = { font = wezterm.font { family = 'Roboto', weight = 'Bold' }, font_size = 12, From 97ca66bd07f11c2bf230ec437b14a1748f427a7f Mon Sep 17 00:00:00 2001 From: Nigel Barink Date: Mon, 29 Dec 2025 19:52:52 +0100 Subject: [PATCH 8/8] Updated Powershell Profile --- Powershell/powershell_profile.ps1 | 46 +++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/Powershell/powershell_profile.ps1 b/Powershell/powershell_profile.ps1 index 6d7de5d..5a598d4 100644 --- a/Powershell/powershell_profile.ps1 +++ b/Powershell/powershell_profile.ps1 @@ -5,7 +5,7 @@ Import-Module Catppuccin $Flavor = $Catppuccin['Mocha'] Import-Module -Name Microsoft.WinGet.CommandNotFound Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r' -Invoke-Expression (& { (zoxide init powershell | Out-String ) }) +Invoke-Expression (& { (zoxide init --cmd cd powershell | Out-String ) }) # The following colors are used by PowerShell's formatting # Again PS 7.2+ only @@ -31,29 +31,65 @@ $ENV:EDITOR="nvim" set-alias -Name emacs -Value 'runemacs.exe -nw' Set-PSReadlineOption -Colors $Colors $ENV:YAZI_FILE_ONE = 'C:\Program Files\Git\usr\bin\file.exe' -function y (){ +function y () +{ $tmp = [System.IO.Path]::GetTempFileName() yazi $args --cwd-file="$tmp" $cwd = Get-Content -Path $tmp -Encoding UTF8 - if ( -not [String]::IsNullOrEmpty($cwd) -and $cwd -ne $PWD.Path) { + if ( -not [String]::IsNullOrEmpty($cwd) -and $cwd -ne $PWD.Path) + { Set-Location -LiteralPath ([System.IO.Path]::GetFullPath($cwd)) } Remove-Item -Path $tmp } -function Watch { +function Watch +{ param ( [ScriptBlock]$Function, [int]$Time = 2 ) - while ($true) { + while ($true) + { Clear-Host & $Function Start-Sleep -Seconds $Time } } +function prompt +{ + # Get IP info + $ipv4=Get-CimInstance -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=$true | Select-Object -ExpandProperty IPAddress | Select-String 192.* + $ipv4 = ($ipv4 | ForEach-Object { $_.ToString().Trim() }) -join ',' + $ipv4Label = '' + if (-not $ipv4) + { + $ipv4Label= "IP N/A" + } else + { + $ipv4Label= "IP $ipv4" + + } + + # Get Git branch if available + $gitBranch = '' + if (git rev-parse --is-inside-work-tree 2>$null) + { + $currentBranch = git rev-parse --abbrev-ref HEAD + $gitBranch = "GIT: $currentBranch" + } + + $currentLocation=$executionContext.SessionState.Path.CurrentLocation + + # default prompt + "[$ipv4Label $gitBranch ]`n$currentLocation@$Env:COMPUTERNAME $('(PS [>_])$' * ($nestedPromptLevel + 1)) "; +} + +set-alias -Name lg -Value lazygit + + podman completion powershell | Out-string | Invoke-Expression