Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged

Next #51

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conf/ghostty/config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion conf/ghostty/config-tmux
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 22 additions & 0 deletions conf/ghostty/themes/kanagawa-dragon
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion conf/tmux/bin/.envs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 15 additions & 11 deletions conf/yabai/yabairc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions conf/yazi/keymap.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
3 changes: 0 additions & 3 deletions conf/yazi/yazi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,3 @@ open_offset = [0, 1, 50, 7]
sort_by = "none"
sort_sensitive = false
sort_reverse = false

[log]
enabled = false
1 change: 0 additions & 1 deletion nix/darwin/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
# for nix-direnv
keep-outputs = true;
keep-derivations = true;
sandbox = "relaxed";
# --
substituters = [
"https://dots.cachix.org"
Expand Down
26 changes: 26 additions & 0 deletions nix/hm/autoraise.nix
Original file line number Diff line number Diff line change
@@ -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
'';
};
}
8 changes: 4 additions & 4 deletions nix/hm/fish.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions nix/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
30 changes: 3 additions & 27 deletions nix/modules/elixir.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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";
Expand Down
Loading