Dotfiles V1.3.0
- Modified Wezterm Sessionizer - Added .stow-local-ignore - Added Brewfile
This commit is contained in:
@@ -9,20 +9,45 @@ local sessionizer = wezterm.plugin.require("https://github.com/mikkasendke/sessi
|
||||
|
||||
local module = {}
|
||||
|
||||
local my_schema = {
|
||||
local edu_schema = {
|
||||
options = {
|
||||
prompt = "Select a project: ",
|
||||
},
|
||||
"default",
|
||||
" EDU",
|
||||
wezterm.home_dir .. "/Polybox_ETH/",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/hs25/analysis_I",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/hs25/einfuehrung_mikrooekonomie",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/hs25/information_systems_for_engineers",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/hs25/manufacturing_of_electronic_devices",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/hs25/startups_und_recht",
|
||||
" Makerspace",
|
||||
wezterm.home_dir .. "/kicad",
|
||||
sessionizer.FdSearch({ fd_path = "/opt/homebrew/bin/fd", wezterm.home_dir .. "/Projects/EDU" }),
|
||||
}
|
||||
|
||||
local sw_schema = {
|
||||
options = {
|
||||
prompt = "Select a project: ",
|
||||
},
|
||||
"default",
|
||||
{ label = "JirR02", id = wezterm.home_dir .. "/Projects/JirR02" },
|
||||
{ label = "blogwiki", id = wezterm.home_dir .. "/Projects/JR/blogwiki" },
|
||||
sessionizer.FdSearch({ fd_path = "/opt/homebrew/bin/fd", wezterm.home_dir .. "/Projects/JR/sw" }),
|
||||
sessionizer.FdSearch({ fd_path = "/opt/homebrew/bin/fd", wezterm.home_dir .. "/Projects/Private" }),
|
||||
sessionizer.FdSearch({ fd_path = "/opt/homebrew/bin/fd", wezterm.home_dir .. "~/Projects/Public" }),
|
||||
}
|
||||
|
||||
local hw_schema = {
|
||||
options = {
|
||||
prompt = "Select a project: ",
|
||||
},
|
||||
"default",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/maker_space",
|
||||
" DEV",
|
||||
sessionizer.FdSearch({ fd_path = "/opt/homebrew/bin/fd", wezterm.home_dir .. "/Projects" }),
|
||||
sessionizer.FdSearch({ fd_path = "/opt/homebrew/bin/fd", wezterm.home_dir .. "/Projects/JR/hw" }),
|
||||
}
|
||||
|
||||
local choice = {
|
||||
{ label = "EDU", id = "edu" },
|
||||
{ label = "JR Software", id = "sw" },
|
||||
{ label = "JR Hardware", id = "hw" },
|
||||
}
|
||||
|
||||
-- key map
|
||||
@@ -31,7 +56,34 @@ module.keys = {
|
||||
{
|
||||
key = "s",
|
||||
mods = "LEADER",
|
||||
action = sessionizer.show(my_schema),
|
||||
action = wezterm.action_callback(function(window, pane)
|
||||
window:perform_action(
|
||||
wezterm.action.InputSelector({
|
||||
title = "Choose Session Category",
|
||||
choices = choice,
|
||||
action = wezterm.action_callback(function(inner_window, inner_pane, id, label)
|
||||
-- If the user escapes/cancels, do nothing
|
||||
if not id then
|
||||
return
|
||||
end
|
||||
|
||||
-- Select the schema based on the ID chosen
|
||||
local selected_schema
|
||||
if id == "edu" then
|
||||
selected_schema = edu_schema
|
||||
elseif id == "sw" then
|
||||
selected_schema = sw_schema
|
||||
elseif id == "hw" then
|
||||
selected_schema = hw_schema
|
||||
end
|
||||
|
||||
-- Now trigger the actual sessionizer with the sub-schema
|
||||
inner_window:perform_action(sessionizer.show(selected_schema), inner_pane)
|
||||
end),
|
||||
}),
|
||||
pane
|
||||
)
|
||||
end),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user