From 6053dfba6fd1172c7180985cc61b068018768608 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Fri, 6 Feb 2026 14:43:39 +0900 Subject: modified lf/lfrc, modified shell/profile --- ar/.config/lf/lfrc | 11 +++++++++++ ar/.config/shell/profile | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ar/.config/lf/lfrc b/ar/.config/lf/lfrc index c11a06c..710ab41 100644 --- a/ar/.config/lf/lfrc +++ b/ar/.config/lf/lfrc @@ -179,6 +179,7 @@ cmd delete ${{ }} cmd trash ${{ + clear files=$(printf "$fx" | tr '\n' ';') while [ "$files" ]; do file=${files%%;*} @@ -223,6 +224,15 @@ cmd extract ${{ }} # Git +cmd git-root %{{ + root=$(git rev-parse --show-toplevel 2>/dev/null) + if [ -n "$root" ]; then + lf -remote "send $id cd \"$root\"" + else + lf -remote "send $id echo 'Not in a git repository'" + fi +}} + cmd on-cd &{{ zoxide add "$PWD" bash -c ' @@ -646,6 +656,7 @@ map fD zi map fd $lf -remote "send $id select \"$(find . -type d | fzf)\"" map ff $lf -remote "send $id select \"$(find . -type f | fzf)\"" map gl follow_link +map gc git-root map fzf_search map z diff --git a/ar/.config/shell/profile b/ar/.config/shell/profile index 90c3675..8bd1f32 100644 --- a/ar/.config/shell/profile +++ b/ar/.config/shell/profile @@ -186,11 +186,11 @@ export PASSWORD_STORE_ENABLE_EXTENSIONS="true" # export BASH_COMPLETION_USER_DIR=$XDG_DATA_HOME/bash-completion/completions ### --- PHP --- ### -export PHP_HISTFILE="$XDG_STATE_HOME/history/php_history" +export PHP_HISTFILE="$XDG_DATA_HOME/history/php_history" ### --- POSTGRESQL --- ### export PSQLRC="$XDG_CONFIG_HOME/pg/psqlrc" -export PSQL_HISTORY="$XDG_STATE_HOME/history/psql_history" +export PSQL_HISTORY="$XDG_DATA_HOME/history/psql_history" export PGPASSFILE="$XDG_CONFIG_HOME/pg/pgpass" export PGSERVICEFILE="$XDG_CONFIG_HOME/pg/pg_service.conf" -- cgit v1.2.3