Ditch tmux for ghostty tabs + a more stateless living
nix update
This commit is contained in:
parent
494bd5cad1
commit
d06333397c
4 changed files with 40 additions and 106 deletions
42
flake.lock
42
flake.lock
|
@ -116,11 +116,11 @@
|
|||
"zig": "zig"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735589157,
|
||||
"narHash": "sha256-s5fJn9LSwz3cfkKSvicQppCnXVs8F05OH96yaa5K2Dc=",
|
||||
"lastModified": 1735689283,
|
||||
"narHash": "sha256-LOZRScnB8Q9ylmlXnt2j2v4Aj1b5JZTdSeKYaFL1RDw=",
|
||||
"owner": "ghostty-org",
|
||||
"repo": "ghostty",
|
||||
"rev": "ef542c6e63b40b3541dc5efd625c0b95f750bbc6",
|
||||
"rev": "60611b8a4a1d5b3c1097cce85eb0311de0696cfa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -222,11 +222,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735381016,
|
||||
"narHash": "sha256-CyCZFhMUkuYbSD6bxB/r43EdmDE7hYeZZPTCv0GudO4=",
|
||||
"lastModified": 1735735907,
|
||||
"narHash": "sha256-/AOGn9qJMjrZQyWYbObHTKmWDUP0q9+0TAXOJnq6ik0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "10e99c43cdf4a0713b4e81d90691d22c6a58bdf2",
|
||||
"rev": "59a4c43e9ba6db24698c112720a58a334117de83",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -246,11 +246,11 @@
|
|||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735517129,
|
||||
"narHash": "sha256-ibHgAkr8OXAP8MRBo4Z7AIaVdOHywGR2J8R50vZCQjI=",
|
||||
"lastModified": 1735693090,
|
||||
"narHash": "sha256-Axke90GBbocA48Lrb7ub/RycvHt1NcujkZW1RMF+Q7Q=",
|
||||
"owner": "nix-community",
|
||||
"repo": "neovim-nightly-overlay",
|
||||
"rev": "fd381a5a19f553c2466dc437fb94fcf799d77e82",
|
||||
"rev": "47e417b35d1ec8bf79deec3e96c90f1e41a9e1e4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -262,11 +262,11 @@
|
|||
"neovim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1735489459,
|
||||
"narHash": "sha256-PMeWazyxGxpA6UeVrWH/ur8WuqliGxXlRjTTQdMiYVc=",
|
||||
"lastModified": 1735686267,
|
||||
"narHash": "sha256-gLa+1QOW7P5J4cAG34BW68tnf/yOx50rH6iZuSyoX1A=",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"rev": "e4bc8b5967d22840c1e52c97acab0f77107cd48c",
|
||||
"rev": "59cbe640233eeb6ae96231e059449e73e15f9ea5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -277,11 +277,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1735268880,
|
||||
"narHash": "sha256-7QEFnKkzD13SPxs+UFR5bUFN2fRw+GlL0am72ZjNre4=",
|
||||
"lastModified": 1735554305,
|
||||
"narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7cc0bff31a3a705d3ac4fdceb030a17239412210",
|
||||
"rev": "0e82ab234249d8eee3e8c91437802b32c74bb3fd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -341,11 +341,11 @@
|
|||
},
|
||||
"nixpkgs-unstable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1735523292,
|
||||
"narHash": "sha256-opBsbR/nrGxiiF6XzlVluiHYb6yN/hEwv+lBWTy9xoM=",
|
||||
"lastModified": 1735617354,
|
||||
"narHash": "sha256-5zJyv66q68QZJZsXtmjDBazGnF0id593VSy+8eSckoo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6d97d419e5a9b36e6293887a89a078cf85f5a61b",
|
||||
"rev": "69b9a8c860bdbb977adfa9c5e817ccb717884182",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -405,11 +405,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735135567,
|
||||
"narHash": "sha256-8T3K5amndEavxnludPyfj3Z1IkcFdRpR23q+T0BVeZE=",
|
||||
"lastModified": 1735653038,
|
||||
"narHash": "sha256-Q6xAmciTXDtZfUxf6c15QqtRR8BvX4edYPstF/uoqMk=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "9e09d30a644c57257715902efbb3adc56c79cf28",
|
||||
"rev": "56c0ecd79f7ba01a0ec027da015df751d6ca3ae7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -43,40 +43,17 @@
|
|||
body = ''confirm "⚠ Really shutdown $(hostname)?" && command shutdown $argv'';
|
||||
};
|
||||
|
||||
tmux-refresh-env = {
|
||||
description = "Refresh environment variables from tmux session";
|
||||
body = ''
|
||||
for var in (tmux show-environment | string match -rv '^-')
|
||||
set -l parts (string split -m 1 '=' $var)
|
||||
if test (count $parts) -eq 2
|
||||
set -Ux $parts[1] $parts[2]
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
kubectl = {
|
||||
description = "Wraps kubectl in grc";
|
||||
wraps = "kubectl";
|
||||
body = "grc.wrap kubectl $argv";
|
||||
};
|
||||
|
||||
edit = {
|
||||
description = "Open a file in already running nvim and switch tab";
|
||||
e = {
|
||||
description = "Open a file in already running nvim";
|
||||
argumentNames = [ "file" ];
|
||||
body = ''
|
||||
set _file (readlink -f "$file")
|
||||
if test -z "$file"
|
||||
set _root (vcs_root)
|
||||
set _file (fd --type f . "$_root" | sed -e "s#^$_root/##" | fzf --no-sort --layout=reverse)
|
||||
set _file "$_root/$_file"
|
||||
end
|
||||
set _nvim_socket "$XDG_RUNTIME_DIR/nvim-persistent.sock"
|
||||
if test -S "$_nvim_socket" && tmux select-window -t nvim 2>/dev/null
|
||||
nvim --server "$_nvim_socket" --remote "$_file"
|
||||
return 0
|
||||
end
|
||||
tmux new-window -S -n nvim nvim --listen "$_nvim_socket" "$_file"
|
||||
nvim --server "$XDG_RUNTIME_DIR/nvim-persistent.sock" --remote (readlink -f "$file") >>/dev/null
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -156,7 +133,6 @@
|
|||
];
|
||||
|
||||
shellAbbrs = {
|
||||
e = "edit";
|
||||
l = "bat";
|
||||
ls = "eza";
|
||||
tree = "eza --tree";
|
||||
|
|
|
@ -33,9 +33,11 @@
|
|||
unfocused-split-opacity = 1.0;
|
||||
|
||||
shell-integration = "fish";
|
||||
initial-command = ''nvim --listen "$XDG_RUNTIME_DIR/nvim-persistent.sock"'';
|
||||
|
||||
window-decoration = false;
|
||||
gtk-tabs-location = "bottom";
|
||||
window-decoration = true;
|
||||
gtk-single-instance = true;
|
||||
gtk-tabs-location = "hidden";
|
||||
gtk-titlebar = false;
|
||||
window-padding-x = 12;
|
||||
window-padding-y = 0;
|
||||
|
@ -49,16 +51,6 @@
|
|||
"alt+shift+v=paste_from_clipboard"
|
||||
"ctrl+tab=goto_split:previous"
|
||||
"super+enter=toggle_fullscreen"
|
||||
"ctrl+enter=unbind"
|
||||
"alt+one=unbind"
|
||||
"alt+two=unbind"
|
||||
"alt+three=unbind"
|
||||
"alt+four=unbind"
|
||||
"alt+five=unbind"
|
||||
"alt+six=unbind"
|
||||
"alt+seven=unbind"
|
||||
"alt+eight=unbind"
|
||||
"alt+nine=unbind"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -116,46 +108,14 @@
|
|||
'';
|
||||
|
||||
xdg.desktopEntries = {
|
||||
ghostty-local = {
|
||||
categories = [
|
||||
"System"
|
||||
"TerminalEmulator"
|
||||
];
|
||||
exec = ''ghostty --class=com.mitchellh.ghostty-local -e "tmux new-session -A -D -s main -t main"'';
|
||||
genericName = "Ghostty (local)";
|
||||
icon = "com.mitchellh.ghostty";
|
||||
name = "Ghostty (local)";
|
||||
settings = {
|
||||
StartupWMClass = "com.mitchellh.ghostty-local";
|
||||
TryExec = "ghostty";
|
||||
};
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
};
|
||||
|
||||
ghostty-local-secondary = {
|
||||
categories = [
|
||||
"System"
|
||||
"TerminalEmulator"
|
||||
];
|
||||
exec = ''ghostty --class=com.mitchellh.ghostty-local-secondary -e "tmux new-session -A -D -s secondary -t main"'';
|
||||
genericName = "Ghostty (local) Secondary";
|
||||
icon = "com.mitchellh.ghostty";
|
||||
name = "Ghostty (local) Secondary";
|
||||
settings = {
|
||||
StartupWMClass = "com.mitchellh.ghostty-local-secondary";
|
||||
TryExec = "ghostty";
|
||||
};
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
};
|
||||
|
||||
ghostty-nemo = {
|
||||
categories = [
|
||||
"System"
|
||||
"TerminalEmulator"
|
||||
];
|
||||
exec = ''ghostty --class=com.mitchellh.ghostty-nemo -e "ssh -t nemo tmux new-session -A -D -s main -t main"'';
|
||||
exec = ''
|
||||
ghostty --class=com.mitchellh.ghostty-nemo --command="ssh -t nemo" --initial-command="ssh -t nemo nvim --listen /run/user/1000/nvim-persistent.sock"
|
||||
'';
|
||||
genericName = "Ghostty (nemo)";
|
||||
icon = "com.mitchellh.ghostty";
|
||||
name = "Ghostty (nemo)";
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
set -g status-right '%F | %R'
|
||||
set -g status off
|
||||
set -g update-environment "SSH_AUTH_SOCK"
|
||||
setenv -g "SSH_AUTH_SOCK" "$XDG_RUNTIME_DIR/ssh-agent"
|
||||
setw -g alternate-screen on
|
||||
setw -g automatic-rename off
|
||||
setw -g window-status-format ""
|
||||
|
@ -34,16 +33,15 @@
|
|||
|
||||
set -s command-alias[1000] stty='run-shell "tmux send-keys \"stty cols #{pane_width} rows #{pane_height}\" Enter"'
|
||||
|
||||
bind -n M-1 if-shell 'tmux select-window -t nvim' refresh-client 'new-window -S -n nvim nvim --listen $XDG_RUNTIME_DIR/nvim-persistent.sock'
|
||||
bind -n M-2 if-shell 'tmux select-window -t t1' refresh-client 'new-window -S -n t1'
|
||||
bind -n M-3 if-shell 'tmux select-window -t t2' refresh-client 'new-window -S -n t2'
|
||||
bind -n M-4 if-shell 'tmux select-window -t t3' refresh-client 'new-window -S -n t3'
|
||||
bind -n M-5 if-shell 'tmux select-window -t t4' refresh-client 'new-window -S -n t4'
|
||||
bind -n M-6 if-shell 'tmux select-window -t t5' refresh-client 'new-window -S -n t5'
|
||||
bind -n M-7 if-shell 'tmux select-window -t t6' refresh-client 'new-window -S -n t6'
|
||||
bind -n M-8 if-shell 'tmux select-window -t t7' refresh-client 'new-window -S -n t7'
|
||||
bind -n M-9 if-shell 'tmux select-window -t t8' refresh-client 'new-window -S -n t8'
|
||||
bind -n M-0 if-shell 'tmux select-window -t t9' refresh-client 'new-window -S -n t9'
|
||||
bind -n C-2 if-shell 'tmux select-window -t t1' refresh-client 'new-window -S -n t1'
|
||||
bind -n C-3 if-shell 'tmux select-window -t t2' refresh-client 'new-window -S -n t2'
|
||||
bind -n C-4 if-shell 'tmux select-window -t t3' refresh-client 'new-window -S -n t3'
|
||||
bind -n C-5 if-shell 'tmux select-window -t t4' refresh-client 'new-window -S -n t4'
|
||||
bind -n C-6 if-shell 'tmux select-window -t t5' refresh-client 'new-window -S -n t5'
|
||||
bind -n C-7 if-shell 'tmux select-window -t t6' refresh-client 'new-window -S -n t6'
|
||||
bind -n C-8 if-shell 'tmux select-window -t t7' refresh-client 'new-window -S -n t7'
|
||||
bind -n C-9 if-shell 'tmux select-window -t t8' refresh-client 'new-window -S -n t8'
|
||||
bind -n C-0 if-shell 'tmux select-window -t t9' refresh-client 'new-window -S -n t9'
|
||||
bind -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 1 scroll-up
|
||||
bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 1 scroll-down
|
||||
bind C-s set-option -g status
|
||||
|
|
Loading…
Reference in a new issue