Add light/dark mode toggle for wezterm and new keybindings
This commit is contained in:
parent
53e5c16db3
commit
fc5dd7ee14
@ -39,6 +39,9 @@ super+o
|
|||||||
super+y
|
super+y
|
||||||
xclip -o | viewurl
|
xclip -o | viewurl
|
||||||
|
|
||||||
|
super+s
|
||||||
|
search
|
||||||
|
|
||||||
ctrl+shift+s
|
ctrl+shift+s
|
||||||
swap_monitor.sh
|
swap_monitor.sh
|
||||||
|
|
||||||
|
@ -4,15 +4,17 @@ local wezterm = require("wezterm")
|
|||||||
-- This will hold the configuration.
|
-- This will hold the configuration.
|
||||||
local config = wezterm.config_builder()
|
local config = wezterm.config_builder()
|
||||||
|
|
||||||
-- This is where you actually apply your config choices
|
-- Basic Wezterm settings
|
||||||
|
config.window_close_confirmation = "NeverPrompt"
|
||||||
-- For example, changing the color scheme:
|
config.automatically_reload_config = true
|
||||||
config.enable_tab_bar = false
|
config.enable_tab_bar = false
|
||||||
config.font = wezterm.font("FiraCode Nerd Font Mono")
|
config.font = wezterm.font("FiraCode Nerd Font Mono")
|
||||||
|
config.harfbuzz_features = { "calt=0", "clig=0", "liga=0" }
|
||||||
config.font_size = 9
|
config.font_size = 9
|
||||||
local light_mode = true
|
-- Color scheme configuration based on whether terminal is set to light mode
|
||||||
|
local light_mode = false
|
||||||
local home = os.getenv("HOME")
|
local home = os.getenv("HOME")
|
||||||
--if light_mode then
|
if light_mode then
|
||||||
config.colors = {
|
config.colors = {
|
||||||
-- The default text color
|
-- The default text color
|
||||||
foreground = "#4F5e68",
|
foreground = "#4F5e68",
|
||||||
@ -63,61 +65,61 @@ config.colors = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
config.window_background_opacity = 0.95
|
config.window_background_opacity = 0.95
|
||||||
--local f = io.open(home .. "/.config/nvim/light_mode", "w")
|
local f = io.open(home .. "/.config/nvim/light_mode", "w")
|
||||||
--assert(f)
|
assert(f)
|
||||||
--f:close()
|
f:close()
|
||||||
--else
|
else
|
||||||
-- config.colors = {
|
config.colors = {
|
||||||
-- -- The default text color
|
-- The default text color
|
||||||
-- foreground = "#8e8e8e",
|
foreground = "#8e8e8e",
|
||||||
-- -- The default background color
|
-- The default background color
|
||||||
-- background = "#191919",
|
background = "#191919",
|
||||||
--
|
|
||||||
-- -- Overrides the cell background color when the current cell is occupied by the
|
-- Overrides the cell background color when the current cell is occupied by the
|
||||||
-- -- cursor and the cursor style is set to Block
|
-- cursor and the cursor style is set to Block
|
||||||
-- cursor_bg = "#BBBBBB",
|
cursor_bg = "#BBBBBB",
|
||||||
-- -- Overrides the text color when the current cell is occupied by the cursor
|
-- Overrides the text color when the current cell is occupied by the cursor
|
||||||
-- cursor_fg = "#191919",
|
cursor_fg = "#191919",
|
||||||
-- -- Specifies the border color of the cursor when the cursor style is set to Block,
|
-- Specifies the border color of the cursor when the cursor style is set to Block,
|
||||||
-- -- or the color of the vertical or horizontal bar when the cursor style is set to
|
-- or the color of the vertical or horizontal bar when the cursor style is set to
|
||||||
-- -- Bar or Underline.
|
-- Bar or Underline.
|
||||||
-- cursor_border = "#BBBBBB",
|
cursor_border = "#BBBBBB",
|
||||||
--
|
|
||||||
-- -- the foreground color of selected text
|
-- the foreground color of selected text
|
||||||
-- selection_fg = "#191919",
|
selection_fg = "#191919",
|
||||||
-- -- the background color of selected text
|
-- the background color of selected text
|
||||||
-- selection_bg = "#BBBBBB",
|
selection_bg = "#BBBBBB",
|
||||||
--
|
|
||||||
-- -- The color of the scrollbar "thumb"; the portion that represents the current viewport
|
-- The color of the scrollbar "thumb"; the portion that represents the current viewport
|
||||||
-- scrollbar_thumb = "#222222",
|
scrollbar_thumb = "#222222",
|
||||||
--
|
|
||||||
-- -- The color of the split lines between panes
|
-- The color of the split lines between panes
|
||||||
-- split = "#444444",
|
split = "#444444",
|
||||||
--
|
|
||||||
-- ansi = {
|
ansi = {
|
||||||
-- "#191919",
|
"#191919",
|
||||||
-- "#DE6E7C",
|
"#DE6E7C",
|
||||||
-- "#819B69",
|
"#819B69",
|
||||||
-- "#B77E64",
|
"#B77E64",
|
||||||
-- "#6099C0",
|
"#6099C0",
|
||||||
-- "#B279A7",
|
"#B279A7",
|
||||||
-- "#66A5AD",
|
"#66A5AD",
|
||||||
-- "#BBBBBB",
|
"#BBBBBB",
|
||||||
-- },
|
},
|
||||||
-- brights = {
|
brights = {
|
||||||
-- "#3d3839",
|
"#3d3839",
|
||||||
-- "#E8838F",
|
"#E8838F",
|
||||||
-- "#8BAE68",
|
"#8BAE68",
|
||||||
-- "#D68C67",
|
"#D68C67",
|
||||||
-- "#61ABDA",
|
"#61ABDA",
|
||||||
-- "#CF86C1",
|
"#CF86C1",
|
||||||
-- "#65B8C1",
|
"#65B8C1",
|
||||||
-- "#8e8e8e",
|
"#8e8e8e",
|
||||||
-- },
|
},
|
||||||
-- }
|
}
|
||||||
-- config.window_background_opacity = 0.85
|
config.window_background_opacity = 0.85
|
||||||
-- os.remove(home .. "/.config/nvim/light_mode")
|
os.remove(home .. "/.config/nvim/light_mode")
|
||||||
--end
|
end
|
||||||
|
|
||||||
config.keys = {
|
config.keys = {
|
||||||
{ key = "j", mods = "CTRL|SHIFT", action = wezterm.action.DecreaseFontSize },
|
{ key = "j", mods = "CTRL|SHIFT", action = wezterm.action.DecreaseFontSize },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user