Compare commits
2 commits
302bc0ebf4
...
941dd4aaea
Author | SHA1 | Date | |
---|---|---|---|
941dd4aaea | |||
56ae0f1bab |
4 changed files with 15 additions and 4 deletions
|
@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Always download from newest emoji list url
|
- Always download from newest emoji list url
|
||||||
|
- Pass selection to custom typing tools through stdin
|
||||||
|
|
||||||
<!-- ### Security -->
|
<!-- ### Security -->
|
||||||
|
|
||||||
|
|
|
@ -43,10 +43,10 @@ ln -s bemoji/bemoji /usr/local/bin/bemoji
|
||||||
|
|
||||||
### Arch Linux
|
### Arch Linux
|
||||||
|
|
||||||
On Arch Linux, bemoji has been packaged for the [AUR](https://aur.archlinux.org/packages/bemoji-git) so it can be installed manually from here or easily with your preferred AUR helper, e.g.:
|
On Arch Linux, bemoji has been packaged for the [AUR](https://aur.archlinux.org/packages?K=bemoji) so it can be installed manually from here or easily with your preferred AUR helper, e.g.:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
paru -S bemoji-git
|
paru -S bemoji
|
||||||
```
|
```
|
||||||
|
|
||||||
## 💿 Usage
|
## 💿 Usage
|
||||||
|
@ -222,6 +222,8 @@ BEMOJI_CLIP_CMD="path/to/your/clipboard/tool"
|
||||||
BEMOJI_TYPE_CMD="path/to/your/xdotool"
|
BEMOJI_TYPE_CMD="path/to/your/xdotool"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The candidate list (in the case of picker tool) or the picked selection are passed to the tools through stdin.
|
||||||
|
|
||||||
This is pretty experimental and you'll have to see how well it works for you.
|
This is pretty experimental and you'll have to see how well it works for you.
|
||||||
The setting can not be changed through the commandline alone.
|
The setting can not be changed through the commandline alone.
|
||||||
|
|
||||||
|
|
7
bemoji
7
bemoji
|
@ -165,11 +165,14 @@ _clipper() {
|
||||||
|
|
||||||
# Set default typing uti
|
# Set default typing uti
|
||||||
_typer() {
|
_typer() {
|
||||||
totype=$(cat -)
|
|
||||||
if [ -n "$BEMOJI_TYPE_CMD" ]; then
|
if [ -n "$BEMOJI_TYPE_CMD" ]; then
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
${BEMOJI_TYPE_CMD[@]}
|
${BEMOJI_TYPE_CMD[@]}
|
||||||
elif [ -n "$WAYLAND_DISPLAY" ] && command -v wtype >/dev/null 2>&1; then
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
totype=$(cat -)
|
||||||
|
if [ -n "$WAYLAND_DISPLAY" ] && command -v wtype >/dev/null 2>&1; then
|
||||||
wtype -s 30 "$totype"
|
wtype -s 30 "$totype"
|
||||||
elif [ -n "$DISPLAY" ] && command -v xdotool >/dev/null 2>&1; then
|
elif [ -n "$DISPLAY" ] && command -v xdotool >/dev/null 2>&1; then
|
||||||
xdotool type --delay 30 "$totype"
|
xdotool type --delay 30 "$totype"
|
||||||
|
|
|
@ -54,6 +54,11 @@ setup() {
|
||||||
typing result"
|
typing result"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "Passes selection to custom typer tool through stdin" {
|
||||||
|
BEMOJI_TYPE_CMD="cat -" run bemoji -t 3>&-
|
||||||
|
assert_output "❤️"
|
||||||
|
}
|
||||||
|
|
||||||
@test "Runs custom default command" {
|
@test "Runs custom default command" {
|
||||||
BEMOJI_DEFAULT_CMD="echo my custom command" run bemoji 3>&-
|
BEMOJI_DEFAULT_CMD="echo my custom command" run bemoji 3>&-
|
||||||
assert_output "my custom command"
|
assert_output "my custom command"
|
||||||
|
|
Loading…
Reference in a new issue