百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
W

wl_shimeji

> 编程语言
开源

用 C 语言重新实现 Wayland 的 Shimeji

189 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用 C 语言重新实现 Wayland 的 Shimeji

wl_shimeji - Shimeji reimplementation for the Wayland

This is a reimplementation of the Shimeji for Wayland in C.

Shimejis on the screenshot by paccha and Moneka

[!IMPORTANT] wl_shimeji currently does not officially support compositors that lack full support of Wayland core specification or violate it. Use at your own risk. Notable examples:

  • Gamescope (does not implement wl_subcompositor)
  • Hyprland (violates the Wayland core specification regarding wl_subsurface clipping)

Additionally, wl_shimeji will never support compositors that do not implement the wlr-layer-shell protocol, as it is a core part of wl_shimeji's implementation, so no Mutter for now.

Requirements

Build requirements

  • libwayland-client:
    • Arch: pacman -S wayland
    • Debian: apt-get install libwayland-dev libwayland-bin
    • Fedora: dnf install libwayland-client wayland-devel
  • wayland-protocols:
    • Arch: pacman -S wayland-protocols
    • Debian: ??? You can manually clone wayland-protocols and then specify it path by setting WAYLAND_PROTOCOLS_DIR to wayland-protocols' absolute path
    • Fedora: dnf install wayland-protocols-devel
  • libarchive:
    • Arch: pacman -S libarchive
    • Debian: apt-get install libarchive-dev
    • Fedora: dnf install libarchive-devel
  • uthash:
    • Arch: pacman -S uthash
    • Debian: apt-get install libuthash-dev
    • Fedora: dnf install uthash-devel

Runtime requirements

Your compositor should at least support xdg-shell, wlr-layer-shell protocols, and provide wl_subcompositor interface.

Shimejictl requirements

  • python-pillow
    • Arch: pacman -S python-pillow
    • Fedora: dnf install python3-pillow
  • python >= 3.10

Installing

Community packages

Below are the community packages for wl_shimeji. They are not maintained by me, so if you have any issues with them, please contact the package maintainer.

  • Arch Linux (AUR): wl_shimeji-git

  • Nix / NixOS:

Add it to your flake inputs like so:

