feat(core): start the windows support

This commit is contained in:
Ade Attwood 2024-12-30 09:39:39 +00:00
parent 4530bdfb56
commit 1a9492c0ef
5 changed files with 52 additions and 31 deletions

View file

@ -1,6 +1,13 @@
local git = require "lib.git"
local emacs_dir = os.getenv "HOME" .. "/.emacs.d"
local emacs_dir
if os.getenv "OS" == "Windows_NT" then
emacs_dir = os.getenv "HOME" .. "/AppData/Roaming/.emacs.d"
else
emacs_dir = os.getenv "HOME" .. "/.emacs.d"
end
if not configz.is_directory(emacs_dir .. "/straight") then
configz.directory(emacs_dir .. "/straight")
end

View file

@ -1,6 +1,12 @@
local git = require "lib.git"
local nvim_dir = os.getenv "HOME" .. "/.config/nvim"
local nvim_dir
if os.getenv "OS" == "Windows_NT" then
nvim_dir = os.getenv "HOME" .. "/AppData/Local/nvim"
else
nvim_dir = os.getenv "HOME" .. "/.config/nvim"
end
local nvim_plugin_dir_start = nvim_dir .. "/pack/bundle/start"
local nvim_plugin_dir_opt = nvim_dir .. "/pack/bundle/opt"
@ -74,12 +80,12 @@ for plugin, config in pairs(opt_plugins) do
}
end
configz.run(string.format("rm -rf %s/conjure", nvim_plugin_dir_start))
configz.run(string.format("rm -rf %s/orgmode", nvim_plugin_dir_start))
configz.run(string.format("rm -rf %s/indent-line", nvim_plugin_dir_start))
configz.run(string.format("rm -rf %s/auto-pairs", nvim_plugin_dir_start))
configz.run(string.format("rm -rf %s/vim-puppet", nvim_plugin_dir_start))
configz.run(string.format("rm -rf %s/base16-vim", nvim_plugin_dir_start))
configz.run(string.format("rm -rf %s/vim-fugitive", nvim_plugin_dir_start))
configz.run(string.format("rm -rf %s/vim-rhubarb", nvim_plugin_dir_start))
configz.run(string.format("rm -rf %s/vim-tmux-navigator", nvim_plugin_dir_start))
-- configz.run(string.format("rm -rf %s/conjure", nvim_plugin_dir_start))
-- configz.run(string.format("rm -rf %s/orgmode", nvim_plugin_dir_start))
-- configz.run(string.format("rm -rf %s/indent-line", nvim_plugin_dir_start))
-- configz.run(string.format("rm -rf %s/auto-pairs", nvim_plugin_dir_start))
-- configz.run(string.format("rm -rf %s/vim-puppet", nvim_plugin_dir_start))
-- configz.run(string.format("rm -rf %s/base16-vim", nvim_plugin_dir_start))
-- configz.run(string.format("rm -rf %s/vim-fugitive", nvim_plugin_dir_start))
-- configz.run(string.format("rm -rf %s/vim-rhubarb", nvim_plugin_dir_start))
-- configz.run(string.format("rm -rf %s/vim-tmux-navigator", nvim_plugin_dir_start))

View file

@ -1,6 +1,12 @@
local data = require "lib.data"
local config_dir = os.getenv "HOME" .. "/.config/sapling"
local config_dir
if os.getenv "OS" == "Windows_NT" then
config_dir = os.getenv "HOME" .. "/AppData/Roaming/sapling"
else
config_dir = os.getenv "HOME" .. "/.config/sapling"
end
configz.directory(config_dir);

View file

@ -7,12 +7,12 @@
# The format of the prompt is: username@hostname:current_path
def create_left_prompt [] {
let username = $env.USER
let hostname = $env.HOSTNAME
let hostname = $env.HOSTNAME | str downcase
let formatted_path = $env.PWD
| str replace $env.HOME '~'
| str replace '~/Code/src/' '~s/'
| str replace '~s/github.com' '~gh'
| str replace (["~", "Code", "src"] | path join) '~s'
| str replace (["~s", "github.com"] | path join) '~gh'
$"(ansi magenta)($username)(ansi light_cyan)@(ansi yellow)($hostname)(ansi red):(ansi light_cyan)($formatted_path)(ansi reset)"
}

View file

@ -1,7 +1,7 @@
local wezterm = require "wezterm"
local scheme = wezterm.get_builtin_color_schemes()
local nord = scheme["nord"]
local theme = scheme["Poimandres"]
local function vim_pass_though_action(config)
return {
@ -25,47 +25,49 @@ return {
-- Use a sexy terminal font with ligatures.
-- You will need to install the beta version of the font to get the ligatures
-- https://github.com/intel/intel-one-mono/issues/9#issuecomment-1994958719
font = wezterm.font {
family = "Intel One Mono",
},
-- font = wezterm.font {
-- family = "FiraCode Nerd Font Mono",
-- },
-- The nord theme to fit with everyting else
color_scheme = "nord",
-- -- The nord theme to fit with everyting else
color_scheme = "Poimandres",
colors = {
tab_bar = {
background = nord.background,
background = theme.background,
active_tab = {
bg_color = "#88c0d0", -- nord.background,
fg_color = nord.background,
bg_color = "#88c0d0",
fg_color = theme.background,
},
inactive_tab = {
bg_color = nord.background,
fg_color = nord.foreground,
bg_color = theme.background,
fg_color = theme.foreground,
},
inactive_tab_hover = {
bg_color = "#4c566a",
fg_color = nord.foreground,
fg_color = theme.foreground,
italic = false,
},
new_tab = {
bg_color = nord.background,
fg_color = nord.foreground,
bg_color = theme.background,
fg_color = theme.foreground,
},
new_tab_hover = {
bg_color = "#4c566a",
fg_color = nord.foreground,
fg_color = theme.foreground,
italic = false,
},
},
},
default_prog = { 'nu' },
use_fancy_tab_bar = false,
-- Give the font some more line height, just makes thinks look a bit nicer
line_height = 1.4,
-- Remove the window boarders so we have a nice clean look
window_decorations = "NONE",
window_decorations = "RESIZE",
-- Who wants their music interrupted every time there is no tab completion
-- available in the shell, Who wants their music interrupted evert time there