mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-15 09:01:16 +00:00
fzf
This commit is contained in:
parent
ac7a2c4811
commit
e1550559e3
9 changed files with 132 additions and 68 deletions
|
|
@ -16,17 +16,20 @@ read_mode() {
|
|||
|
||||
link_mode_assets() {
|
||||
local mode="$1"
|
||||
local fzf_target
|
||||
local ghostty_target
|
||||
local tmux_target
|
||||
local apple_dark_mode
|
||||
|
||||
case "$mode" in
|
||||
dark)
|
||||
fzf_target="@FZF_DARK_FILE@"
|
||||
ghostty_target="@GHOSTTY_DARK_FILE@"
|
||||
tmux_target="@TMUX_DARK_FILE@"
|
||||
apple_dark_mode=true
|
||||
;;
|
||||
light)
|
||||
fzf_target="@FZF_LIGHT_FILE@"
|
||||
ghostty_target="@GHOSTTY_LIGHT_FILE@"
|
||||
tmux_target="@TMUX_LIGHT_FILE@"
|
||||
apple_dark_mode=false
|
||||
|
|
@ -37,8 +40,9 @@ link_mode_assets() {
|
|||
;;
|
||||
esac
|
||||
|
||||
mkdir -p "@STATE_DIR@" "@GHOSTTY_DIR@" "@TMUX_DIR@"
|
||||
mkdir -p "@STATE_DIR@" "@FZF_DIR@" "@GHOSTTY_DIR@" "@TMUX_DIR@"
|
||||
printf '%s\n' "$mode" > "@STATE_FILE@"
|
||||
ln -sfn "$fzf_target" "@FZF_CURRENT_FILE@"
|
||||
ln -sfn "$ghostty_target" "@GHOSTTY_CURRENT_FILE@"
|
||||
ln -sfn "$tmux_target" "@TMUX_CURRENT_FILE@"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue