summaryrefslogtreecommitdiff
path: root/ar/.config
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-02-06 14:43:39 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-02-06 14:43:39 +0900
commit6053dfba6fd1172c7180985cc61b068018768608 (patch)
tree997992953f6b3654b80de7ff769e587c81b6fa0d /ar/.config
parente3f6bf06601cd5d633528eb403eb63617163e9fe (diff)
modified lf/lfrc, modified shell/profile
Diffstat (limited to 'ar/.config')
-rw-r--r--ar/.config/lf/lfrc11
-rw-r--r--ar/.config/shell/profile4
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 <c-f> fzf_search
map <c-z> 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"