fixed speakers again
This commit is contained in:
parent
e4f9fdf172
commit
19ab4d5d20
9 changed files with 2369 additions and 2147 deletions
|
@ -28,4 +28,14 @@ keybind = ctrl+alt+right=next_tab
|
|||
keybind = ctrl+alt+up=goto_split:left
|
||||
keybind = ctrl+alt+down=goto_split:right
|
||||
keybind = ctrl+backspace=text:\x1b\x7f
|
||||
keybind = ctrl+shift+k=clear_screen
|
||||
# keybind = ctrl+shift+k=clear_screen
|
||||
|
||||
# disabled bindings for testing zellij
|
||||
# keybind = ctrl+t=unbind
|
||||
# keybind = ctrl+w=unbind
|
||||
# keybind = ctrl+alt+right=unbind
|
||||
# keybind = ctrl+alt+left=unbind
|
||||
# keybind = ctrl+alt+up=unbind
|
||||
# keybind = ctrl+alt+down=unbind
|
||||
# keybind = ctrl+enter=unbind
|
||||
# keybind = ctrl+shift+enter=unbind
|
||||
|
|
|
@ -1,31 +1,79 @@
|
|||
local wezterm = require 'wezterm'
|
||||
local config = wezterm.config_builder()
|
||||
local act = wezterm.action
|
||||
local io = require 'io'
|
||||
local os = require 'os'
|
||||
|
||||
-- config.default_prog = { 'fish', '-l' }
|
||||
|
||||
wezterm.on('trigger-emacs-with-scrollback', function(window, pane)
|
||||
-- Retrieve the text from the pane
|
||||
local text = pane:get_lines_as_text(pane:get_dimensions().scrollback_rows)
|
||||
|
||||
-- Create a temporary file to pass to vim
|
||||
local name = os.tmpname()
|
||||
local f = io.open(name, 'w+')
|
||||
f:write(text)
|
||||
f:flush()
|
||||
f:close()
|
||||
|
||||
-- Open a new window running vim and tell it to open the file
|
||||
window:perform_action(
|
||||
act.SpawnCommandInNewWindow {
|
||||
args = { 'em', name },
|
||||
},
|
||||
pane
|
||||
)
|
||||
|
||||
-- Wait "enough" time for vim to read the file before we remove it.
|
||||
-- The window creation and process spawn are asynchronous wrt. running
|
||||
-- this script and are not awaitable, so we just pick a number.
|
||||
--
|
||||
-- Note: We don't strictly need to remove this file, but it is nice
|
||||
-- to avoid cluttering up the temporary directory.
|
||||
wezterm.sleep_ms(1000)
|
||||
os.remove(name)
|
||||
end)
|
||||
|
||||
-- plugins
|
||||
local domains = wezterm.plugin.require("https://github.com/DavidRR-F/quick_domains.wezterm")
|
||||
local tabline = wezterm.plugin.require("https://github.com/michaelbrusegard/tabline.wez")
|
||||
local workspace_switcher = wezterm.plugin.require("https://github.com/MLFlexer/smart_workspace_switcher.wezterm")
|
||||
|
||||
config.enable_wayland = false;
|
||||
config.front_end = "WebGpu";
|
||||
|
||||
local bar = wezterm.plugin.require("https://github.com/adriankarlen/bar.wezterm")
|
||||
|
||||
config.font_size = 12
|
||||
config.font_size = 11
|
||||
config.font = wezterm.font {
|
||||
family = 'JetBrains Mono',
|
||||
weight = 'Medium'
|
||||
}
|
||||
|
||||
config.color_scheme = 'Adventure'
|
||||
-- config.enable_scroll_bar = true
|
||||
|
||||
config.color_scheme = 'Adventure'
|
||||
config.colors = {
|
||||
background = "#111111",
|
||||
tab_bar = {
|
||||
background = "#111111",
|
||||
inactive_tab = {
|
||||
fg_color = "#444444",
|
||||
bg_color = "#000000"
|
||||
bg_color = "#111111"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config.background = {
|
||||
{
|
||||
source = {
|
||||
Color = '#111111'
|
||||
},
|
||||
width = "100%",
|
||||
height = "100%",
|
||||
opacity = 1
|
||||
}
|
||||
}
|
||||
|
||||
config.window_decorations = "TITLE|RESIZE"
|
||||
|
||||
config.window_padding = {
|
||||
|
@ -61,6 +109,11 @@ config.keys = {
|
|||
mods = 'CTRL',
|
||||
action = wezterm.action.CloseCurrentTab { confirm = true },
|
||||
},
|
||||
{
|
||||
key = 'w',
|
||||
mods = 'CTRL|SHIFT',
|
||||
action = act.DetachDomain 'CurrentPaneDomain',
|
||||
},
|
||||
{
|
||||
key = 'k',
|
||||
mods = 'CTRL|SHIFT',
|
||||
|
@ -75,20 +128,25 @@ config.keys = {
|
|||
action = wezterm.action.TogglePaneZoomState,
|
||||
},
|
||||
{
|
||||
key = 'w',
|
||||
key = 'E',
|
||||
mods = 'CTRL',
|
||||
action = wezterm.action.CloseCurrentPane { confirm = true },
|
||||
action = act.EmitEvent 'trigger-emacs-with-scrollback',
|
||||
},
|
||||
{
|
||||
key = 'o',
|
||||
mods = 'CTRL',
|
||||
action = wezterm.action.ShowLauncher
|
||||
},
|
||||
|
||||
{ key="Backspace", mods="CTRL", action=act.SendKey { key="Backspace", mods="META" } },
|
||||
|
||||
{ key='t', mods='CTRL', action=act { SpawnCommandInNewTab = { cwd = wezterm.home_dir } } },
|
||||
|
||||
{key="LeftArrow", mods="CTRL|META", action=act.ActivateTabRelative(-1)},
|
||||
{key="RightArrow", mods="CTRL|META", action=act.ActivateTabRelative(1)},
|
||||
{ key="LeftArrow", mods="CTRL|META", action=act.ActivateTabRelative(-1) },
|
||||
{ key="RightArrow", mods="CTRL|META", action=act.ActivateTabRelative(1) },
|
||||
|
||||
{key="UpArrow", mods="CTRL|META", action=act.ActivatePaneDirection("Prev")},
|
||||
{key="DownArrow", mods="CTRL|META", action=act.ActivatePaneDirection("Next")},
|
||||
{ key="UpArrow", mods="CTRL|META", action=act.ActivatePaneDirection("Prev") },
|
||||
{ key="DownArrow", mods="CTRL|META", action=act.ActivatePaneDirection("Next") },
|
||||
|
||||
{ key='h', mods='CTRL|META', action=wezterm.action{ActivatePaneDirection="Left"} },
|
||||
{ key='l', mods='CTRL|META', action=wezterm.action{ActivatePaneDirection="Right"} },
|
||||
|
@ -96,65 +154,111 @@ config.keys = {
|
|||
{ key='k', mods='CTRL|META', action=wezterm.action{ActivatePaneDirection="Down"} },
|
||||
}
|
||||
|
||||
local barconfig = {
|
||||
position = "bottom",
|
||||
max_width = 32,
|
||||
separator = {
|
||||
space = 2,
|
||||
left_icon = wezterm.nerdfonts.fa_long_arrow_right,
|
||||
right_icon = wezterm.nerdfonts.fa_long_arrow_left,
|
||||
field_icon = wezterm.nerdfonts.indent_line,
|
||||
},
|
||||
modules = {
|
||||
tabs = {
|
||||
active_tab_fg = 4,
|
||||
inactive_tab_fg = 8, -- overridden by tab colour customization near the top
|
||||
tabline.setup({
|
||||
options = {
|
||||
theme = 'Adventure',
|
||||
theme_overrides = {
|
||||
background = "#111111",
|
||||
tab = {
|
||||
active = { fg = '#eeeeee', bg = '#111111' },
|
||||
inactive = { fg = '#999999', bg = '#111111' },
|
||||
inactive_hover = { fg = '#cccccc', bg = '#111111' },
|
||||
},
|
||||
normal_mode = {
|
||||
a = { bg = "#333333", fg = "#eeeeee" },
|
||||
b = { bg = "#111111", fg = "#eeeeee" },
|
||||
c = { bg = "#111111", fg = "#eeeeee" },
|
||||
x = { bg = "#111111", fg = "#eeeeee" },
|
||||
y = { bg = "#111111", fg = "#eeeeee" },
|
||||
z = { bg = "#333333", fg = "#eeeeee" },
|
||||
},
|
||||
copy_mode = {
|
||||
b = { bg = "#222222", fg = "#eeeeee" }
|
||||
}
|
||||
},
|
||||
section_separators = {
|
||||
left = wezterm.nerdfonts.ple_right_half_circle_thick,
|
||||
right = wezterm.nerdfonts.ple_left_half_circle_thick,
|
||||
},
|
||||
component_separators = {
|
||||
left = wezterm.nerdfonts.ple_right_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,
|
||||
},
|
||||
icons_enabled = true,
|
||||
tabs_enabled = true,
|
||||
},
|
||||
workspace = {
|
||||
enabled = true,
|
||||
icon = wezterm.nerdfonts.cod_window,
|
||||
color = 8,
|
||||
sections = {
|
||||
tabline_a = { 'workspace' },
|
||||
tabline_b = { '' },
|
||||
tabline_c = { '' },
|
||||
tab_active = {
|
||||
'index',
|
||||
{ 'process', icons_only = true, process_to_icon = { ['fish'] = wezterm.nerdfonts.cod_terminal } },
|
||||
{ 'parent', padding = 0 },
|
||||
'/',
|
||||
{ 'cwd', padding = { left = 0, right = 1 } },
|
||||
{ 'zoomed', padding = 0 },
|
||||
},
|
||||
tab_inactive = {
|
||||
'index',
|
||||
{ 'process', process_to_icon = { ['fish'] = wezterm.nerdfonts.cod_terminal } },
|
||||
{ 'parent', padding = 0 },
|
||||
'/',
|
||||
{ 'cwd', padding = { left = 0, right = 1 } },
|
||||
{ 'zoomed', padding = 0 },
|
||||
},
|
||||
tabline_x = { '' },
|
||||
tabline_y = { '' },
|
||||
tabline_z = { 'domain' },
|
||||
},
|
||||
leader = {
|
||||
enabled = true,
|
||||
icon = wezterm.nerdfonts.oct_rocket,
|
||||
color = 2,
|
||||
extensions = {
|
||||
smart_workspace_switcher,
|
||||
quick_domains
|
||||
},
|
||||
pane = {
|
||||
enabled = false,
|
||||
icon = wezterm.nerdfonts.cod_multiple_windows,
|
||||
color = 7,
|
||||
},
|
||||
username = {
|
||||
enabled = false,
|
||||
icon = wezterm.nerdfonts.fa_user,
|
||||
color = 6,
|
||||
},
|
||||
hostname = {
|
||||
enabled = false,
|
||||
icon = wezterm.nerdfonts.cod_server,
|
||||
color = 8,
|
||||
},
|
||||
clock = {
|
||||
enabled = false,
|
||||
icon = wezterm.nerdfonts.md_calendar_clock,
|
||||
color = 5,
|
||||
},
|
||||
cwd = {
|
||||
enabled = false,
|
||||
icon = wezterm.nerdfonts.oct_file_directory,
|
||||
color = 7,
|
||||
},
|
||||
spotify = {
|
||||
enabled = false,
|
||||
icon = wezterm.nerdfonts.fa_spotify,
|
||||
color = 3,
|
||||
max_width = 64,
|
||||
throttle = 15,
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
bar.apply_to_config(config, barconfig)
|
||||
tabline.apply_to_config(config)
|
||||
|
||||
domains.apply_to_config(
|
||||
config,
|
||||
{
|
||||
keys = {
|
||||
-- open domain in new tab
|
||||
attach = {
|
||||
-- mod keys for fuzzy domain finder
|
||||
mods = 'CTRL|SHIFT',
|
||||
-- base key for fuzzy domain finder
|
||||
key = 'a',
|
||||
-- key table to insert key map to if any
|
||||
tbl = '',
|
||||
},
|
||||
-- open domain in split pane
|
||||
-- excludes remote domains
|
||||
-- add remote domains as exec domain for split binds
|
||||
vsplit = {
|
||||
key = 'v',
|
||||
mods = 'CTRL',
|
||||
tbl = 'tmux'
|
||||
},
|
||||
hsplit = {
|
||||
key = 'h',
|
||||
mods = 'CTRL',
|
||||
tbl = 'tmux'
|
||||
}
|
||||
},
|
||||
auto = {
|
||||
ssh_ignore = false,
|
||||
exec_ignore = {
|
||||
ssh = false
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
workspace_switcher.apply_to_config(config)
|
||||
|
||||
return config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue