flake update and wezterm config update
This commit is contained in:
parent
fb2e770b02
commit
772fb5cd4e
24
flake.lock
24
flake.lock
|
@ -7,11 +7,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730016908,
|
"lastModified": 1730490306,
|
||||||
"narHash": "sha256-bFCxJco7d8IgmjfNExNz9knP8wvwbXU4s/d53KOK6U0=",
|
"narHash": "sha256-AvCVDswOUM9D368HxYD25RsSKp+5o0L0/JHADjLoD38=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "e83414058edd339148dc142a8437edb9450574c8",
|
"rev": "1743615b61c7285976f85b303a36cdf88a556503",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -27,11 +27,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730184279,
|
"lastModified": 1730448474,
|
||||||
"narHash": "sha256-6OB+WWR6gnaWiqSS28aMJypKeK7Pjc2Wm6L0MtOrTuA=",
|
"narHash": "sha256-qE/cYKBhzxHMtKtLK3hlSR3uzO1pWPGLrBuQK7r0CHc=",
|
||||||
"owner": "LnL7",
|
"owner": "LnL7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "b379bd4d872d159e5189053ce9a4adf86d56db4b",
|
"rev": "683d0c4cd1102dcccfa3f835565378c7f3cbe05e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -42,11 +42,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729880355,
|
"lastModified": 1730200266,
|
||||||
"narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=",
|
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "18536bf04cd71abd345f9579158841376fdd0c5a",
|
"rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -58,11 +58,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730340513,
|
"lastModified": 1730510022,
|
||||||
"narHash": "sha256-CZmauwFFJ80mo4eXkQ+5R0MfD5szzWXDCG7M2sJbZg8=",
|
"narHash": "sha256-/FKsDxYEDNScuYuh9UjBwW8+f6WxjoRke8LvbF+ckjc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "73638442a5d792fd3d922d014c856e3970d185f3",
|
"rev": "41c8b0a22b37fb114413b504c74ae64065d2fb83",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
4
home.nix
4
home.nix
|
@ -81,7 +81,7 @@
|
||||||
rclone
|
rclone
|
||||||
readline
|
readline
|
||||||
ripgrep
|
ripgrep
|
||||||
# ripgrep-all
|
ripgrep-all
|
||||||
rustup
|
rustup
|
||||||
sbt
|
sbt
|
||||||
scala-cli
|
scala-cli
|
||||||
|
@ -292,6 +292,6 @@
|
||||||
# Neovim Configuration
|
# Neovim Configuration
|
||||||
xdg.configFile."nvim".source = builtins.fetchGit {
|
xdg.configFile."nvim".source = builtins.fetchGit {
|
||||||
url = "https://code.softinio.com/softinio/nvim-config";
|
url = "https://code.softinio.com/softinio/nvim-config";
|
||||||
rev = "2b0701c8a09c0c720faa89598725e8f7120ed676";
|
rev = "902fbd939c74ece8fabe543e511af36471a1a197";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,39 @@
|
||||||
local wezterm = require 'wezterm'
|
local wezterm = require 'wezterm'
|
||||||
local act = wezterm.action
|
local act = wezterm.action
|
||||||
|
|
||||||
|
local function is_vim(pane)
|
||||||
|
-- this is set by the plugin, and unset on ExitPre in Neovim
|
||||||
|
return pane:get_user_vars().IS_NVIM == 'true'
|
||||||
|
end
|
||||||
|
|
||||||
|
local direction_keys = {
|
||||||
|
a = 'Left',
|
||||||
|
o = 'Down',
|
||||||
|
e = 'Up',
|
||||||
|
u = 'Right',
|
||||||
|
}
|
||||||
|
|
||||||
|
local function split_nav(resize_or_move, key)
|
||||||
|
return {
|
||||||
|
key = key,
|
||||||
|
mods = resize_or_move == 'resize' and 'META' or 'CTRL',
|
||||||
|
action = wezterm.action_callback(function(win, pane)
|
||||||
|
if is_vim(pane) then
|
||||||
|
-- pass the keys through to vim/nvim
|
||||||
|
win:perform_action({
|
||||||
|
SendKey = { key = key, mods = resize_or_move == 'resize' and 'META' or 'CTRL' },
|
||||||
|
}, pane)
|
||||||
|
else
|
||||||
|
if resize_or_move == 'resize' then
|
||||||
|
win:perform_action({ AdjustPaneSize = { direction_keys[key], 3 } }, pane)
|
||||||
|
else
|
||||||
|
win:perform_action({ ActivatePaneDirection = direction_keys[key] }, pane)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
wezterm.on('update-right-status', function(window, pane)
|
wezterm.on('update-right-status', function(window, pane)
|
||||||
window:set_right_status(window:active_workspace())
|
window:set_right_status(window:active_workspace())
|
||||||
end)
|
end)
|
||||||
|
@ -10,6 +43,7 @@ return {
|
||||||
check_for_updates = false,
|
check_for_updates = false,
|
||||||
-- color_scheme = "Gruvbox Light";
|
-- color_scheme = "Gruvbox Light";
|
||||||
color_scheme = 'tokyonight',
|
color_scheme = 'tokyonight',
|
||||||
|
default_gui_startup_args = { 'connect', 'unix' },
|
||||||
font = wezterm.font 'SF Mono',
|
font = wezterm.font 'SF Mono',
|
||||||
font_size = 16,
|
font_size = 16,
|
||||||
dpi = 144,
|
dpi = 144,
|
||||||
|
@ -26,11 +60,15 @@ return {
|
||||||
remote_wezterm_path = '/run/current-system/sw/bin/wezterm',
|
remote_wezterm_path = '/run/current-system/sw/bin/wezterm',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
unix_domains = {
|
||||||
|
{
|
||||||
|
name = 'unix',
|
||||||
|
},
|
||||||
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ key = '-', mods = 'LEADER', action = wezterm.action { SplitVertical = { domain = 'CurrentPaneDomain' } } },
|
{ key = '-', mods = 'LEADER', action = wezterm.action { SplitVertical = { domain = 'CurrentPaneDomain' } } },
|
||||||
{ key = "'", mods = 'LEADER', action = wezterm.action { SplitHorizontal = { domain = 'CurrentPaneDomain' } } },
|
{ key = "'", mods = 'LEADER', action = wezterm.action { SplitHorizontal = { domain = 'CurrentPaneDomain' } } },
|
||||||
{ key = 'k', mods = 'SUPER', action = act.TogglePaneZoomState },
|
{ key = 'k', mods = 'SUPER', action = act.TogglePaneZoomState },
|
||||||
{ key = 'c', mods = 'LEADER', action = wezterm.action { SpawnTab = 'CurrentPaneDomain' } },
|
|
||||||
{ key = 'h', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Left' } },
|
{ key = 'h', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Left' } },
|
||||||
{ key = 'j', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Down' } },
|
{ key = 'j', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Down' } },
|
||||||
{ key = 'k', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Up' } },
|
{ key = 'k', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Up' } },
|
||||||
|
@ -57,6 +95,50 @@ return {
|
||||||
{ key = 't', mods = 'SUPER', action = act.SpawnTab 'CurrentPaneDomain' },
|
{ key = 't', mods = 'SUPER', action = act.SpawnTab 'CurrentPaneDomain' },
|
||||||
{ key = 'q', mods = 'SUPER', action = act.QuitApplication },
|
{ key = 'q', mods = 'SUPER', action = act.QuitApplication },
|
||||||
{ key = 'i', mods = 'CTRL|SHIFT', action = act.SwitchToWorkspace },
|
{ key = 'i', mods = 'CTRL|SHIFT', action = act.SwitchToWorkspace },
|
||||||
|
{
|
||||||
|
key = 'S',
|
||||||
|
mods = 'CTRL|SHIFT',
|
||||||
|
action = wezterm.action_callback(function(window, pane)
|
||||||
|
-- Here you can dynamically construct a longer list if needed
|
||||||
|
|
||||||
|
local home = wezterm.home_dir
|
||||||
|
local workspaces = {
|
||||||
|
{ id = home, label = 'Home' },
|
||||||
|
{ id = home .. '/Projects', label = 'My Projects' },
|
||||||
|
{ id = home .. '/OpenSource', label = 'Open Source Projects' },
|
||||||
|
{ id = home .. '/.config/nixpkgs', label = 'Nix Config' },
|
||||||
|
{ id = home .. '/Projects/scalanews', label = 'Scala News' },
|
||||||
|
}
|
||||||
|
|
||||||
|
window:perform_action(
|
||||||
|
act.InputSelector {
|
||||||
|
action = wezterm.action_callback(function(inner_window, inner_pane, id, label)
|
||||||
|
if not id and not label then
|
||||||
|
wezterm.log_info 'cancelled'
|
||||||
|
else
|
||||||
|
wezterm.log_info('id = ' .. id)
|
||||||
|
wezterm.log_info('label = ' .. label)
|
||||||
|
inner_window:perform_action(
|
||||||
|
act.SwitchToWorkspace {
|
||||||
|
name = label,
|
||||||
|
spawn = {
|
||||||
|
label = 'Workspace: ' .. label,
|
||||||
|
cwd = id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
inner_pane
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
title = 'Choose Workspace',
|
||||||
|
choices = workspaces,
|
||||||
|
fuzzy = true,
|
||||||
|
fuzzy_description = 'Fuzzy find and/or make a workspace',
|
||||||
|
},
|
||||||
|
pane
|
||||||
|
)
|
||||||
|
end),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key = '9',
|
key = '9',
|
||||||
mods = 'ALT',
|
mods = 'ALT',
|
||||||
|
@ -65,6 +147,16 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ key = 'Tab', mods = 'CTRL', action = wezterm.action.DisableDefaultAssignment },
|
{ key = 'Tab', mods = 'CTRL', action = wezterm.action.DisableDefaultAssignment },
|
||||||
|
-- move between split panes
|
||||||
|
split_nav('move', 'a'),
|
||||||
|
split_nav('move', 'o'),
|
||||||
|
split_nav('move', 'e'),
|
||||||
|
split_nav('move', 'u'),
|
||||||
|
-- resize panes
|
||||||
|
split_nav('resize', 'a'),
|
||||||
|
split_nav('resize', 'o'),
|
||||||
|
split_nav('resize', 'e'),
|
||||||
|
split_nav('resize', 'u'),
|
||||||
},
|
},
|
||||||
-- temp fix
|
-- temp fix
|
||||||
front_end = 'WebGpu',
|
front_end = 'WebGpu',
|
||||||
|
|
Loading…
Reference in a new issue