Switch from kitty to wezterm
This commit is contained in:
parent
bb61ff0a93
commit
4983fb551e
7 changed files with 114 additions and 22 deletions
|
@ -325,7 +325,15 @@
|
||||||
(set mod.scrollbar {:init (fn [self]
|
(set mod.scrollbar {:init (fn [self]
|
||||||
(set self.current-line (get-current-line))
|
(set self.current-line (get-current-line))
|
||||||
(set self.total-lines (get-total-lines)))
|
(set self.total-lines (get-total-lines)))
|
||||||
:static {:scrollbar-icons ["🭶"
|
:static {:scrollbar-icons-block ["▁"
|
||||||
|
"▂"
|
||||||
|
"▃"
|
||||||
|
"▄"
|
||||||
|
"▅"
|
||||||
|
"▆"
|
||||||
|
"▇"
|
||||||
|
"█"]
|
||||||
|
:scrollbar-icons-line ["🭶"
|
||||||
"🭷"
|
"🭷"
|
||||||
"🭸"
|
"🭸"
|
||||||
"🭹"
|
"🭹"
|
||||||
|
@ -335,9 +343,10 @@
|
||||||
(let [i (+ (math.floor (* (/ (- self.current-line
|
(let [i (+ (math.floor (* (/ (- self.current-line
|
||||||
1)
|
1)
|
||||||
self.total-lines)
|
self.total-lines)
|
||||||
(length self.scrollbar-icons)))
|
(length self.scrollbar-icons-block)))
|
||||||
1)
|
1)
|
||||||
new-scrollbar (. self :scrollbar-icons
|
new-scrollbar (. self
|
||||||
|
:scrollbar-icons-block
|
||||||
i)]
|
i)]
|
||||||
(string.rep new-scrollbar 2)))
|
(string.rep new-scrollbar 2)))
|
||||||
:hl {:fg colors.purple}})
|
:hl {:fg colors.purple}})
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
(when (not= project-root nil)
|
(when (not= project-root nil)
|
||||||
(set checkstyle.config_file
|
(set checkstyle.config_file
|
||||||
(.. project-root :/config/checkstyle/checkstyle.xml)))
|
(.. project-root :/config/checkstyle/checkstyle.xml)))
|
||||||
(set fennel.globals [:vim]))
|
(set fennel.globals [:vim :wezterm]))
|
||||||
;; Configure Linters per FT
|
;; Configure Linters per FT
|
||||||
(set lint.linters_by_ft {:dockerfile [:hadolint]
|
(set lint.linters_by_ft {:dockerfile [:hadolint]
|
||||||
:elixir [:credo]
|
:elixir [:credo]
|
||||||
|
|
37
home/config/wezterm/config.fnl
Normal file
37
home/config/wezterm/config.fnl
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
(let [wezterm (require :wezterm)]
|
||||||
|
{:default_prog _G.default_shell
|
||||||
|
;; Appearance
|
||||||
|
:color_scheme "Dracula (Official)"
|
||||||
|
:window_padding {:left :6px :right :6px :top :2px :bottom :4px}
|
||||||
|
:enable_tab_bar true
|
||||||
|
:use_fancy_tab_bar true
|
||||||
|
:hide_tab_bar_if_only_one_tab true
|
||||||
|
;; Fonts
|
||||||
|
:font (wezterm.font_with_fallback [{:family "JetBrains Mono"
|
||||||
|
:weight :Medium}
|
||||||
|
"Symbols Nerd Font"
|
||||||
|
"Apple Symbols"
|
||||||
|
"Apple Color Emoji"
|
||||||
|
"Noto Sans Symbols"
|
||||||
|
"Noto Sans Symbols2"
|
||||||
|
:Unifont])
|
||||||
|
:font_size 13
|
||||||
|
:line_height 0.9
|
||||||
|
:freetype_load_target :Light
|
||||||
|
;:freetype_render_target :HorizontalLcd
|
||||||
|
;; Mouse
|
||||||
|
:mouse_bindings [; Only select text and don't open hyperlinks
|
||||||
|
{:event {:Up {:streak 1 :button :Left}}
|
||||||
|
:mods :NONE
|
||||||
|
:action (wezterm.action {:ExtendSelectionToMouseCursor :Cell})}
|
||||||
|
; Don't copy on double click
|
||||||
|
{:event {:Up {:streak 2 :button :Left}}
|
||||||
|
:mods :NONE
|
||||||
|
:action :Nop}
|
||||||
|
; CMD-click to open a hyperlink
|
||||||
|
{:event {:Up {:streak 1 :button :Left}}
|
||||||
|
:mods :CMD
|
||||||
|
:action :OpenLinkAtMouseCursor}]
|
||||||
|
;; Scrollback
|
||||||
|
:scrollback_lines 5000})
|
||||||
|
|
|
@ -8,7 +8,7 @@ in
|
||||||
../programs/fish.nix
|
../programs/fish.nix
|
||||||
../programs/starship.nix
|
../programs/starship.nix
|
||||||
../programs/direnv.nix
|
../programs/direnv.nix
|
||||||
../programs/kitty.nix
|
../programs/wezterm.nix
|
||||||
|
|
||||||
../programs/nvim
|
../programs/nvim
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
home.packages = [ pkgs.terminal-notifier ];
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -27,13 +29,14 @@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# https://github.com/franciscolourenco/done/releases
|
||||||
{
|
{
|
||||||
name = "done-fish";
|
name = "done-fish";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "nifoc";
|
owner = "franciscolourenco";
|
||||||
repo = "done";
|
repo = "done";
|
||||||
rev = "2f4e94d8306224f63cd12fb992318985a83d51a8";
|
rev = "1.16.5";
|
||||||
sha256 = "Pq8HEISGjpCTXBIyukcLUK8r1hJ3/QXAklRCesm4nQ0=";
|
sha256 = "sha256-E0wveeDw1VzEH2kzn63q9hy1xkccfxQHBV2gVpu2IdQ=";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,8 +46,8 @@
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "PatrickF1";
|
owner = "PatrickF1";
|
||||||
repo = "fzf.fish";
|
repo = "fzf.fish";
|
||||||
rev = "v9.2";
|
rev = "v9.5";
|
||||||
sha256 = "sha256-XmRGe39O3xXmTvfawwT2mCwLIyXOlQm7f40mH5tzz+s=";
|
sha256 = "sha256-ZdHfIZNCtY36IppnufEIyHr+eqlvsIUOs0kY5I9Df6A=";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,8 +68,8 @@
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "nickeb96";
|
owner = "nickeb96";
|
||||||
repo = "puffer-fish";
|
repo = "puffer-fish";
|
||||||
rev = "f8df25bde0875359805967aa999744a28dee0561";
|
rev = "fd0a9c95da59512beffddb3df95e64221f894631";
|
||||||
sha256 = "sha256-Gm4In5f03G2ijL1xDTKFsgE+hRXjQ29kk84LQSXXeF0=";
|
sha256 = "sha256-aij48yQHeAKCoAD43rGhqW8X/qmEGGkg8B4jSeqjVU0=";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,8 +79,8 @@
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "andreiborisov";
|
owner = "andreiborisov";
|
||||||
repo = "sponge";
|
repo = "sponge";
|
||||||
rev = "1.0.4";
|
rev = "1.1.0";
|
||||||
sha256 = "sha256-+GGfFC/hH7A8n9Wwojt5PW96fSzvRhThnZ3pLeWEqds=";
|
sha256 = "sha256-MdcZUDRtNJdiyo2l9o5ma7nAX84xEJbGFhAVhK+Zm1w=";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
38
home/programs/wezterm.nix
Normal file
38
home/programs/wezterm.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.wezterm = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
_G.default_shell = { '${pkgs.fish.outPath}/bin/fish', '--interactive'};
|
||||||
|
|
||||||
|
local cfg = require('config');
|
||||||
|
return cfg
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile."wezterm" = {
|
||||||
|
source = pkgs.runCommand "wezterm-fennel-files"
|
||||||
|
{
|
||||||
|
nativeBuildInputs = with pkgs; [ lua53Packages.fennel stylua ];
|
||||||
|
} ''
|
||||||
|
mkdir -p $out
|
||||||
|
|
||||||
|
config_store_path="${../config/wezterm}"
|
||||||
|
fennel="fennel --use-bit-lib --compile"
|
||||||
|
|
||||||
|
echo "Using fennel command: $fennel"
|
||||||
|
|
||||||
|
# Change PWD to config directory
|
||||||
|
cd "$config_store_path"
|
||||||
|
|
||||||
|
# Init
|
||||||
|
echo "Compiling init.fnl ..."
|
||||||
|
$fennel "$config_store_path/config.fnl" > "$out/config.lua"
|
||||||
|
|
||||||
|
stylua "$out/"
|
||||||
|
'';
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -5,11 +5,16 @@
|
||||||
fontDir.enable = true;
|
fontDir.enable = true;
|
||||||
|
|
||||||
fonts = with pkgs; [
|
fonts = with pkgs; [
|
||||||
|
jetbrains-mono
|
||||||
|
victor-mono
|
||||||
|
noto-fonts
|
||||||
|
unifont
|
||||||
|
|
||||||
(nerdfonts.override {
|
(nerdfonts.override {
|
||||||
fonts = [
|
fonts = [
|
||||||
"FiraCode"
|
"NerdFontsSymbolsOnly"
|
||||||
"JetBrainsMono"
|
# "JetBrainsMono"
|
||||||
"VictorMono"
|
# "VictorMono"
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue