mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-12 11:45:55 +01:00
fallback wmaker.inst.in
added wcopy/wpaste scripts
This commit is contained in:
36
util/wpaste
Executable file
36
util/wpaste
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Provide some enhancements to the wxpaste command, which pastes from X11
|
||||
# clipboard text buffers to standard output.
|
||||
#
|
||||
# Allow pasting to stdout from any of the cutbuffers. Note that they are
|
||||
# indexed counting from 0.
|
||||
#
|
||||
# Author: Luke Kendall
|
||||
#
|
||||
|
||||
if [ $# = 0 ]
|
||||
then
|
||||
wxpaste $WXPASTE_DEFS
|
||||
else
|
||||
MYNAME=`basename $0`
|
||||
USAGE="usage: $MYNAME [ [0-9]... ] [wxpaste's args]"
|
||||
for n
|
||||
do
|
||||
if expr "x$n" : 'x[0-9][0-9]*$' > /dev/null
|
||||
then
|
||||
NUMARGS="$NUMARGS $n"
|
||||
elif [ "x$n" = "x-h" ]
|
||||
then
|
||||
echo "$USAGE" >&2
|
||||
exit 0
|
||||
else
|
||||
WXARGS="$WXARGS $n"
|
||||
fi
|
||||
done
|
||||
set - $NUMARGS
|
||||
for n
|
||||
do
|
||||
wxpaste $WXPASTE_DEFS $WXARGS -cutbuffer $n
|
||||
done
|
||||
fi
|
||||
Reference in New Issue
Block a user