Dotfiles V.1.1.5

Updated Neovim Plugins as well as cleaned up aerospace config and
sketbar config and added fastfetch config
This commit is contained in:
2025-06-11 22:16:38 +02:00
parent 1f4666f417
commit af9d88c05f
100 changed files with 2045 additions and 3328 deletions

View File

@@ -0,0 +1,39 @@
-- Pull in the wezterm API
local wezterm = require("wezterm")
-- require plugin
local sessionizer = wezterm.plugin.require("https://github.com/mikkasendke/sessionizer.wezterm")
-- initialize module vairable
local module = {}
local my_schema = {
"default",
" EDU",
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/fs25/nus_II",
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/fs25/physik_I",
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/fs25/analysis_II",
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/fs25/informatik_I",
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/fs25/grundzuege_recht",
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/fs25/mathematische_methoden",
wezterm.home_dir .. "/Informatik_ETH/SS25/Informatik",
"󱂒 Makerspace",
wezterm.home_dir .. "/kicad",
wezterm.home_dir .. "/Nextcloud/Vault/maker_space",
" DEV",
sessionizer.FdSearch({ fd_path = "/opt/homebrew/bin/fd", wezterm.home_dir .. "/Projects" }),
}
-- key map
module.keys = {
{
key = "s",
mods = "LEADER",
action = sessionizer.show(my_schema),
},
}
return module

View File

@@ -0,0 +1,57 @@
local wezterm = require("wezterm")
-- if you are *NOT* lazy-loading smart-splits.nvim (recommended)
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
-- if you *ARE* lazy-loading smart-splits.nvim (not recommended)
-- you have to use this instead, but note that this will not work
-- in all cases (e.g. over an SSH connection). Also note that
-- `pane:get_foreground_process_name()` can have high and highly variable
-- latency, so the other implementation of `is_vim()` will be more
-- performant as well.
local direction_keys = {
h = "Left",
j = "Down",
k = "Up",
l = "Right",
}
local function split_nav(resize_or_move, key)
return {
key = key,
mods = resize_or_move == "resize" and "CTRL|SHIFT" 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 "CTRL|SHIFT" 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
return {
keys = {
-- move between split panes
split_nav("move", "h"),
split_nav("move", "j"),
split_nav("move", "k"),
split_nav("move", "l"),
-- resize panes
split_nav("resize", "h"),
split_nav("resize", "j"),
split_nav("resize", "k"),
split_nav("resize", "l"),
},
}

View File

@@ -0,0 +1,50 @@
-- Pull in the wezterm API
local wezterm = require("wezterm")
-- require plugin
local tabline = wezterm.plugin.require("https://github.com/michaelbrusegard/tabline.wez")
-- initialize module variable
local module = {}
-- initialize setup function
function module.apply_to_config(config)
tabline.setup({
options = {
theme = "Catppuccin Macchiato",
section_separators = {
left = wezterm.nerdfonts.ple_right_half_circle_thick,
right = wezterm.nerdfonts.ple_left_half_circle_thick,
},
component_separators = {
left = wezterm.nerdfonts.ple_left_half_circle_thin,
right = wezterm.nerdfonts.ple_left_half_circle_thin,
},
tab_separators = {
left = wezterm.nerdfonts.ple_right_half_circle_thick,
right = wezterm.nerdfonts.ple_left_half_circle_thick,
},
},
sections = {
tab_active = {
"index",
":",
"tab",
},
tab_inactive = {
"index",
":",
"tab",
},
tabline_x = {},
tabline_y = {},
tabline_z = { "datetime" },
},
})
end
return module

235
.config/wezterm/wezterm.lua Normal file
View File

@@ -0,0 +1,235 @@
-- Pull in the wezterm API
local wezterm = require("wezterm")
-- This will hold the configuration.
local config = wezterm.config_builder()
-- Wezterm plugins
local sessionizer = require("plugins/sessionizer")
local tabline = require("plugins/tabline")
local smart_splits = require("plugins/smart_splits")
-- This will hold the actions
local actions = wezterm.action
-- TMUX config
-- Leader key like in TMUX
config.leader = { key = "a", mods = "CTRL", timeout_milliseconds = 1000 }
-- unix socket to enable sessions
config.unix_domains = {
{
name = "unix",
},
}
-- general keybindings
config.keys = {
{
key = "p",
mods = "CTRL",
action = wezterm.action.ShowDebugOverlay,
},
{
-- sessionizer
key = "s",
mods = "LEADER|SHIFT",
action = actions.PromptInputLine({
description = wezterm.format({
{ Attribute = { Intensity = "Bold" } },
{ Foreground = { AnsiColor = "Fuchsia" } },
{ Text = "Enter name for new workspace" },
}),
action = wezterm.action_callback(function(window, pane, line)
if line then
window:perform_action(
actions.SwitchToWorkspace({
name = line,
}),
pane
)
end
end),
}),
},
{
-- Maximize Pane
key = "m",
mods = "LEADER",
action = actions.TogglePaneZoomState,
},
-- Split Panes
{
key = "-",
mods = "LEADER",
action = actions.SplitVertical,
},
{
key = "|",
mods = "LEADER",
action = actions.SplitHorizontal,
},
-- Rename Session or Tab
{
key = ",",
mods = "LEADER",
action = wezterm.action.PromptInputLine({
description = "Enter new workspace name",
action = wezterm.action_callback(function(window, pane, line)
if line and line ~= "" then
window:set_workspace(line)
wezterm.notify("Workspace renamed to: " .. line, "WezTerm", { urgency = "normal" })
else
wezterm.notify("Workspace rename cancelled", "WezTerm", { urgency = "normal" })
end
end),
}),
},
{
key = ".",
mods = "LEADER",
action = wezterm.action.PromptInputLine({
description = "Enter new tab title",
action = wezterm.action_callback(function(window, pane, line)
if line and line ~= "" then
pane:tab():set_title(line)
wezterm.notify("Tab renamed to: " .. line, "WezTerm", { urgency = "normal" })
else
wezterm.notify("Tab rename cancelled", "WezTerm", { urgency = "normal" })
end
end),
}),
},
-- Create and Kill Tab
{
key = "c",
mods = "LEADER",
action = actions.SpawnCommandInNewTab,
},
{
key = "x",
mods = "LEADER",
action = wezterm.action_callback(function(window, pane)
local tab = pane:tab()
if tab then
local pane_count = #tab:panes()
if pane_count > 1 then
window:perform_action(wezterm.action.CloseCurrentPane({ confirm = false }), pane)
else
window:perform_action(wezterm.action.CloseCurrentTab({ confirm = false }), pane)
end
else
wezterm.notify("No tab found, cannot close", "WezTerm", { urgency = "normal" })
end
end),
},
-- Move Tab to index
{
key = "/",
mods = "LEADER",
action = wezterm.action.PromptInputLine({
description = "Move Tab to Index",
action = wezterm.action_callback(function(window, pane, line)
if not line or line == "" then
wezterm.notify("Tab move cancelled", "WezTerm", { urgency = "normal" })
return
end
local index = tonumber(line)
if not index then
wezterm.notify("Invalid index: must be a number", "WezTerm", { urgency = "normal" })
return
end
-- Convert 1-based user input to 0-based index
index = index - 1
local tab_count = #window:mux_window():tabs()
if index < 0 or index >= tab_count then
wezterm.notify(
"Invalid index: must be between 1 and " .. tab_count,
"WezTerm",
{ urgency = "normal" }
)
return
end
window:perform_action(wezterm.action.MoveTab(index), pane)
wezterm.notify("Tab moved to index: " .. (index + 1), "WezTerm", { urgency = "normal" })
end),
}),
},
-- Move to next and previous Tab
{
key = "n",
mods = "LEADER",
action = actions.ActivateTabRelative(1),
},
{
key = "p",
mods = "LEADER",
action = actions.ActivateTabRelative(-1),
},
-- Vim Mode
{
key = "]",
mods = "LEADER",
action = actions.ActivateCopyMode,
},
}
-- Go to Tab with index
for i = 1, 8 do
-- LEADER + number to move to that position
table.insert(config.keys, {
key = tostring(i),
mods = "LEADER",
action = actions.ActivateTab(i - 1),
})
end
-- This causes `wezterm` to act as though it was started as
-- `wezterm connect unix` by default, connecting to the unix
-- domain on startup.
-- If you prefer to connect manually, leave out this line.
config.default_gui_startup_args = { "connect", "unix" }
-- Tabline plugin
tabline.apply_to_config(config)
-- Append keys from plugins
for _, key in ipairs(sessionizer.keys) do
table.insert(config.keys, key)
end
for _, key in ipairs(smart_splits.keys) do
table.insert(config.keys, key)
end
-- Font Config
config.font = wezterm.font({
family = "JetBrainsMono Nerd Font",
assume_emoji_presentation = false,
})
config.font_size = 13
-- Color Scheme
config.color_scheme = "Catppuccin Macchiato"
-- Window Config
config.window_decorations = "RESIZE"
config.use_fancy_tab_bar = false
--Key Config
config.send_composed_key_when_left_alt_is_pressed = true
return config