diff --git a/scripts/menu/menu-snippets b/scripts/menu/menu-snippets index 780f912..60e9dc1 100755 --- a/scripts/menu/menu-snippets +++ b/scripts/menu/menu-snippets @@ -10,4 +10,5 @@ snippet=$(ls "$snippets" | menu "Snippet:") [ -z "$snippet" ] && exit # Copy to clipboard and notify otherwise -cat "$snippets"/"$snippet" | xsel -ib && notify-send "Snippet" "'$snippet' copied to clipboard!" +printf '%s' "$(cat $snippets/$snippet)" | + xsel -ib && notify-send "Snippet" "'$snippet' copied to clipboard!" diff --git a/shell/aliasrc b/shell/aliasrc index 9a94ffb..285723e 100644 --- a/shell/aliasrc +++ b/shell/aliasrc @@ -6,7 +6,7 @@ alias \ cfg="cd $HOME/.config/ && ls" \ tmp="cd $HOME/Desktop/temp/ && ls" \ dsk="cd $HOME/Desktop/ && ls" \ - prj="cd $HOME/Documents/projects/ && ls" \ + prj="cd $HOME/Desktop/projects/ && ls" \ doc="cd $HOME/Documents/ && ls" \ dow="cd $HOME/Downloads/ && ls" \ mus="cd $HOME/Music/ && ls" \ diff --git a/shell/envvar b/shell/envvar index 84ee81e..1b056ce 100644 --- a/shell/envvar +++ b/shell/envvar @@ -10,6 +10,8 @@ PATH="$HOME/.local/bin${PATH:+:${PATH}}" # Common export \ + HISTIZE= \ + HISTFILESIZE= \ GITLAB="ssh://git@gitlab.com/tavo-wasd" \ BOOKMARKS="$HOME/Documents/bookmarks" \ BIB="$HOME/Documents/bibliography" \ diff --git a/shell/functions b/shell/functions index 1a38e41..cd968c4 100644 --- a/shell/functions +++ b/shell/functions @@ -24,9 +24,10 @@ fi # Copy output of a command copy_history() { +HISTTIMEFORMAT="%F %T " history | + head -n -1 | fzf --cycle --height=50% --border top --tac --prompt='⯈ ' | - sed 's/^\s*[0-9]*\s*//g' | - tr -d '\n' | + sed -z 's/^.*:[0-9]*\s*//g;s/\s*$//g' | xsel -ib }