better xclip
This commit is contained in:
parent
ebade40b51
commit
a45d76673f
|
@ -6,7 +6,8 @@ copy() {
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
xclip -selection c
|
xclip -selection c
|
||||||
else
|
else
|
||||||
cat $1 | xclip -selection c
|
file_type=$(file -b --mime-type "$1")
|
||||||
|
xclip -selection c -t $file_type < $1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +126,6 @@ if [ -d "$GCLONE_PATH" ]; then
|
||||||
|
|
||||||
compdef _cdg cdg
|
compdef _cdg cdg
|
||||||
|
|
||||||
alias mcf="music-client file"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Music things
|
# Music things
|
||||||
|
@ -147,12 +147,14 @@ if [ $? -eq 0 ]; then
|
||||||
if [ $# -eq 1 ]; then
|
if [ $# -eq 1 ]; then
|
||||||
echo "require('music').execute_command(\"$command\")" | awesome-client
|
echo "require('music').execute_command(\"$command\")" | awesome-client
|
||||||
else
|
else
|
||||||
library_path=$(realpath $2 | rev | cut -d '/' -f -3 | rev)
|
library_path=$(realpath $2 | cut -d '/' -f 5-)
|
||||||
awesome_command="require('music').execute_command(\"$command\",\"$library_path\")"
|
awesome_command="require('music').execute_command(\"$command\",\"$library_path\")"
|
||||||
echo $awesome_command | awesome-client
|
echo $awesome_command | awesome-client
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alias mcf="music-client file"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue