From 9ac0d58102a395f983c59d1504e0910ebfa0b17f Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 18 Feb 2020 11:35:37 +0100 Subject: FZF config --- solanum/dot_tmux.conf | 2 ++ solanum/fzf2.sh | 17 +++++++++++++++++ solanum/sway/config | 3 ++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 solanum/fzf2.sh diff --git a/solanum/dot_tmux.conf b/solanum/dot_tmux.conf index be0d6bf..5192105 100644 --- a/solanum/dot_tmux.conf +++ b/solanum/dot_tmux.conf @@ -1,5 +1,7 @@ # KEY BINDINGS +new-session -n $HOST + setw -g mode-keys vi # remap prefix to Control + a diff --git a/solanum/fzf2.sh b/solanum/fzf2.sh new file mode 100755 index 0000000..bf774a5 --- /dev/null +++ b/solanum/fzf2.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +cmd=$(compgen -c | fzf) + +if [ -z "$cmd" ]; then + exit +fi + +file=$(fzf) + +if [ -z "$file" ]; then + exit +fi + +"$cmd" "$file" & + +sleep 1 diff --git a/solanum/sway/config b/solanum/sway/config index e14fcae..22b5a17 100644 --- a/solanum/sway/config +++ b/solanum/sway/config @@ -35,7 +35,8 @@ floating_modifier $mod # start a terminal #bindsym $mod+Return exec i3-sensible-terminal #bindsym $mod+Return exec xfce4-terminal -bindsym $mod+Return exec alacritty +bindsym $mod+Return exec alacritty -e tmux attach +bindsym $mod+o exec alacritty -e /home/aauvolat/.local/bin/fzf2.sh #bindsym $mod+Return exec gnome-terminal # bindsym $mod+Shift+X exec xscreensaver-command -lock -- cgit v1.2.3