Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions config/lsyncd/wsl.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
local xdg_config_home = os.getenv('XDG_CONFIG_HOME') or '/home/hexin/.config'
local user_profile = os.getenv('USERPROFILE') or '/mnt/c/Users/Hexin'
local appdata = os.getenv('APPDATA') or '/mnt/c/Users/Hexin/AppData/Roaming'

local transitions = {
{
source = ('%s/alacritty/'):format(xdg_config_home),
target = ('%s/alacritty/'):format(appdata),
},
{
source = ('%s/wezterm/'):format(xdg_config_home),
target = ('%s/.config/wezterm/'):format(user_profile),
},
}

for _, transition in ipairs(transitions) do
Expand Down
38 changes: 38 additions & 0 deletions config/wezterm/appearance.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
local wezterm = require('wezterm')

local M = {}

function M.apply(config)
config.initial_rows = 46
config.initial_cols = 160

config.color_scheme = 'Tomorrow Night Eighties'

config.font = wezterm.font('HackGen Console NF')
config.font_size = 11

config.enable_tab_bar = false

config.animation_fps = 1
config.cursor_blink_ease_in = 'Constant'
config.cursor_blink_ease_out = 'Constant'

config.ui_key_cap_rendering = 'WindowsSymbols'

config.window_decorations = 'RESIZE'
config.window_padding = {
left = 0,
right = 0,
top = 0,
bottom = 0,
}

wezterm.on('gui-startup', function (cmd)
local _, _, window = wezterm.mux.spawn_window(cmd or {})

local gui_window = window:gui_window()
gui_window:set_position(0, 0)
end)
end

return M
22 changes: 22 additions & 0 deletions config/wezterm/keys.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
local wezterm = require('wezterm')

local M = {}

function M.apply(config)
config.keys = {
{
key = 'k',
mods = 'CTRL | SHIFT',
action = wezterm.action.ShowDebugOverlay,
},
{
key = '^',
mods = 'CTRL',
action = wezterm.action.DisableDefaultAssignment,
},
}
config.debug_key_events = true
end


return M
28 changes: 28 additions & 0 deletions config/wezterm/wezterm.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
local wezterm = require('wezterm')
local appearance = require('appearance')
local keys = require('keys')

local config = wezterm.config_builder()

config.automatically_reload_config = true

config.font = wezterm.font('HackGen Console NF')
config.font_size = 11
config.check_for_updates = true

config.default_prog = {
'C:/Windows/system32/wsl.exe',
'--cd',
'~',
'--distribution',
'arch',
'--exec',
'/bin/zsh',
'-c',
'tmux new -A && exec zsh -i',
}

appearance.apply(config)
keys.apply(config)

return config
1 change: 1 addition & 0 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ install_dotfiels() {
make_symlink tmux $XDG_CONFIG_HOME/tmux
make_symlink npm $XDG_CONFIG_HOME/npm
make_symlink alacritty $XDG_CONFIG_HOME/alacritty
make_symlink wezterm $XDG_CONFIG_HOME/wezterm
make_symlink lsyncd $XDG_CONFIG_HOME/lsyncd
make_symlink systemd/user $XDG_CONFIG_HOME/systemd/user
}
Expand Down