Skip to content

Conversation

@leadedyogurt
Copy link

Adds a simple Linux Mint Applet for searching special ASCII characters.

Developed on Cinnamon 6.4.8.

A simple Linux Mint Applet for searching special ASCII characters.
@fredcw
Copy link
Contributor

fredcw commented Dec 14, 2025

Still a few bugs. Maybe change the title to "[WIP]..."?

@leadedyogurt
Copy link
Author

Still a few bugs.

Examples please

@claudiux claudiux marked this pull request as draft December 14, 2025 01:32
@fredcw
Copy link
Contributor

fredcw commented Dec 14, 2025

@leadedyogurt The themeing doesn't work for light coloured themes.

You're relying on xclip being installed but it isn't by default on e.g. Arch, Manjaro

You can try this instead:

const clipboard = St.Clipboard.get_default();
clipboard.set_text(St.ClipboardType.CLIPBOARD, char_string);

I get this error in ~/.xsession-errors after each search (that returns results)

(cinnamon:1071): Cjs-CRITICAL **: 01:36:55.059: JS ERROR: Error: Invalid value 'undefined' for property label in object initializer.
_init@/usr/share/cinnamon/js/ui/overrides.js:33:22
CM/<@/home/fred/.local/share/cinnamon/applets/ascii-map@leadedyogurt/applet.js:203:49

Another idea if you like. Instead of the user having to paste the clipboard, you can simulate "Ctrl-v" to automatically paste the clipboard into whatever the user is working on. Grok figured this out and I use it in cinnamenu:

Meta.later_add(Meta.LaterType.IDLE,
    () => {
        const clipboard = St.Clipboard.get_default();
        clipboard.set_text(St.ClipboardType.CLIPBOARD, this.app.emoji);

        // Simulate "ctrl+v".
        const seat = Clutter.get_default_backend().get_default_seat();
        const virtualDevice = seat.create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE);
        const time_us = GLib.get_monotonic_time();
        virtualDevice.notify_keyval(time_us, Clutter.KEY_Control_L, Clutter.KeyState.PRESSED);
        virtualDevice.notify_keyval(time_us, Clutter.KEY_v, Clutter.KeyState.PRESSED);
        virtualDevice.notify_keyval(time_us, Clutter.KEY_v, Clutter.KeyState.RELEASED);
        virtualDevice.notify_keyval(time_us, Clutter.KEY_Control_L, Clutter.KeyState.RELEASED);
    }
);

Edit: Nice applet btw.

- Edited CSS to match the user's theme
  - changed panel and ui icons to symbolic
- Updated main icon
- Removed Xclip dependency
- Fixed minor bug with 'hotbar' functionality
-Fixes minor bug with 'hotbar' buttons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants