remove wezterm,tmux,ghostty and add kitty back
This commit is contained in:
parent
03cfe695a0
commit
c081796699
8 changed files with 26 additions and 314 deletions
12
flake.lock
generated
12
flake.lock
generated
|
@ -28,11 +28,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742588233,
|
||||
"narHash": "sha256-Fi5g8H5FXMSRqy+mU6gPG0v+C9pzjYbkkiePtz8+PpA=",
|
||||
"lastModified": 1742670145,
|
||||
"narHash": "sha256-xQ2F9f+ICAGBp/nNv3ddD2U4ZvzuLOci0u/5lyMXPvk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "296ddc64627f4a6a4eb447852d7346b9dd16197d",
|
||||
"rev": "63e77d09a133ac641a0c204e7cfb0c97e133706d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -100,11 +100,11 @@
|
|||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742621235,
|
||||
"narHash": "sha256-+zILWE0iMAb/U7P/WK+3+ami9F13zLAYT5bwt69veww=",
|
||||
"lastModified": 1742679909,
|
||||
"narHash": "sha256-t00hcdDSGhMKd6hhQo0zOkQ5mTOPlim4HKX3l3l0b9M=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nur",
|
||||
"rev": "c72c4acc9a04d2d242c9dadfee75d358d75a9e38",
|
||||
"rev": "635036ec7ec1fce48d678acfbc84b83c4d44ec41",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
20
home.nix
20
home.nix
|
@ -192,6 +192,26 @@
|
|||
enable = true;
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
keybindings = {
|
||||
"kitty_mod+enter" = "new_window_with_cwd";
|
||||
};
|
||||
themeFile = "Tango_Dark";
|
||||
font = {
|
||||
name = "SF Mono";
|
||||
size = 16;
|
||||
};
|
||||
settings = {
|
||||
copy_on_select = true;
|
||||
enabled_layouts = "*";
|
||||
macos_quit_when_last_window_closed = true;
|
||||
scrollback_lines = 100000;
|
||||
kitty_mod = "cmd+option";
|
||||
};
|
||||
shellIntegration.enableFishIntegration = true;
|
||||
};
|
||||
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
./fish
|
||||
./git
|
||||
./jujutsu
|
||||
./tmux
|
||||
./wezterm
|
||||
./vscode
|
||||
./zed
|
||||
]
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
mySettings = {
|
||||
copy-on-select = "clipboard";
|
||||
font-family = "SF Mono";
|
||||
font-size = 16;
|
||||
macos-title-bar-style = "transparent";
|
||||
theme = "Builtin Tango Dark";
|
||||
window-inherit-working-directory = true;
|
||||
working-directory = "home";
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
installBatSyntax = true;
|
||||
installVimSyntax = true;
|
||||
settings = mySettings;
|
||||
};
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
tmuxConfig = builtins.readFile ./tmux.conf;
|
||||
in
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
baseIndex = 1;
|
||||
escapeTime = 10;
|
||||
historyLimit = 10000;
|
||||
keyMode = "vi";
|
||||
prefix = "C-a";
|
||||
terminal = "xterm-256color";
|
||||
extraConfig = tmuxConfig;
|
||||
plugins = with pkgs; [
|
||||
{
|
||||
plugin = tmuxPlugins.resurrect;
|
||||
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
|
||||
}
|
||||
{
|
||||
plugin = tmuxPlugins.continuum;
|
||||
extraConfig = "set -g @continuum-restore 'on'";
|
||||
}
|
||||
{ plugin = tmuxPlugins.sensible; }
|
||||
{ plugin = tmuxPlugins.vim-tmux-navigator; }
|
||||
{ plugin = tmuxPlugins.onedark-theme; }
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,110 +0,0 @@
|
|||
##########################
|
||||
# Configuration
|
||||
###########################
|
||||
|
||||
# use 256 xterm for pretty colors. This enables same colors from iTerm2 within tmux.
|
||||
# This is recommended in neovim :healthcheck
|
||||
# set -g default-terminal "screen-256color"
|
||||
# set -ga terminal-overrides ",xterm-256color:Tc"
|
||||
|
||||
# disable mouse
|
||||
set -g mouse off
|
||||
|
||||
# decrease command delay (increases vim responsiveness)
|
||||
set -sg escape-time 1
|
||||
|
||||
# increase repeat time for repeatable commands
|
||||
set -g repeat-time 1000
|
||||
|
||||
# start pane index at 1 instead of 0
|
||||
setw -g pane-base-index 1
|
||||
|
||||
# highlight window when it has new activity
|
||||
setw -g monitor-activity on
|
||||
set -g visual-activity on
|
||||
|
||||
# re-number windows when one is closed
|
||||
set -g renumber-windows on
|
||||
|
||||
# enable pbcopy and pbpaste
|
||||
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/blob/master/README.md
|
||||
# set-option -g default-command "reattach-to-user-namespace -l zsh"
|
||||
|
||||
###########################
|
||||
# Key Bindings
|
||||
###########################
|
||||
|
||||
# Tmux prefix
|
||||
# Current solution is to keep the default
|
||||
# and have term map C-; to C-b. This is the nicest
|
||||
# bind I've found and this is the only way to enable it in tmux
|
||||
# unbind C-b
|
||||
# set -g prefix C-a
|
||||
# bind C-a send-prefix
|
||||
|
||||
# Copy vim style
|
||||
# create 'v' alias for selecting text
|
||||
bind Escape copy-mode
|
||||
bind C-[ copy-mode
|
||||
bind -T copy-mode-vi 'v' send -X begin-selection
|
||||
# copy with 'enter' or 'y' and send to mac os clipboard: http://goo.gl/2Bfn8
|
||||
unbind -T copy-mode-vi Enter
|
||||
bind -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
|
||||
bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
|
||||
# paste
|
||||
bind p paste-buffer
|
||||
# paste from system clipboard MacOS
|
||||
# bind C-v run \"tmux set-buffer \"$(reattach-to-user-namespace pbpaste)\"; tmux paste-buffer"
|
||||
|
||||
# panes: window splitting
|
||||
unbind %
|
||||
bind | split-window -h
|
||||
unbind '"'
|
||||
bind - split-window -v
|
||||
|
||||
# Switch panes with hjkl
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# Quick window selection
|
||||
bind -r C-h select-window -t :-
|
||||
bind -r C-l select-window -t :+
|
||||
|
||||
# resize panes
|
||||
bind -r H resize-pane -L 5
|
||||
bind -r J resize-pane -D 5
|
||||
bind -r K resize-pane -U 5
|
||||
bind -r L resize-pane -R 5
|
||||
|
||||
## Quickly switch panes
|
||||
unbind ^J
|
||||
bind ^J select-pane -t :.+
|
||||
|
||||
############################
|
||||
## Status Bar
|
||||
############################
|
||||
|
||||
# enable UTF-8 support in status bar
|
||||
set -gq status-utf8 on
|
||||
|
||||
# center the status bar
|
||||
set -g status-justify centre
|
||||
|
||||
# show session, window, pane in left status bar
|
||||
set -g status-left-length 40
|
||||
set -g status-left '#[fg=green] #S #[fg=yellow]#I/#[fg=cyan]#P '
|
||||
|
||||
# update status bar info
|
||||
set -g status-interval 60
|
||||
|
||||
###########################
|
||||
# Colors
|
||||
###########################
|
||||
|
||||
# onedark color scheme
|
||||
set -g @onedark_widgets "#(date +%s)"
|
||||
set -g @onedark_time_format "%I:%M %p"
|
||||
set -g @onedark_date_format "%D"
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
let
|
||||
weztermConfig = builtins.readFile ./wezterm.lua;
|
||||
in
|
||||
{
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
extraConfig = weztermConfig;
|
||||
};
|
||||
}
|
|
@ -1,134 +0,0 @@
|
|||
local wezterm = require 'wezterm'
|
||||
local mux = wezterm.mux
|
||||
local act = wezterm.action
|
||||
|
||||
wezterm.on('update-right-status', function(window, pane)
|
||||
window:set_right_status(window:active_workspace())
|
||||
end)
|
||||
|
||||
wezterm.on('gui-startup', function(cmd)
|
||||
local tab, pane, window = mux.spawn_window(cmd or {})
|
||||
window:gui_window():maximize()
|
||||
pane:split { size = 0.2 }
|
||||
end)
|
||||
|
||||
return {
|
||||
adjust_window_size_when_changing_font_size = false,
|
||||
check_for_updates = false,
|
||||
-- color_scheme = "Gruvbox Light";
|
||||
-- color_scheme = 'tokyonight',
|
||||
color_scheme = 'Tango (terminal.sexy)',
|
||||
-- default_gui_startup_args = { 'connect', 'unix' },
|
||||
font = wezterm.font_with_fallback {
|
||||
'SF Mono',
|
||||
'JetBrains Mono',
|
||||
'Fira Code',
|
||||
},
|
||||
font_size = 16,
|
||||
dpi = 144,
|
||||
scrollback_lines = 50000,
|
||||
initial_cols = 400,
|
||||
initial_rows = 80,
|
||||
leader = { key = 'b', mods = 'SUPER', timeout_milliseconds = 1000 },
|
||||
default_prog = { '/etc/profiles/per-user/salar/bin/fish' },
|
||||
window_decorations = 'RESIZE',
|
||||
-- window_background_image = '/Users/salar/.config/nixpkgs/programs/wezterm/bridge.jpg',
|
||||
ssh_domains = {
|
||||
{
|
||||
name = 'hcloud1',
|
||||
remote_address = 'hcloud1.softinio.net',
|
||||
username = 'salar',
|
||||
remote_wezterm_path = '/run/current-system/sw/bin/wezterm',
|
||||
},
|
||||
},
|
||||
unix_domains = {
|
||||
{
|
||||
name = 'unix',
|
||||
proxy_command = { 'nc', '-U', '/Users/salar/.local/share/wezterm/sock' },
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ key = '-', mods = 'LEADER', action = wezterm.action { SplitVertical = { domain = 'CurrentPaneDomain' } } },
|
||||
{ key = "'", mods = 'LEADER', action = wezterm.action { SplitHorizontal = { domain = 'CurrentPaneDomain' } } },
|
||||
{ key = 'k', mods = 'SUPER', action = act.TogglePaneZoomState },
|
||||
{ key = 'h', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Left' } },
|
||||
{ key = 'j', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Down' } },
|
||||
{ key = 'k', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Up' } },
|
||||
{ key = 'l', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Right' } },
|
||||
{ key = 'H', mods = 'LEADER|SHIFT', action = wezterm.action { AdjustPaneSize = { 'Left', 5 } } },
|
||||
{ key = 'J', mods = 'LEADER|SHIFT', action = wezterm.action { AdjustPaneSize = { 'Down', 5 } } },
|
||||
{ key = 'K', mods = 'LEADER|SHIFT', action = wezterm.action { AdjustPaneSize = { 'Up', 5 } } },
|
||||
{ key = 'L', mods = 'LEADER|SHIFT', action = wezterm.action { AdjustPaneSize = { 'Right', 5 } } },
|
||||
{ key = '1', mods = 'LEADER', action = wezterm.action { ActivateTab = 0 } },
|
||||
{ key = '2', mods = 'LEADER', action = wezterm.action { ActivateTab = 1 } },
|
||||
{ key = '3', mods = 'LEADER', action = wezterm.action { ActivateTab = 2 } },
|
||||
{ key = '4', mods = 'LEADER', action = wezterm.action { ActivateTab = 3 } },
|
||||
{ key = '5', mods = 'LEADER', action = wezterm.action { ActivateTab = 4 } },
|
||||
{ key = '6', mods = 'LEADER', action = wezterm.action { ActivateTab = 5 } },
|
||||
{ key = '7', mods = 'LEADER', action = wezterm.action { ActivateTab = 6 } },
|
||||
{ key = '8', mods = 'LEADER', action = wezterm.action { ActivateTab = 7 } },
|
||||
{ key = '9', mods = 'LEADER', action = wezterm.action { ActivateTab = 8 } },
|
||||
{ key = '&', mods = 'LEADER', action = wezterm.action { CloseCurrentTab = { confirm = true } } },
|
||||
{ key = 'x', mods = 'LEADER', action = wezterm.action { CloseCurrentPane = { confirm = true } } },
|
||||
{ key = 'Enter', mods = 'ALT', action = act.DisableDefaultAssignment },
|
||||
{ key = 'c', mods = 'SUPER', action = act.CopyTo 'Clipboard' },
|
||||
{ key = 'v', mods = 'SUPER', action = act.PasteFrom 'Clipboard' },
|
||||
{ key = 'n', mods = 'SUPER', action = act.SpawnWindow },
|
||||
{ key = 't', mods = 'SUPER', action = act.SpawnTab 'CurrentPaneDomain' },
|
||||
{ key = 'h', mods = 'SUPER', action = act { SpawnCommandInNewTab = { cwd = wezterm.home_dir } } },
|
||||
{ key = 'q', mods = 'SUPER', action = act.QuitApplication },
|
||||
{ key = 'i', mods = 'CTRL|SHIFT', action = act.SwitchToWorkspace },
|
||||
{
|
||||
key = '8',
|
||||
mods = 'ALT',
|
||||
action = wezterm.action_callback(function(window, pane)
|
||||
-- Here you can dynamically construct a longer list if needed
|
||||
|
||||
local home = wezterm.home_dir
|
||||
local workspaces = {
|
||||
{ id = home, label = 'Home' },
|
||||
{ id = home .. '/Projects', label = 'My Projects' },
|
||||
{ id = home .. '/OpenSource', label = 'Open Source Projects' },
|
||||
{ id = home .. '/.config/nixpkgs', label = 'Nix Config' },
|
||||
{ id = home .. '/Projects/scalanews', label = 'Scala News' },
|
||||
}
|
||||
|
||||
window:perform_action(
|
||||
act.InputSelector {
|
||||
action = wezterm.action_callback(function(inner_window, inner_pane, id, label)
|
||||
if not id and not label then
|
||||
wezterm.log_info 'cancelled'
|
||||
else
|
||||
wezterm.log_info('id = ' .. id)
|
||||
wezterm.log_info('label = ' .. label)
|
||||
inner_window:perform_action(
|
||||
act.SwitchToWorkspace {
|
||||
name = label,
|
||||
spawn = {
|
||||
label = 'Workspace: ' .. label,
|
||||
cwd = id,
|
||||
},
|
||||
},
|
||||
inner_pane
|
||||
)
|
||||
end
|
||||
end),
|
||||
title = 'Choose Workspace',
|
||||
choices = workspaces,
|
||||
fuzzy = true,
|
||||
fuzzy_description = 'Fuzzy find and/or make a workspace',
|
||||
},
|
||||
pane
|
||||
)
|
||||
end),
|
||||
},
|
||||
{
|
||||
key = '9',
|
||||
mods = 'ALT',
|
||||
action = act.ShowLauncherArgs {
|
||||
flags = 'FUZZY|WORKSPACES',
|
||||
},
|
||||
},
|
||||
{ key = 'Tab', mods = 'CTRL', action = wezterm.action.DisableDefaultAssignment },
|
||||
},
|
||||
}
|
Loading…
Add table
Reference in a new issue