diff --git a/conf/ghostty/config b/conf/ghostty/config index a51c47b5..d5ad848e 100644 --- a/conf/ghostty/config +++ b/conf/ghostty/config @@ -3,7 +3,7 @@ # https://github.com/ghostty-org/ghostty/blob/b8ffee7acbdd5ee97953f6e6d02e047d4bfda37b/src/input/key.zig#L255 -theme = dark:Kanagawa Dragon,light:Builtin Solarized Light +theme = dark:kanagawa-dragon,light:Builtin Solarized Light font-family = Berkeley Mono Nerd Font # font-family = Iosevka Nerd Font Mono font-size = 15 @@ -19,7 +19,7 @@ macos-window-shadow = true adjust-underline-position = 10% adjust-underline-thickness = -40% adjust-box-thickness = -40% -adjust-cell-height = 20% +adjust-cell-height = 25% mouse-hide-while-typing = true focus-follows-mouse = false unfocused-split-opacity = 1 diff --git a/conf/ghostty/config-tmux b/conf/ghostty/config-tmux index 817a04f8..de5f6c7a 100644 --- a/conf/ghostty/config-tmux +++ b/conf/ghostty/config-tmux @@ -11,11 +11,13 @@ keybind = super+left_bracket=text:\x1ap keybind = super+right_bracket=text:\x1an keybind = super+slash=text:\x1a/ keybind = super+minus=text:\x1a- -keybind = super+w=text:\x1aw +keybind = super+w=text:\x1a\x17 keybind = super+one=text:\x1a1 keybind = super+two=text:\x1a2 keybind = super+three=text:\x1a3 keybind = super+four=text:\x1a4 +# select last window +keybind = super+z=text:\x1al keybind = super+h=text:\x1bh keybind = super+l=text:\x1bl diff --git a/conf/ghostty/themes/kanagawa-dragon b/conf/ghostty/themes/kanagawa-dragon new file mode 100644 index 00000000..5797d2c7 --- /dev/null +++ b/conf/ghostty/themes/kanagawa-dragon @@ -0,0 +1,22 @@ +palette = 0=#010100 +palette = 1=#c4746e +palette = 2=#8a9a7b +palette = 3=#6B5A71 +palette = 4=#8ba4b0 +palette = 5=#a292a3 +palette = 6=#8ea4a2 +palette = 7=#c8c093 +palette = 8=#a6a69c +palette = 9=#e46876 +palette = 10=#87a987 +palette = 11=#e6c384 +palette = 12=#7fb4ca +palette = 13=#938aa9 +palette = 14=#7aa89f +palette = 15=#c5c9c5 + +background = 000000 +foreground = c5c9c5 +cursor-color = c8c093 +selection-background = 2d4f67 +selection-foreground = c8c093 diff --git a/conf/tmux/bin/.envs b/conf/tmux/bin/.envs index f5d72c37..2223522a 100644 --- a/conf/tmux/bin/.envs +++ b/conf/tmux/bin/.envs @@ -30,7 +30,7 @@ TMUX_FZF_BIN="$current_dir/.fzf-tmux" # $TMUX_FZF_OPTIONS tmux_version=$(tmux -V | grep -oE '[0-9]+\.[0-9]*') if [ $(compare_float $tmux_version "3.1") == ">" ]; then - [ -z "$TMUX_FZF_OPTIONS" ] && TMUX_FZF_OPTIONS="--no-hscroll -p -w 78% -h 60% -m" + [ -z "$TMUX_FZF_OPTIONS" ] && TMUX_FZF_OPTIONS="--no-hscroll -p -w 90% -h 80% -m" else [ -z "$TMUX_FZF_OPTIONS" ] && TMUX_FZF_OPTIONS="-m" fi diff --git a/conf/yabai/yabairc b/conf/yabai/yabairc index 99451eba..8e07dd17 100755 --- a/conf/yabai/yabairc +++ b/conf/yabai/yabairc @@ -30,26 +30,30 @@ launchctl unload -F /System/Library/LaunchAgents/com.apple.WindowManager.plist > # -- mouse -- # yabai -m config focus_follows_mouse autofocus -# -- off autoraise autofocus +# ---? off autoraise autofocus yabai -m config focus_follows_mouse off -# yabai -m config mouse_modifier fn -# yabai -m config mouse_action1 resize -# yabai -m config mouse_action2 move +yabai -m config mouse_drop_action swap +yabai -m config mouse_modifier fn +yabai -m config mouse_action1 move +yabai -m config mouse_action2 resize # -- window -- yabai -m config window_placement first_child +yabai -m config window_insertion_point last yabai -m config window_shadow on yabai -m config insert_feedback_color 0xaad75f5f -yabai -m config split_ratio 0.30 -yabai -m config split_type auto -yabai -m config auto_balance off +yabai -m config split_ratio 0.5 +yabai -m config display_arrangement_order horizontal +yabai -m config window_animation_duration 0.15 +yabai -m config window_animation_easing ease_in_sine +yabai -m config window_origin_display cursor +yabai -m config split_type horizontal +yabai -m config auto_balance x-axis yabai -m config window_opacity off # -- space -- -yabai -m config layout float +yabai -m config layout bsp yabai -m config --space 1 layout stack -yabai -m config --space 2 layout bsp -# yabai -m config --space 3 layout bsp yabai -m config top_padding 4 yabai -m config bottom_padding 4 yabai -m config left_padding 4 @@ -64,7 +68,7 @@ yabai -m space 2 --label code ## see: https://github.com/koekeishiya/yabai/issues/1929 yabai -m rule --add app=".*" layer=normal sub-layer=below yabai -m rule --add app="^(Safari|Firefox|Google Chrome)$" role=AXWindow subrole=AXStandardWindow -yabai -m rule --add app="^(Cursor)$" role=AXWindow subrole=AXStandardWindow +yabai -m rule --add app="^(Code|Cursor)$" role=AXWindow subrole=AXStandardWindow yabai -m rule --add app="(微信|钉钉|Wechat|企业微信|Telegram|Numi|MenubarX|备忘录|Notes)" manage=off sub-layer=below yabai -m rule --add app="(腾讯会议|快速会议|会议|Capacities|数码测色计|富途牛牛|豆包)" manage=off sub-layer=below yabai -m rule --add app="^Ghostty$" manage=off sub-layer=below diff --git a/conf/yazi/keymap.toml b/conf/yazi/keymap.toml index 599afa29..0f541494 100644 --- a/conf/yazi/keymap.toml +++ b/conf/yazi/keymap.toml @@ -120,10 +120,10 @@ keymap = [ { on = [ "g", "g", - ], run = "arrow -99999999", desc = "Move cursor to the top" }, + ], run = "arrow top", desc = "Move cursor to the top" }, { on = [ "G", - ], run = "arrow 99999999", desc = "Move cursor to the bottom" }, + ], run = "arrow bot", desc = "Move cursor to the bottom" }, # Selection { on = [ diff --git a/conf/yazi/yazi.toml b/conf/yazi/yazi.toml index 5a7f89cd..272a11e7 100644 --- a/conf/yazi/yazi.toml +++ b/conf/yazi/yazi.toml @@ -186,6 +186,3 @@ open_offset = [0, 1, 50, 7] sort_by = "none" sort_sensitive = false sort_reverse = false - -[log] -enabled = false diff --git a/nix/darwin/configuration.nix b/nix/darwin/configuration.nix index da7dde96..00852f98 100644 --- a/nix/darwin/configuration.nix +++ b/nix/darwin/configuration.nix @@ -80,7 +80,6 @@ # for nix-direnv keep-outputs = true; keep-derivations = true; - sandbox = "relaxed"; # -- substituters = [ "https://dots.cachix.org" diff --git a/nix/hm/autoraise.nix b/nix/hm/autoraise.nix new file mode 100644 index 00000000..ceeffe19 --- /dev/null +++ b/nix/hm/autoraise.nix @@ -0,0 +1,26 @@ +{ + pkgs, + ... +}: +{ + home.packages = with pkgs; [ + autoraise + ]; + + home.file.autoraise = { + executable = true; + target = ".config/AutoRaise/config"; + text = '' + pollMillis=500 + delay=1 + focusDelay=2 + warpX=0.5 + warpY=0.1 + scale=2.5 + altTaskSwitcher=false + ignoreSpaceChanged=false + ignoreApps="" + mouseDelta=0.1 + ''; + }; +} diff --git a/nix/hm/fish.nix b/nix/hm/fish.nix index d92dcb98..bf9dcba6 100644 --- a/nix/hm/fish.nix +++ b/nix/hm/fish.nix @@ -24,10 +24,10 @@ name = "foreign-env"; inherit (pkgs.fishPlugins.foreign-env) src; } - # { - # name = "sponge"; - # inherit (pkgs.fishPlugins.sponge) src; - # } + { + name = "sponge"; + inherit (pkgs.fishPlugins.sponge) src; + } { name = "fifc"; # src = pkgs.fetchFromGitHub { diff --git a/nix/home.nix b/nix/home.nix index 60846388..bbd88666 100644 --- a/nix/home.nix +++ b/nix/home.nix @@ -158,6 +158,7 @@ in ./hm/dark-mode-notify.nix ./hm/lazygit.nix ./hm/jj.nix + ./hm/autoraise.nix ]; # Let Home Manager install and manage itself. diff --git a/nix/modules/elixir.nix b/nix/modules/elixir.nix index 2506b5d8..70ac1599 100644 --- a/nix/modules/elixir.nix +++ b/nix/modules/elixir.nix @@ -5,21 +5,9 @@ ... }: let - mk_elixir_nix_version = - elixir_version: builtins.replaceStrings [ "." ] [ "_" ] "elixir_${elixir_version}"; - beamPackages = - pkgs.beam.packagesWith - pkgs.beam.interpreters."erlang_${config.elixir.erlang_nix_version}"; + beamPackages = pkgs.beam.packages.erlang_27; erlang = beamPackages.erlang; - elixir = beamPackages.${mk_elixir_nix_version config.elixir.elixir_nix_version}.override { - inherit erlang; - # version = "1.17.2"; - # rev = "47abe2d107e654ccede845356773bcf6e11ef7cb"; - # sha256 = "sha256-8rb2f4CvJzio3QgoxvCv1iz8HooXze0tWUJ4Sc13dxg="; - }; - elixir-ls = beamPackages.elixir-ls.overrideAttrs (_oldAttrs: { - elixir = elixir; - }); + elixir = beamPackages.elixir_1_18; hex = beamPackages.hex; # use rebar from nix instead of fetch externally rebar3 = beamPackages.rebar3; @@ -29,29 +17,17 @@ in enable = lib.mkEnableOption { default = false; }; - elixir_nix_version = lib.mkOption { - description = "The version of elixir to use"; - example = "x.x"; - type = lib.types.str; - default = "1.17"; - }; - erlang_nix_version = lib.mkOption { - description = "The version of erlang to use"; - type = lib.types.str; - default = "27"; - }; }; config = lib.mkIf config.elixir.enable { home.packages = [ elixir erlang - elixir-ls hex rebar3 ]; home.sessionVariables = { - ELS_INSTALL_PREFIX = "${elixir-ls}/lib"; + # ELS_INSTALL_PREFIX = "${elixir-ls}/lib"; MIX_PATH = "${hex}/lib/erlang/lib/hex/ebin"; MIX_REBAR3 = "${rebar3}/bin/rebar3"; ERL_AFLAGS = "-kernel shell_history enabled";