From 86ec89b66aa2d0c6f605c207508c8f2a920dd336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20=C3=87olako=C4=9Flu?= Date: Thu, 1 Apr 2021 11:00:30 +0300 Subject: [PATCH] Lf and some features --- config/lf/lfrc | 7 +++++++ config/zsh/.zshrc | 3 ++- config/zsh/fzf.zsh | 13 ------------- install.sh | 4 ++-- 4 files changed, 11 insertions(+), 16 deletions(-) delete mode 100644 config/zsh/fzf.zsh diff --git a/config/lf/lfrc b/config/lf/lfrc index 607f9d84..75376ee2 100644 --- a/config/lf/lfrc +++ b/config/lf/lfrc @@ -32,6 +32,11 @@ cmd open ${{ cmd mkdir $mkdir -p "$(echo $* | tr ' ' '\ ')" +cmd select_dir ${{ + echo $f > /tmp/lf-chrome-choosed + lf -remote "send $id quit" +}} + cmd extract ${{ clear; tput cup $(($(tput lines)/3)); tput bold set -f @@ -125,6 +130,8 @@ map up map V push :!vim map cd push !cd +map sd select_dir + # Movement map ~ cd ~ map g/ cd / diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index 86b164f8..36195189 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -39,7 +39,8 @@ if [ -f "$XDG_CONFIG_HOME"/zsh/secret ]; then fi source "$XDG_CONFIG_HOME"/zsh/cmds -[ -f "$XDG_CONFIG_HOME"/zsh/fzf.zsh ] && source "$XDG_CONFIG_HOME"/zsh/fzf.zsh +source "/usr/share/fzf/completion.zsh" 2> /dev/null +source "/usr/share/fzf/key-bindings.zsh" export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=241,bold' export KEYTIMEOUT=5 diff --git a/config/zsh/fzf.zsh b/config/zsh/fzf.zsh deleted file mode 100644 index 6a6067b9..00000000 --- a/config/zsh/fzf.zsh +++ /dev/null @@ -1,13 +0,0 @@ -# Setup fzf -# --------- -if [[ ! "$PATH" == */home/yigit/.local/share/fzf/bin* ]]; then - export PATH="${PATH:+${PATH}:}/home/yigit/.local/share/fzf/bin" -fi - -# Auto-completion -# --------------- -[[ $- == *i* ]] && source "/home/yigit/.local/share/fzf/shell/completion.zsh" 2> /dev/null - -# Key bindings -# ------------ -source "/home/yigit/.local/share/fzf/shell/key-bindings.zsh" diff --git a/install.sh b/install.sh index 92a85da6..30a141d5 100755 --- a/install.sh +++ b/install.sh @@ -122,12 +122,12 @@ mkdir -p "$GOPATH" mkdir -p "$ANDROID_HOME" mkdir -p "$FLUTTER_HOME" mkdir -p "$LEIN_HOME" -mkdir -p "$NPM_CONFIG_USERCONFIG" mkdir -p "$NVM_DIR" mkdir -p "$GNUPGHOME" mkdir -p "$WEECHAT_HOME" mkdir -p "$JUPYTER_CONFIG_DIR" mkdir -p "$PYLINTHOME" +mkdir -p "$HOME/.local/share/zsh" touch "$_Z_DATA" # Root Files and Directories @@ -193,7 +193,7 @@ sudo make install > /dev/null 2> /dev/null cd $prev # Do a cleanup and delete some problematic files -mv ~/.fzf > ~/.local/share/fzf +mv ~/.fzf ~/.local/share/fzf rm -rf ~/.fzf* rm -rf ~/.bash_profile sudo rm -rf /etc/urlview/system.urlview