Skip to content

Commit

Permalink
chore: yazi
Browse files Browse the repository at this point in the history
  • Loading branch information
o-az committed Sep 6, 2024
1 parent ed1dfac commit 5d1072d
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 26 deletions.
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions home-modules/fish/functions/yazi.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function yy
set tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
builtin cd -- "$cwd"
end
rm -f -- "$tmp"
end
10 changes: 6 additions & 4 deletions home-modules/fish/init.fish
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ end

set -x LANG en_US.UTF-8

#-------------------------------------------------------------------------------
# SSH Agent
#-------------------------------------------------------------------------------

# https://ryantm.github.io/nixpkgs/using/configuration/#sec-allow-broken
set -x NIXPKGS_ALLOW_UNFREE 1

Expand Down Expand Up @@ -41,6 +37,12 @@ set fzf_git_log_format "%H %s"
set fzf_history_time_format "%y-%m-%d"
set fzf_diff_highlighter diff-so-fancy

set -Ux fish_cursor_default 'block'
set -Ux fish_cursor_insert 'line blink'

batman --export-env | source
set -Ux BAT_THEME 'Solarized (light)'

# forgit
set -x PATH $PATH $FORGIT_INSTALL_DIR/bin
set -Ux FORGIT_CHECKOUT_BRANCH_BRANCH_GIT_OPTS '--sort=-committerdate'
10 changes: 10 additions & 0 deletions home-modules/yazi/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# https://home-manager-options.extranix.com/?query=programs.yazi.
{ pkgs, ... }:
{
programs.yazi = {
enable = true;
package = pkgs.yazi;
enableFishIntegration = true;
settings = {};
};
};
27 changes: 24 additions & 3 deletions home-modules/zellij/config.kdl
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
pane_frames false
theme "catppuccin-frappe"

session_serialization false
default_shell "fish"
copy_command "pbcopy"
default_layout "compact"
on_force_close "quit"
simplified_ui true
theme "tokyo-night-dark"
default_layout "compact"
mouse_mode true
scroll_buffer_size 100000
styled_underlines false

plugins {
tab-bar location="zellij:tab-bar"
status-bar location="zellij:status-bar"
strider location="zellij:strider"
compact-bar location="zellij:compact-bar"
session-manager location="zellij:session-manager"
welcome-screen location="zellij:session-manager" {
welcome_screen true
}
filepicker location="zellij:strider" {
cwd "/"
}
}

keybinds {
unbind "Ctrl o"

shared_except "session" "locked" {
bind "Ctrl k" { SwitchToMode "Session"; }
}
Expand Down
16 changes: 8 additions & 8 deletions home-modules/zellij/layout.kdl
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
layout {
default_tab_template {
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
children
pane size=2 borderless=true {
plugin location="zellij:status-bar"
}
default_tab_template {
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
children
pane size=2 borderless=true {
plugin location="zellij:status-bar"
}
}
tab name="Console"
tab name="Editor" focus=true {
pane split_direction="vertical" {
Expand Down
1 change: 1 addition & 0 deletions modules/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ with lib;
starship
superfile
fastfetch
# zed-editor
git-extras
lazydocker
nix-update
Expand Down
8 changes: 3 additions & 5 deletions modules/fonts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@
};
};
packages = with pkgs; [
noto-fonts
noto-fonts-emoji
ibm-plex
fira-code
fira-code-symbols
nerdfonts
noto-fonts
jetbrains-mono
iosevka
noto-fonts-emoji
(pkgs.nerdfonts.override {
fonts = [
"Iosevka"
Expand Down
4 changes: 2 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
# Enable experimental features without having to specify the argument
NIX_CONFIG = "experimental-features = nix-command flakes";
nativeBuildInputs = with pkgs; [
gh
nix
git
helix
gh
fish
helix
];
};
}

0 comments on commit 5d1072d

Please sign in to comment.