From 6d69064904e207e9e837e31aa384454d1e50b330 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 25 Mar 2017 14:22:03 -0700 Subject: [PATCH 1/2] [Emacs] Require helm-ring for custom terminal version --- dotfiles/emacs.d/README.org | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 2bd71b5c..567ecc3f 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -3868,6 +3868,7 @@ in term-mode. This makes term-mode 1000% more useful (if string string (current-kill 0)))) (require 'helm) + (require 'helm-ring) (defvar helm-kill-ring-for-term-actions '(("Yank" . imalison:term-paste) From 994f4dfb1370f9e788ab733fdfd4dae842cd7865 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 25 Mar 2017 14:22:23 -0700 Subject: [PATCH 2/2] [Linux] Add history to rofi command --- dotfiles/lib/bin/rofi_command.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dotfiles/lib/bin/rofi_command.sh b/dotfiles/lib/bin/rofi_command.sh index 240e401e..a140ab73 100755 --- a/dotfiles/lib/bin/rofi_command.sh +++ b/dotfiles/lib/bin/rofi_command.sh @@ -15,8 +15,14 @@ get_all_aliases () { alias | cut -d = -f 1 } +get_all_history () { + cat ~/.zsh_history | cut -d ';' -f 2- | awk '!a[$0]++' +} + + +selected=$({ get_all_executables; get_all_aliases; get_all_functions; get_all_history; } | + rofi -dmenu -i -kb-custom-1 "Alt+c" -kb-custom-2 "Alt+t") -selected=$({ get_all_executables; get_all_aliases; get_all_functions; } | rofi -dmenu -i -kb-custom-1 "Alt+c") rofi_exit="$?" args="" case "$rofi_exit" in @@ -25,5 +31,9 @@ case "$rofi_exit" in ;; 10) args=$(echo "" | rofi -dmenu) + ;; + 11) + urxvt --hold -e "$selected" + ;; esac eval "$selected $args"