mirror of
https://github.com/softinio/nix-config.git
synced 2025-10-19 03:26:40 -07:00
Compare commits
No commits in common. "f98fe01b0c4b4990aa54776236d87dbddbaf26b1" and "04daf58e4308b82df41f83aec441190186832c57" have entirely different histories.
f98fe01b0c
...
04daf58e43
4 changed files with 78 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
||||||
./ghostty
|
./ghostty
|
||||||
./git
|
./git
|
||||||
./jujutsu
|
./jujutsu
|
||||||
|
# ./kitty
|
||||||
./nixvim
|
./nixvim
|
||||||
./tmux
|
./tmux
|
||||||
./wezterm
|
./wezterm
|
||||||
|
|
35
programs/kitty/default.nix
Normal file
35
programs/kitty/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
actionsConfig = builtins.readFile ./open-actions.conf;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.kitty = {
|
||||||
|
enable = true;
|
||||||
|
keybindings = {
|
||||||
|
"kitty_mod+enter" = "new_window_with_cwd";
|
||||||
|
"f1" = "create_marker";
|
||||||
|
"f2" = "remove_marker";
|
||||||
|
"ctrl+p" = "scroll_to_mark prev";
|
||||||
|
"ctrl+n" = "scroll_to_mark next";
|
||||||
|
};
|
||||||
|
themeFile = "Tango_Dark";
|
||||||
|
font = {
|
||||||
|
name = "SF Mono";
|
||||||
|
size = 13;
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
active_tab_background = "#FF0";
|
||||||
|
copy_on_select = true;
|
||||||
|
enabled_layouts = "Tall,Stack,Horizontal,*";
|
||||||
|
kitty_mod = "cmd+option";
|
||||||
|
macos_quit_when_last_window_closed = true;
|
||||||
|
scrollback_lines = 100000;
|
||||||
|
tab_bar_style = "powerline";
|
||||||
|
tab_powerline_style = "slanted";
|
||||||
|
};
|
||||||
|
shellIntegration.enableFishIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".config/kitty/open-actions.conf".text = actionsConfig;
|
||||||
|
}
|
40
programs/kitty/open-actions.conf
Normal file
40
programs/kitty/open-actions.conf
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# Open any file with a fragment in vim, fragments are generated
|
||||||
|
# by the hyperlink-grep kitten and nothing else so far.
|
||||||
|
protocol file
|
||||||
|
fragment_matches [0-9]+
|
||||||
|
action launch --type=overlay --cwd=current hx +${FRAGMENT} -- ${FILE_PATH}
|
||||||
|
|
||||||
|
# Open text files without fragments in the editor
|
||||||
|
protocol file
|
||||||
|
ext txt,md,conf,ini,log,sh,py,js,html,css,xml,json,yaml,yml,scala,sbt,java,go,py,toml,sql,swift,nix,lua
|
||||||
|
action launch --type=overlay --cwd=current -- hx -- ${FILE_PATH}
|
||||||
|
|
||||||
|
# Open any image in the full kitty window by clicking on it
|
||||||
|
protocol file
|
||||||
|
mime image/*
|
||||||
|
action launch --type=overlay kitten icat --hold -- ${FILE_PATH}
|
||||||
|
|
||||||
|
# Tail a log file (*.log) in a new OS Window and reduce its font size
|
||||||
|
protocol file
|
||||||
|
ext log
|
||||||
|
action launch --title ${FILE} --type=os-window tail -f -- ${FILE_PATH}
|
||||||
|
action change_font_size current -2
|
||||||
|
|
||||||
|
# Open script files
|
||||||
|
protocol file
|
||||||
|
ext sh,command,tool
|
||||||
|
action launch --hold --type=os-window kitty +shebang $FILE_PATH $SHELL
|
||||||
|
|
||||||
|
# Open shell specific script files
|
||||||
|
protocol file
|
||||||
|
ext fish,bash,zsh
|
||||||
|
action launch --hold --type=os-window kitty +shebang $FILE_PATH __ext__
|
||||||
|
|
||||||
|
# Open directories
|
||||||
|
protocol file
|
||||||
|
mime inode/directory
|
||||||
|
action launch --type=os-window --cwd -- $FILE_PATH
|
||||||
|
|
||||||
|
# Open ssh URLs with ssh command
|
||||||
|
protocol ssh
|
||||||
|
action launch --type=os-window ssh -- $URL
|
|
@ -1,4 +1,4 @@
|
||||||
{ ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
relativenumber = true;
|
relativenumber = true;
|
||||||
scrolloff = 8;
|
scrolloff = 8;
|
||||||
shiftwidth = 2;
|
shiftwidth = 2;
|
||||||
signcolumn = "auto";
|
signcolumn = "yes";
|
||||||
smartindent = true;
|
smartindent = true;
|
||||||
swapfile = false;
|
swapfile = false;
|
||||||
tabstop = 2;
|
tabstop = 2;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue