Merge pull request 'Remove: Wezterm, Tmux, Ghostty & Add back: Kitty + Flake updates' () from push-pzlwktmoumpl into main

Reviewed-on: 
This commit is contained in:
Salar Rahmanian 2025-03-22 22:49:46 -07:00
commit c1cce3924d
8 changed files with 37 additions and 319 deletions

30
flake.lock generated
View file

@ -28,11 +28,11 @@
]
},
"locked": {
"lastModified": 1741543064,
"narHash": "sha256-AjXyS3ACxWAd+h3NSkrflN+uC0Tq1XFqox472RF6yh0=",
"lastModified": 1742670145,
"narHash": "sha256-xQ2F9f+ICAGBp/nNv3ddD2U4ZvzuLOci0u/5lyMXPvk=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "db4386d686fb0b2788e7422e6a2299deace9c4b1",
"rev": "63e77d09a133ac641a0c204e7cfb0c97e133706d",
"type": "github"
},
"original": {
@ -48,11 +48,11 @@
]
},
"locked": {
"lastModified": 1741229100,
"narHash": "sha256-0HwrTDXp9buEwal/1ymK9uQmzUD5ozIA7CJGqnT/gLs=",
"lastModified": 1742595055,
"narHash": "sha256-cEetDber6LF8W4ThmRc4rwKs/o8y2GH0pUdX7e6CnAQ=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "adf5c88ba1fe21af5c083b4d655004431f20c5ab",
"rev": "e9f41de2a81f04390afd106959adf352a207628f",
"type": "github"
},
"original": {
@ -63,11 +63,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1741402956,
"narHash": "sha256-y2hByvBM03s9T2fpeLjW6iprbxnhV9mJMmSwCHc41ZQ=",
"lastModified": 1742578646,
"narHash": "sha256-GiQ40ndXRnmmbDZvuv762vS+gew1uDpFwOfgJ8tLiEs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ed0b1881565c1ffef490c10d663d4f542031dad3",
"rev": "94c4dbe77c0740ebba36c173672ca15a7926c993",
"type": "github"
},
"original": {
@ -79,11 +79,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1741379970,
"narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=",
"lastModified": 1742422364,
"narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f",
"rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc",
"type": "github"
},
"original": {
@ -100,11 +100,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1741560307,
"narHash": "sha256-sS25HPoonksGtSmQsOyMVESYLDxxUZVmEQGPGlHWHIk=",
"lastModified": 1742679909,
"narHash": "sha256-t00hcdDSGhMKd6hhQo0zOkQ5mTOPlim4HKX3l3l0b9M=",
"owner": "nix-community",
"repo": "nur",
"rev": "4ae43b04c54350575c1e0fd6ee1547629b2e06ff",
"rev": "635036ec7ec1fce48d678acfbc84b83c4d44ec41",
"type": "github"
},
"original": {

View file

@ -49,6 +49,7 @@
gnupg
go
graphviz
jetbrains-mono
jq-lsp
luajit
lua-language-server
@ -61,6 +62,7 @@
mypy
neofetch
neovim
nerd-fonts.fira-code
nil
niv
nixd
@ -190,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;
};

View file

@ -4,8 +4,6 @@
./fish
./git
./jujutsu
./tmux
./wezterm
./vscode
./zed
]

View file

@ -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;
};
}

View file

@ -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; }
];
};
}

View file

@ -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"

View file

@ -1,11 +0,0 @@
{ ... }:
let
weztermConfig = builtins.readFile ./wezterm.lua;
in
{
programs.wezterm = {
enable = true;
extraConfig = weztermConfig;
};
}

View file

@ -1,130 +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 'SF Mono',
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 },
},
}