Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Numerical Action #213

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Python Checks

on:
push:
branches: [ "main" ]
pull_request:

jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
steps:
- uses: actions/checkout@v4

- name: Set up Python and uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "uv.lock"
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}

- name: Build
run: uv build

- name: Run ruff
run: uv run ruff check
53 changes: 53 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Upload Python Package

on:
release:
types: [ published ]

permissions:
contents: read

jobs:
build:
name: Build distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python and uv
uses: astral-sh/setup-uv@v5
with:
python-version: 3.13
enable-cache: true
cache-dependency-glob: "uv.lock"
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}

- name: Build a binary wheel and a source tarball
run: uv build

- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: Publish to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/rofimoji
permissions:
id-token: write

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/

- name: Publish distribution
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ rofimoji.egg-info
dist
build
src/picker/data/copyme.py
venv/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017-2024 Fabian Winter
Copyright (c) 2017-2025 Fabian Winter

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ You can configure `rofimoji` either with cli arguments or with a config file cal

| long option | short option | possible values | default value | description |
|-------------------------------------------------------------------------------------------------------------------------|--------------|----------------------------------------------------------------------------------------------------------------|---------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--action` | `-a` | `type`, `copy`, `clipboard`, `unicode`, `copy-unicode`, `print`, `menu` | `type` | Choose what `rofimoji` should do with the selected characters. See [Actions](#actions) below for details. |
| `--action` | `-a` | `type`, `copy`, `clipboard`, `type-numerical`, `unicode`, `copy-unicode`, `print`, `menu` | `type` | Choose what `rofimoji` should do with the selected characters. See [Actions](#actions) below for details. |
| `--files` | `-f` | `all`, `<yourfile>` or [any of the files in `data`](https://github.com/fdw/rofimoji/tree/main/src/picker/data) | `emojis` | Define which file(s) to load characters from. A file name without extension (f.e. `emojis_smileys_emotion`) is enough for the distributed ones or any in `${XDG_DATA_HOME}/rofimoji/data`. Globbing with `*` is possible.<br/>`all` is a shortcut for all default files at once. Use with caution, that is a *lot*. |
| `--skin-tone` | `-s` | `light`, `medium-light`, `moderate`, `dark brown`, `black`, as well as `neutral` and `ask` | `ask` | Define the skin tone of supporting emojis. `ask` will always ask the user. |
| `--max-recent` | | 0-10 | 10 | Show at most this many recently picked characters. The number will be capped at 10. Set to `0` to disable the whole feature. |
Expand All @@ -69,7 +69,7 @@ You can configure `rofimoji` either with cli arguments or with a config file cal
| `--selector` | | `rofi`, `wofi`, `fuzzel`, `dmenu`, `tofi`, `bemenu`, `wmenu` | (automatically chosen) | Show the selection dialog with this application. |
| `--clipboarder` | | `xsel`, `xclip`, `wl-copy` | (automatically chosen) | Access the clipboard with this application. |
| `--typer` | | `xdotool`, `wtype` | (automatically chosen) | Type the characters using this application. |
| `--keybinding-copy`, `--keybinding-type`, `--keybinding-clipboard`, `--keybinding-unicode`, `--keybinding-copy-unicode` | | | `Alt+c`, `Alt+t`, `Alt+p`, `Alt+u`, `Alt+i` | Choose different keybindings than the default values. |
| `--keybinding-copy`, `--keybinding-type`, `--keybinding-clipboard`, `--keybinding-unicode`, `--keybinding-copy-unicode`, `--keybinding-type-numerical` | | | `Alt+c`, `Alt+t`, `Alt+p`, `Alt+u`, `Alt+i`, `Alt+n` | Choose different keybindings than the default values. |

## Example config file
`~/.config/rofimoji.rc`:
Expand All @@ -89,6 +89,7 @@ The options are:
| `type` | `alt+t` | Directly type the characters into the last active window. This is the *default* |
| `copy` | `alt+c` | Copy them to the clipboard. |
| `clipboard` | `alt+p` | Insert the selected characters through pasting from the clipboard, instead of directly typing them. See [Insertion Method](#insertion-method). |
| `type-numerical`| `alt+n` | Directly type the emoji(s) by using their Unicode codepoints; this simulates Ctrl+Shift+U<codepoint> on the keyboard |
| `unicode` | `alt+u` | Type the unicode codepoints of the selected characters. |
| `copy-unicode` | `alt+i` | Copy the codepoints to clipboard. |
| `print` | | Print the chosen characters to `stdout`. |
Expand Down
Loading