nix
{
  inputs = {
    nixpkgs.url = "nixpkgs/nixos-unstable";

    wl_shimeji = {
      url = "git+https://github.com/CluelessCatBurger/wl_shimeji?submodules=1"; # We have to use git to pull the submodules
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
}

Then add it to your package list

nix
{
  # System-wide install
  environment.systemPackages = with pkgs; [
    inputs.wl_shimeji.packages.${stdenv.hostPlatform.system}.default
  ];

  # User side / Home Manager install
  home.packages = with pkgs; [
    inputs.wl_shimeji.packages.${stdenv.hostPlatform.system}.default
  ];
}

Official packages

Plugins

  • kwinsupport: wl_shimeji-kwinsupport (AUR)

Building

bash
git clone --recursive https://github.com/CluelessCatBurger/wl_shimeji.git
cd wl_shimeji
make -j$(nproc)
make install

Plugins

You can also build plugins (everything in src/plugins subdirectories). Plugins are optional, but can provide such features as:

  • Interactions with other applications' windows
  • Get global mouse position

Currently mascots can't move windows as it is not supported by wl_shimeji.

Currently we have following plugins:

  • src/plugins/kwinsupport - KDE integration using it's scripting API

Dependencies for plugins

  • KwinSupport:
    • libsystemd (for dbus):
      • Arch: pacman -S libsystemd
      • Debian: apt-get install libsystemd-dev
      • Fedora: dnf install systemd-devel
    • uthash:
      • Arch: pacman -S uthash
      • Debian: apt-get install libuthash-dev
      • Fedora: dnf install uthash-devel
    • libwayland-shimeji-plugins (supplied by wl_shimeji)
    • wl_shimeji should run with XDG_CURRENT_DESKTOP set to "KDE" and org.kde.KWin must be present on session bus

Building plugins

bash
make build-plugins -j$(nproc)

Installing plugins

bash
make install-plugins

How to use

Converting to wl_shimeji format

First, you need to find some Shimeji-ee mascots. They are usually distributed as zip archives. You can find them on the internet. When you got shimejis of your choice, you need to convert them to the wl_shimeji format.

bash
shimejictl convert /path/to/shimeji-ee.zip -O /some/output/directory

It will try to read the zip archive and will ask you to select which mascots you want to convert:

bash
$ shimejictl convert "The Neuroling Collection v0.7.zip" -O output/
Prototypes available for conversion:
1. Weuron
2. Vedaling
3. Tuteling Cursor
4. Tuteling
5. Neuron
6. Neuroling
7. Eviling
8. Evil Neuroling
9. Broken Neuron

Enter prototypes index or name to convert (can be comma-separated or A to convert all)
>

When you selected mascot types that you need, shimejictl will convert them to the wl_shimeji format and will save them to the output directory with names like Shimeji.{mascot_name}.wlshm

Importing .wlshm prototypes

After you successfully converted your mascots, you can import them to the wl_shimeji format using the following command:

bash
shimejictl prototypes import /path/to/Shimeji.{first_name}.wlshm /path/to/Shimeji.{second_name}.wlshm ...

If prototype already exists, shimejictl will skip it unless -f is used.

Listing available prototypes

You can list all available mascot prototypes using the following command:

bash
shimejictl prototypes list

Summoning mascots

To summon mascot, you need to know mascot's name, which you can get by using shimejictl prototypes list command. When you found mascot of your choice, you can summon using shimejictl mascot summon {name} command, where {name} is the name of the mascot you want to summon.

For example, if you want to summon a mascot named Neuron, you can use the following command:

bash
shimejictl mascot summon Neuron

If you want to summon mascot at specific location, you can use --select flag or pass your coordinates as -x -y or -position x,y

Dismissing mascots

To dismiss mascot, you can use shimejictl mascot dismiss command. shimejictl will ask you to click on target mascot. Also we have flags that can be used to dismiss multiple mascots at once. Use shimejictl mascot dismiss --help to see all available flags.

Setting mascots behaviors

You can replace mascot's behavior by using shimejictl mascot set-behavior {behavior} command, where {behavior} is the name of the behavior you want to set. shimejictl will ask you to click on target mascot.

You can get all available behaviors by using shimejictl prototypes info {prototype_name} command, where {prototype_name} is the name of the mascot prototype you want to get information about.

Exporting prototypes

You can export mascot prototype by using shimejictl prototypes export command. It will produce .wlshm file that you can then share with others.

bash
shimejictl prototypes export -i {prototype_name} -o {output_file}

Stopping application

You can stop the application by using shimejictl stop command.

Configuration

You can configure some options of overlay by using shimejictl config command.

bash
shimejictl config set "option_name" "value"

You also can get option value by using get action:

bash
shimejictl config get "option_name"

Or values of all options by using list action:

bash
shimejictl config list

Config file is usually located at .config/wl_shimeji/shimeji-overlayd.conf

Advanced usage

Multihead usage

wl_shimeji supports multiple screens. However, some features may be disabled by default. Config provides following options:

  • ALLOW_THROWING_MULTIHEAD: Allows throwing mascot between screens
  • ALLOW_DRAGGING_MULTIHEAD: Allows dragging mascot between screens
  • UNIFIED_OUTPUTS: Treats all outputs as one entity

You may want block one of displays from being used by wl_shimeji in runtime, so we have shimejictl environment close to disable one of outputs. shimejictl will ask you to select one of outputs by clicking on it. After this operation, you can't restore display unless you restart wl_shimeji or reconnect display to the system.

Interpolation

wl_shimeji supports movement interpolation of mascots. You can enable it by setting INTERPOLATION_FRAMERATE to value that is not equal to 0. Values > 0 used as interpolation frame rate. -1 Picks output's refresh rate as interpolation frame rate. Values under -1 are not allowed.

Tablets

wl_shimeji recognized pentablets as input method, so you can use it as input device. However, currently subsurfaces bugged under KDE when using them with wp-tablet-v2, so you may want to disable that feature by setting TABLETS_ENABLED to false.

Mapping mouse buttons

You can map mouse button and tablet events (stylus down, stylus up) to different actions. For example you can remap right button to 0x01, so it will act as left button and etc.

Using systemd socket

wl_shimeji can be activated on-demand through systemd socket. To enable it, use 'systemctl --use enable wl_shimeji.socket'.

Running overlay manually

You can start overlay manually by running shimeji-overlayd. It's not recommended and useless in case you don't pass -se flag to it or if you don't pass unix fd using -cfd flag, unless you implementing another frontend for the overlay. If -se or -cfd not specified overlay will close immediately after start.

Arguments:

  • -s, --socket-path - path to the overlay socket file.
  • -cd, --configuration-root - path to the configuration root of the wl_shimeji (/home/kotb/.local/share/wl_shimeji by default)
  • -cfd, --caller-fd - paired unix socket fd used for communication. If closed and no other clients connected nor no mascots exists, overlay will close.
  • -c - config file path.
  • -pl - path to the plugins directory.
  • -pr - path to the prototypes directory.
  • -se - summon everyone. If specified, overlay will summon all known mascots upon start.
  • -v, --version - version of the overlay.
  • --no-tablets - disable wp_tablet_v2 wayland protocol support. (broken on kwin right now anyway)
  • --no-viewporter - disable wp_viewporter wayland protocol support. wl_shimeji will use wl_surface.set_buffer_scale() instead.
  • --no-fractional-scale - disable wp_fractional_scale wayland protocol support. Will use wl_output's scale info instead
  • --no-cursor-shape - disable wp_cursor_shape wayland protocol support. Will disable cursor shapes for different actions.
  • --no-plugins - disable plugins

Features

  1. Less CPU
    • Because of C and Wayland, I was able to make this program as lightweight as possible.
    • When compared to the original Shimeji, my implementation for same configuration uses in ~20 times less CPU. (Tested on AMD Ryzen 9 5900HX, 7 mascots. Original Shimeji used ~19% of one CPU core. My implementation used ~0.9% of one CPU core) (Do not trust these numbers, they can be different for your configuration)
  2. Less RAM
    • Because of prototypes-based method, mascots use as less memory as possible. (Tested on AMD Ryzen 9 5900HX, 7 mascots. Original Shimeji ~880MiB. My implementation used ~56MiB) (Do not trust these numbers, they can be different for your configuration)
  3. Fast VM-based condition evaluation:
    • I implemented simple virtual machine and bytecode compiler for javascript-like conditions used in the original Shimeji.
    • It's not as fast as native code, but it's faster than the original Shimeji.

Configuration

On first start, the program will create a configuration file in the config directory. Currently config file allows to:

  • Enable/Disable mascot breeding
  • Enable/Disable mascot dragging
  • Enable/Disable IE interactions (doesn't make sense without plugins)
  • Enable/Disable IE throwing (doesn't make sense without plugins)
  • Enable/Disable cursor position tracking (doesn't make sense without plugins)
  • Set max

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Cdesktop-petshimejiwaylandwlr-layer-shell

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言