- Web-based key editor (Alpine.js SPA) - Actions: shell commands, scripts, built-in media/volume/brightness, page switching - Keyboard shortcut action (wtype/xdotool) - On-device display with periodic command output - Auto page switching (Hyprland, Sway, Niri, GNOME, KDE, X11) - Screensaver with idle detection - Config hot-reload - Multi-device support
210 lines
7.6 KiB
Go
210 lines
7.6 KiB
Go
package main
|
|
|
|
import "sync"
|
|
|
|
var emojiShortcodes = map[string]rune{
|
|
// media
|
|
"play_pause": 0x25B6,
|
|
"stop": 0x23F9,
|
|
"record": 0x23FA,
|
|
"eject": 0x23CF,
|
|
"track_previous": 0x23EE,
|
|
"track_next": 0x23ED,
|
|
"fast_forward": 0x23E9,
|
|
"rewind": 0x23EA,
|
|
"shuffle": 0x1F500,
|
|
"repeat": 0x1F501,
|
|
"repeat_one": 0x1F502,
|
|
|
|
// volume
|
|
"speaker": 0x1F50A,
|
|
"mute": 0x1F507,
|
|
"sound": 0x1F509,
|
|
|
|
// navigation
|
|
"arrow_up": 0x2B06,
|
|
"arrow_down": 0x2B07,
|
|
"arrow_left": 0x2B05,
|
|
"arrow_right": 0x27A1,
|
|
"arrows_clockwise": 0x1F503,
|
|
"arrows_counterclockwise": 0x1F504,
|
|
|
|
// status
|
|
"check": 0x2705,
|
|
"heavy_check_mark": 0x2714,
|
|
"x": 0x274C,
|
|
"heavy_multiplication_x": 0x2716,
|
|
"warning": 0x26A0,
|
|
"information_source": 0x2139,
|
|
"question": 0x2753,
|
|
"exclamation": 0x2757,
|
|
"white_check_mark": 0x2705,
|
|
"heavy_plus_sign": 0x2795,
|
|
"heavy_minus_sign": 0x2796,
|
|
"heavy_division_sign": 0x2797,
|
|
|
|
// actions
|
|
"gear": 0x2699,
|
|
"hammer": 0x1F528,
|
|
"wrench": 0x1F527,
|
|
"key": 0x1F511,
|
|
"lock": 0x1F512,
|
|
"unlocked": 0x1F513,
|
|
"magnifying_glass": 0x1F50D,
|
|
"home": 0x1F3E0,
|
|
"bookmark": 0x1F516,
|
|
"bell": 0x1F514,
|
|
"clock": 0x1F550,
|
|
"alarm_clock": 0x23F0,
|
|
"hourglass": 0x231B,
|
|
"calendar": 0x1F4C5,
|
|
"envelope": 0x2709,
|
|
"camera": 0x1F4F7,
|
|
"video_camera": 0x1F4F9,
|
|
"microphone": 0x1F3A4,
|
|
"telephone": 0x260E,
|
|
"phone": 0x1F4DE,
|
|
"computer": 0x1F4BB,
|
|
"laptop": 0x1F4BB,
|
|
"folder": 0x1F4C1,
|
|
"open_file_folder": 0x1F4C2,
|
|
"clipboard": 0x1F4CB,
|
|
"memo": 0x1F4DD,
|
|
"pencil": 0x270F,
|
|
"scissors": 0x2702,
|
|
"link": 0x1F517,
|
|
"paperclip": 0x1F4CE,
|
|
"pushpin": 0x1F4CC,
|
|
"trash": 0x1F5D1,
|
|
"star": 0x2B50,
|
|
"trophy": 0x1F3C6,
|
|
"medal": 0x1F3C5,
|
|
"target": 0x1F3AF,
|
|
"dart": 0x1F3AF,
|
|
|
|
// objects
|
|
"lightbulb": 0x1F4A1,
|
|
"bulb": 0x1F4A1,
|
|
"battery": 0x1F50B,
|
|
"electric_plug": 0x1F50C,
|
|
"rocket": 0x1F680,
|
|
"airplane": 0x2708,
|
|
"car": 0x1F697,
|
|
"bicycle": 0x1F6B2,
|
|
"headphones": 0x1F3A7,
|
|
"gamepad": 0x1F3AE,
|
|
"joystick": 0x1F579,
|
|
"musical_note": 0x1F3B5,
|
|
"notes": 0x1F3B6,
|
|
"printer": 0x1F5A8,
|
|
"keyboard": 0x2328,
|
|
|
|
// weather
|
|
"sun": 0x2600,
|
|
"sunny": 0x2600,
|
|
"moon": 0x1F319,
|
|
"cloud": 0x2601,
|
|
"rainbow": 0x1F308,
|
|
"fire": 0x1F525,
|
|
"flame": 0x1F525,
|
|
"zap": 0x26A1,
|
|
"lightning": 0x26A1,
|
|
"snowflake": 0x2744,
|
|
"umbrella": 0x2602,
|
|
|
|
// hearts
|
|
"heart": 0x2764,
|
|
"yellow_heart": 0x1F49B,
|
|
"green_heart": 0x1F49A,
|
|
"blue_heart": 0x1F499,
|
|
"purple_heart": 0x1F49C,
|
|
"black_heart": 0x1F5A4,
|
|
"broken_heart": 0x1F494,
|
|
"two_hearts": 0x1F495,
|
|
"sparkling_heart": 0x1F496,
|
|
"heartpulse": 0x1F497,
|
|
"heart_beat": 0x1F493,
|
|
"revolving_hearts": 0x1F49E,
|
|
"cupid": 0x1F498,
|
|
"gift_heart": 0x1F49D,
|
|
|
|
// faces
|
|
"smile": 0x1F600,
|
|
"smiley": 0x1F603,
|
|
"grinning": 0x1F604,
|
|
"blush": 0x1F60A,
|
|
"wink": 0x1F609,
|
|
"heart_eyes": 0x1F60D,
|
|
"kissing_heart": 0x1F618,
|
|
"kissing": 0x1F617,
|
|
"smirk": 0x1F60F,
|
|
"stuck_out_tongue": 0x1F61B,
|
|
"stuck_out_tongue_winking_eye": 0x1F61C,
|
|
"sunglasses": 0x1F60E,
|
|
"innocent": 0x1F607,
|
|
"neutral_face": 0x1F610,
|
|
"expressionless": 0x1F611,
|
|
"thinking": 0x1F914,
|
|
"confused": 0x1F615,
|
|
"worried": 0x1F61F,
|
|
"frown": 0x1F641,
|
|
"persevere": 0x1F623,
|
|
"tired": 0x1F62B,
|
|
"weary": 0x1F629,
|
|
"cry": 0x1F622,
|
|
"sob": 0x1F62D,
|
|
"sweat_smile": 0x1F605,
|
|
"joy": 0x1F602,
|
|
"relaxed": 0x263A,
|
|
"angry": 0x1F620,
|
|
"rage": 0x1F621,
|
|
"skull": 0x1F480,
|
|
"ghost": 0x1F47B,
|
|
"robot": 0x1F916,
|
|
"sleeping": 0x1F634,
|
|
"sleep": 0x1F634,
|
|
"zzz": 0x1F4A4,
|
|
"dizzy": 0x1F4AB,
|
|
"boom": 0x1F4A5,
|
|
"collision": 0x1F4A5,
|
|
"sweat_drops": 0x1F4A6,
|
|
"dash": 0x1F4A8,
|
|
"alien": 0x1F47D,
|
|
"poop": 0x1F4A9,
|
|
|
|
// hands & gestures
|
|
"thumbsup": 0x1F44D,
|
|
"thumbsdown": 0x1F44E,
|
|
"ok_hand": 0x1F44C,
|
|
"wave": 0x1F44B,
|
|
"clap": 0x1F44F,
|
|
"open_hands": 0x1F450,
|
|
"raised_hands": 0x1F64C,
|
|
"pray": 0x1F64F,
|
|
"muscle": 0x1F4AA,
|
|
"point_up": 0x261D,
|
|
"point_down": 0x1F447,
|
|
"point_left": 0x1F448,
|
|
"point_right": 0x1F449,
|
|
"fist": 0x270A,
|
|
"raised_hand": 0x270B,
|
|
"v": 0x270C,
|
|
"victory": 0x270C,
|
|
"crossed_fingers": 0x1F91E,
|
|
"writing_hand": 0x270D,
|
|
"call_me": 0x1F919,
|
|
"hand": 0x270B,
|
|
}
|
|
|
|
var (
|
|
emojiColorFontOnce sync.Once
|
|
emojiColorFontData []byte
|
|
)
|
|
|
|
func loadColorEmojiFont() []byte {
|
|
emojiColorFontOnce.Do(func() {
|
|
emojiColorFontData = fcRead("emoji")
|
|
})
|
|
return emojiColorFontData
|
|
}
|