diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-14 15:08:03 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-14 15:08:03 +1000 |
| commit | 427b9185a8eb9ee413899bb8891e91acc2557fb8 (patch) | |
| tree | 999ddbb87d72855db7959e937ae4f87722aa4c5c /src/caelestia/subcommands | |
| parent | feat: impl clipboard subcommand (diff) | |
| download | caelestia-cli-427b9185a8eb9ee413899bb8891e91acc2557fb8.tar.gz caelestia-cli-427b9185a8eb9ee413899bb8891e91acc2557fb8.tar.bz2 caelestia-cli-427b9185a8eb9ee413899bb8891e91acc2557fb8.zip | |
feat: impl emoji picker subcommand
Diffstat (limited to 'src/caelestia/subcommands')
| -rw-r--r-- | src/caelestia/subcommands/emoji.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/caelestia/subcommands/emoji.py b/src/caelestia/subcommands/emoji.py index 37f9a2b..f04b502 100644 --- a/src/caelestia/subcommands/emoji.py +++ b/src/caelestia/subcommands/emoji.py @@ -1,5 +1,8 @@ +import subprocess from argparse import Namespace +from caelestia.utils.paths import cli_data_dir + class Command: args: Namespace @@ -8,4 +11,8 @@ class Command: self.args = args def run(self) -> None: - pass + emojis = (cli_data_dir / "emojis.txt").read_text() + chosen = subprocess.check_output( + ["fuzzel", "--dmenu", "--placeholder=Type to search emojis"], input=emojis, text=True + ) + subprocess.run(["wl-copy"], input=chosen.split()[0], text=True) |