From 9f46e8c2f97e47be04fbdd07fed04809b3b818bd Mon Sep 17 00:00:00 2001 From: xerus2000 <27jf@pm.me> Date: Wed, 14 Oct 2020 14:18:12 +0200 Subject: [PATCH] config: Improve compatibility with non-visual environments --- .config/shell/debian | 2 +- .config/shell/functions | 4 ++-- .xsessionrc | 3 +++ .zprofile | 3 --- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.config/shell/debian b/.config/shell/debian index 3f81216..89a75b4 100644 --- a/.config/shell/debian +++ b/.config/shell/debian @@ -65,7 +65,7 @@ aptrepoinstall() { # Usage: ghrelease USER REPO [PATTERN] ghrelease() { result=$(curl -s "https://api.github.com/repos/$1/$2/releases/latest" | grep -o "http.*${3:-deb}" | awk '{ print length(), $0}' | sort -n | cut -d' ' -f2-) - echo "$result" | grep amd64 || echo "$result" + echo "$result" | command grep amd64 || echo "$result" } # Installs a local or remote(http/https) deb package and removes it after installation diff --git a/.config/shell/functions b/.config/shell/functions index 04b50f2..597d448 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -387,8 +387,8 @@ genssh() { test -f ~/.ssh/id_rsa.pub || ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -q -N "" -C ${1:-$(hostname)} if test "$OSTYPE" = "cygwin" then cat ~/.ssh/id_rsa.pub>/dev/clipboard - else xclip -sel clip < ~/.ssh/id_rsa.pub - fi && echo "SSH Public key copied to clipboard" + else xclip -sel clip < ~/.ssh/id_rsa.pub | cat ~/.ssh/id_rsa.pub + fi && echo "SSH Public key copied to clipboard" } createproject() { diff --git a/.xsessionrc b/.xsessionrc index 75dfc96..c821e18 100644 --- a/.xsessionrc +++ b/.xsessionrc @@ -1,2 +1,5 @@ export XDG_DATA_DIRS="$HOME/.local/xdg:$XDG_DATA_DIRS" export KDEHOME="$XDG_DATA_HOME/kdehome" + +# Update keyboard layout to US if keyboardio is connected +$HOME/.local/bin/update-keyboard-layout diff --git a/.zprofile b/.zprofile index b025a3f..c9a66c9 100644 --- a/.zprofile +++ b/.zprofile @@ -34,6 +34,3 @@ export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" export CTEST_PROGRESS_OUTPUT=1 export CTEST_OUTPUT_ON_FAILURE=1 export CTEST_PARALLEL_LEVEL=3 - -# Update keyboard layout to US if keyboardio is connected -$HOME/.local/bin/update-keyboard-layout