From: Armaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me> Date: Wed, 16 Sep 2020 15:48:31 +0000 (-0400) Subject: changed from .cache directory to /tmp X-Git-Url: https://git.armaanb.net/?p=charsel.git;a=commitdiff_plain;h=fbf0a19c281dd042463b41fce753d1bb430cce39 changed from .cache directory to /tmp --- diff --git a/INSTALL.sh b/INSTALL.sh index cd7c956..da2911b 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -1,6 +1,7 @@ #!/bin/env sh -mkdir ~/.cache/charsel/ +mkdir /tmp/charsel/ +chmod 777 /tmp/charsel/ chmod +x charsel if [ `whoami` == root ]; then diff --git a/charsel b/charsel index 01f1d3f..dc2564f 100755 --- a/charsel +++ b/charsel @@ -1,9 +1,9 @@ #!/usr/bin/env sh # Merge both global and local charfiles -cp /usr/share/charsel/* ~/.cache/charsel/ -cp ~/.local/share/charsel/* ~/.cache/charsel/ -CHARDIR=~/.cache/charsel +CHARDIR=/tmp/charsel +cp /usr/share/charsel/* $CHARDIR +cp ~/.local/share/charsel/* $CHARDIR # Check if user provided a charfile [ -z "$1" ] && echo "No argument supplied" && exit 1 @@ -16,7 +16,7 @@ do # Put charfile into table column -t $CHARDIR/$1 -N SHORT,CHAR -R SHORT,CHAR --output-separator ' | ' - read INPUT + read -n 1 INPUT # Navigate to the right characther OUTPUT=$(grep $INPUT $CHARDIR/$1 | cut -c 3) @@ -24,7 +24,6 @@ do # Clear screen clear - # Print output, and copy to clipboard - echo $OUTPUT + # Copy output to clipboard echo $OUTPUT | xclip -selection clipboard done