feat: wezTerm session_manager
This commit is contained in:
parent
9a6396a898
commit
13eecb746e
@ -54,8 +54,12 @@ return {
|
|||||||
mods = "LEADER",
|
mods = "LEADER",
|
||||||
action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }),
|
action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }),
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
|
-- session manager
|
||||||
|
{ key = "s", mods = "LEADER", action = act({ EmitEvent = "save_session" }) },
|
||||||
|
{ key = "l", mods = "LEADER", action = act({ EmitEvent = "load_session" }) },
|
||||||
|
{ key = "r", mods = "LEADER", action = act({ EmitEvent = "restore_session" }) },
|
||||||
|
},
|
||||||
key_tables = {
|
key_tables = {
|
||||||
resize_pane = {
|
resize_pane = {
|
||||||
{ key = "LeftArrow", action = act.AdjustPaneSize({ "Left", 5 }) },
|
{ key = "LeftArrow", action = act.AdjustPaneSize({ "Left", 5 }) },
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
local wezterm = require("wezterm")
|
local wezterm = require("wezterm")
|
||||||
local mappings = require("modules.mappings")
|
local mappings = require("modules.mappings")
|
||||||
|
local session_manager = require("wezterm-session-manager/session-manager")
|
||||||
|
|
||||||
-- Show which key table is active in the status area
|
-- Show which key table is active in the status area
|
||||||
wezterm.on("update-right-status", function(window, pane)
|
wezterm.on("update-right-status", function(window, pane)
|
||||||
@ -10,9 +11,19 @@ wezterm.on("update-right-status", function(window, pane)
|
|||||||
window:set_right_status(name or "")
|
window:set_right_status(name or "")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
wezterm.on("save_session", function(window)
|
||||||
|
session_manager.save_state(window)
|
||||||
|
end)
|
||||||
|
wezterm.on("load_session", function(window)
|
||||||
|
session_manager.load_state(window)
|
||||||
|
end)
|
||||||
|
wezterm.on("restore_session", function(window)
|
||||||
|
session_manager.restore_state(window)
|
||||||
|
end)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
default_cursor_style = "BlinkingBlock",
|
default_cursor_style = "BlinkingBlock",
|
||||||
color_scheme = "Poimandres",
|
color_scheme = "Catppuccin Mocha",
|
||||||
colors = {
|
colors = {
|
||||||
cursor_bg = "#A6ACCD",
|
cursor_bg = "#A6ACCD",
|
||||||
cursor_border = "#A6ACCD",
|
cursor_border = "#A6ACCD",
|
||||||
@ -26,7 +37,7 @@ return {
|
|||||||
-- tab bar
|
-- tab bar
|
||||||
use_fancy_tab_bar = true,
|
use_fancy_tab_bar = true,
|
||||||
tab_bar_at_bottom = false,
|
tab_bar_at_bottom = false,
|
||||||
hide_tab_bar_if_only_one_tab = true,
|
hide_tab_bar_if_only_one_tab = false,
|
||||||
tab_max_width = 999999,
|
tab_max_width = 999999,
|
||||||
window_padding = {
|
window_padding = {
|
||||||
left = 7,
|
left = 7,
|
||||||
|
35
.gitconfig
35
.gitconfig
@ -1,6 +1,4 @@
|
|||||||
# This is Git's per-user configuration file.
|
|
||||||
[user]
|
[user]
|
||||||
# Please adapt and uncomment the following lines:
|
|
||||||
name = Aleksander Cynarski
|
name = Aleksander Cynarski
|
||||||
email = aleksander@cynarski.pl
|
email = aleksander@cynarski.pl
|
||||||
|
|
||||||
@ -13,18 +11,27 @@
|
|||||||
reflog = delta
|
reflog = delta
|
||||||
show = delta
|
show = delta
|
||||||
|
|
||||||
# Delta settings
|
|
||||||
# [delta]
|
|
||||||
# features = side-by-side line-numbers decorations
|
|
||||||
# syntax-theme = Dracula
|
|
||||||
# plus-style = syntax "#003800"
|
|
||||||
# minus-style = syntax "#3f0001"
|
|
||||||
|
|
||||||
[delta]
|
[delta]
|
||||||
plus-style = "syntax #012800"
|
plus-style = "syntax #012800"
|
||||||
minus-style = "syntax #340001"
|
minus-style = "syntax #340001"
|
||||||
syntax-theme = Monokai Extended
|
syntax-theme = Monokai Extended
|
||||||
navigate = true
|
navigate = true
|
||||||
side-by-side = true
|
side-by-side = true
|
||||||
|
|
||||||
|
[pretty]
|
||||||
|
slim = "%C(red)%h%C(yellow)%d%C(reset) %s %C(green)(%cd) %C(bold blue)<%an>%C(reset)"
|
||||||
|
|
||||||
|
[alias]
|
||||||
|
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
|
||||||
|
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
|
||||||
|
; lg = !"git lg2"
|
||||||
|
tree = "forest --pretty=format:\"%C(red)%h %C(magenta)(%ar) %C(blue)%an %C(reset)%s\" --style=15 --reverse"
|
||||||
|
lg = log --graph --pretty=slim --abbrev-commit --date=relative
|
||||||
|
; lg date: sorted by date and with absolute dates
|
||||||
|
lgd = log --graph --pretty=slim --abbrev-commit --date=local --date-order
|
||||||
|
; lg upstream: also show upstream branch
|
||||||
|
lgu = !git lg $( git rev-parse --symbolic @{u} ) HEAD
|
||||||
|
; lg date, upstream
|
||||||
|
lgdu = !git lgd $( git rev-parse --symbolic @{u} ) HEAD
|
||||||
|
; lg me: my commits from all branches, by date
|
||||||
|
lgme = !git lgd --author=\"$( git config --get user.name )\" --all
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit f4ed4460aa7cb2f9247c34265b91c5c6ac081bc2
|
|
Loading…
x
Reference in New Issue
Block a user