mirror of
https://git.gay/xqtc/nixos-config
synced 2025-05-09 19:27:30 +02:00
shell ricing; tmux
This commit is contained in:
parent
b57456bc7e
commit
328fd341b7
4 changed files with 122 additions and 5 deletions
|
@ -12,6 +12,7 @@
|
|||
./ghostty.nix
|
||||
# ./dwl.nix
|
||||
./zellij.nix
|
||||
./tmux.nix
|
||||
./wm.nix
|
||||
./gtk.nix
|
||||
./foot.nix
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = ["git" "tailscale"];
|
||||
theme = "lambda";
|
||||
# theme = "lambda";
|
||||
};
|
||||
envExtra = "ZELLIJ_AUTO_ATTACH=true\n";
|
||||
envExtra = "ZELLIJ_AUTO_ATTACH=true\n${if config.host == "yosai" then "ZSH_THEME=\"\"\nPS1=\"%F{127}[%F{135}%n%F{127}@%F{135}%m%F{127}:%F{135}%2~%F{127}]%#%f\"\n" else ""}";
|
||||
initExtraFirst =
|
||||
if !(config.os == "linux")
|
||||
then "export PATH=$PATH:~/.cargo/bin/\n${pkgs.hyfetch}/bin/hyfetch\n"
|
||||
|
@ -69,8 +69,83 @@
|
|||
# reload = "clear; source $nu.config-path";
|
||||
};
|
||||
extraConfig = "maxfetch";
|
||||
envFile = {
|
||||
text = ''
|
||||
$env.ZELLIJ_AUTO_ATTACH = 'true'
|
||||
'';
|
||||
};
|
||||
configFile = {
|
||||
text = builtins.readFile ../config-files/config.nu;
|
||||
# text = builtins.readFile ../config-files/config.nu;
|
||||
text = ''
|
||||
def start_zellij [] {
|
||||
if 'ZELLIJ' not-in ($env | columns) {
|
||||
if 'ZELLIJ_AUTO_ATTACH' in ($env | columns) and $env.ZELLIJ_AUTO_ATTACH == 'true' {
|
||||
zellij attach -c
|
||||
} else {
|
||||
zellij
|
||||
}
|
||||
|
||||
if 'ZELLIJ_AUTO_EXIT' in ($env | columns) and $env.ZELLIJ_AUTO_EXIT == 'true' {
|
||||
exit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#start_zellij
|
||||
$env.config = {
|
||||
show_banner: false
|
||||
menus: [
|
||||
{
|
||||
name: ide_completion_menu
|
||||
only_buffer_difference: false
|
||||
marker: "| "
|
||||
type: {
|
||||
layout: ide
|
||||
min_completion_width: 0,
|
||||
max_completion_width: 50,
|
||||
max_completion_height: 10, # will be limited by the available lines in the terminal
|
||||
padding: 0,
|
||||
border: true,
|
||||
cursor_offset: 0,
|
||||
description_mode: "prefer_right"
|
||||
min_description_width: 0
|
||||
max_description_width: 50
|
||||
max_description_height: 10
|
||||
description_offset: 1
|
||||
# If true, the cursor pos will be corrected, so the suggestions match up with the typed text
|
||||
#
|
||||
# C:\> str
|
||||
# str join
|
||||
# str trim
|
||||
# str split
|
||||
correct_cursor_pos: false
|
||||
}
|
||||
style: {
|
||||
text: green
|
||||
selected_text: { attr: r }
|
||||
description_text: yellow
|
||||
match_text: { attr: u }
|
||||
selected_match_text: { attr: ur }
|
||||
}
|
||||
}
|
||||
]
|
||||
keybindings: [
|
||||
{
|
||||
name: ide_completion_menu
|
||||
modifier: none
|
||||
keycode: tab
|
||||
mode: [emacs vi_normal vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{ send: menu name: ide_completion_menu }
|
||||
{ send: menunext }
|
||||
{ edit: complete }
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
'';
|
||||
};
|
||||
};
|
||||
carapace.enable = true;
|
||||
|
@ -78,7 +153,7 @@
|
|||
starship = let
|
||||
flavour = "mocha";
|
||||
in {
|
||||
enable = true;
|
||||
enable = if config.host == "yosai" then false else true;
|
||||
enableNushellIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
|
|
41
home/modules/tmux.nix
Normal file
41
home/modules/tmux.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{config, pkgs, lib, ...}:
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
# remap prefix from 'C-b' to 'C-a'
|
||||
unbind C-b
|
||||
set-option -g prefix C-s
|
||||
bind-key C-a send-prefix
|
||||
|
||||
bind -n M-h select-pane -L
|
||||
bind -n M-l select-pane -R
|
||||
bind -n M-k select-pane -U
|
||||
bind -n M-j select-pane -D
|
||||
|
||||
set -g mouse on
|
||||
set-option -g allow-rename off
|
||||
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
|
||||
set-window-option -g mode-keys vi
|
||||
bind '"' split-window -v -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
'';
|
||||
plugins = with pkgs;[
|
||||
tmuxPlugins.cpu
|
||||
{
|
||||
plugin = tmuxPlugins.yank;
|
||||
extraConfig = ''
|
||||
# keybindings
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -118,7 +118,7 @@
|
|||
users.users.xqtc = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel"]; # Enable ‘sudo’ for the user.
|
||||
shell = pkgs.zsh;
|
||||
shell = pkgs.nushell;
|
||||
packages = with pkgs; [
|
||||
git
|
||||
foot
|
||||
|
|
Loading…
Add table
Reference in a new issue