Skip to content

Commit

Permalink
Add 0.10.0 documentation to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Slackadays committed Nov 16, 2024
1 parent cc00a8d commit f40e58d
Show file tree
Hide file tree
Showing 2 changed files with 189 additions and 0 deletions.
97 changes: 97 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,21 @@ $ cb --clr
# These all work great!
```

Clear a certain range of history entries.
```sh
$ cb clear 69-420
# Clears entries 69 through 420 inclusive
$ cb clr 0-100
# Clears entries 0 through 100 inclusive
# Note: Entry 0 is always the most recent one
```

Just clear everything.
```sh
$ cb clear -a
# Note: This will really clear everything in all clipboards!
```

<br>

<h3><b>Edit Clipboard Content</b> &emsp; <code>cb [--](edit|ed)[(num)|_(id)] [editor]</code></h3>
Expand Down Expand Up @@ -732,6 +747,82 @@ cb ed code

<br>

<h3><b>Add Script to Clipboard</b> &emsp; <code>cb [--](script|sc)[(num)|_(id)] [script path|content]</code></h3>

Start simple.
```sh
$ cb script pwd # Note: The exact output of "pwd" will vary depending on your system.
$ cb
/run/user/1000/Clipboard/0/data/0
# The output of CB will be here
/run/user/1000/Clipboard/0/data/0
```

Use a script file instead.
```sh
$ cat myscript.sh
echo "Hello Clipboard!"
echo "Here's what's in the directory:"
ls
$ cb script myscript.sh
$ cb
Hello Clipboard!
Here's what's in the directory:
rawdata.clipboard
# The output of CB will be here
Hello Clipboard!
Here's what's in the directory:
rawdata.clipboard
```

Customize during what action the script runs.
```sh
$ cb script ls --actions search,history
$ cb
$ cb history
rawdata.clipboard
# The output of CB will be here
rawdata.clipboard
$ cb search
rawdata.clipboard
# The output of CB will be here
rawdata.clipboard
$ cb copy
$
```

Customize if the script runs before, after, or both.
```sh
$ cb script ls --timings before
$ cb
rawdata.clipboard
# The output of CB will be here
$ cb script ls --timings after
$ cb
# The output of CB will be here
rawdata.clipboard
$ cb script ls --timings before,after
rawdata.clipboard
# The output of CB will be here
rawdata.clipboard
```

Customize both during what action the script runs and if the script runs before, after, or both.
```sh
$ cb script ls --actions copy --timings before
$ cb
$ cb copy
rawdata.clipboard
# The output of CB will be here
```

View the current script.
```sh
$ cb script
# Script content shows here
```

<br>

### <img src="documentation/readme-assets/MoveThingsAround.png" alt="Move Things Around" height=25px />

Expand Down Expand Up @@ -1460,6 +1551,12 @@ $ export CLIPBOARD_THEME=darkhighcontrast
$ cb show
```

Fully customize your style.
```sh
$ export CLIPBOARD_THEME=help=r;g;b,info=r;g;b,error=r;g;b,success=r;g;b,progress=r;g;b
# Note: You must put in a number within range 0-255 for each r, g, and b
```

<br>

<h3><b><code>FORCE_COLOR</code> &emsp; Set this to "true" or "1" to make CB always show color regardless of what you set <code>NO_COLOR</code> to.</b></h3>
Expand Down
92 changes: 92 additions & 0 deletions documentation/website/content/_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,21 @@ $ cb --clr
# These all work great!
```

Clear a certain range of history entries.
```sh
$ cb clear 69-420
# Clears entries 69 through 420 inclusive
$ cb clr 0-100
# Clears entries 0 through 100 inclusive
# Note: Entry 0 is always the most recent one
```

Just clear everything.
```sh
$ cb clear -a
# Note: This will really clear everything in all clipboards!
```

<br>

<h3><b>Edit Clipboard Content</b> &emsp; <code>cb [--](edit|ed)[(num)|_(id)] [editor]</code></h3>
Expand Down Expand Up @@ -351,6 +366,83 @@ cb ed code

<br>

<h3><b>Add Script to Clipboard</b> &emsp; <code>cb [--](script|sc)[(num)|_(id)] [script path|content]</code></h3>

Start simple.
```sh
$ cb script pwd # Note: The exact output of "pwd" will vary depending on your system.
$ cb
/run/user/1000/Clipboard/0/data/0
# The output of CB will be here
/run/user/1000/Clipboard/0/data/0
```

Use a script file instead.
```sh
$ cat myscript.sh
echo "Hello Clipboard!"
echo "Here's what's in the directory:"
ls
$ cb script myscript.sh
$ cb
Hello Clipboard!
Here's what's in the directory:
rawdata.clipboard
# The output of CB will be here
Hello Clipboard!
Here's what's in the directory:
rawdata.clipboard
```

Customize during what action the script runs.
```sh
$ cb script ls --actions search,history
$ cb
$ cb history
rawdata.clipboard
# The output of CB will be here
rawdata.clipboard
$ cb search
rawdata.clipboard
# The output of CB will be here
rawdata.clipboard
$ cb copy
$
```

Customize if the script runs before, after, or both.
```sh
$ cb script ls --timings before
$ cb
rawdata.clipboard
# The output of CB will be here
$ cb script ls --timings after
$ cb
# The output of CB will be here
rawdata.clipboard
$ cb script ls --timings before,after
rawdata.clipboard
# The output of CB will be here
rawdata.clipboard
```

Customize both during what action the script runs and if the script runs before, after, or both.
```sh
$ cb script ls --actions copy --timings before
$ cb
$ cb copy
rawdata.clipboard
# The output of CB will be here
```

View the current script.
```sh
$ cb script
# Script content shows here
```

<br>

<h3><b>Load Contents</b> &emsp; <code>cb [--](load|ld)[(num)|_(id)] [clipboard] [clipboards]</code></h3>

Start by copying something.
Expand Down

0 comments on commit f40e58d

Please sign in to comment.