用 C 语言重新实现 Wayland 的 Shimeji
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.
pacman -S waylandapt-get install libwayland-dev libwayland-bindnf install libwayland-client wayland-develpacman -S wayland-protocolsdnf install wayland-protocols-develpacman -S libarchiveapt-get install libarchive-devdnf install libarchive-develpacman -S uthashapt-get install libuthash-devdnf install uthash-develYour compositor should at least support xdg-shell, wlr-layer-shell protocols, and provide wl_subcompositor interface.
pacman -S python-pillowdnf install python3-pillowBelow 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:
{
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
{
# 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
];
}git clone --recursive https://github.com/CluelessCatBurger/wl_shimeji.git
cd wl_shimeji
make -j$(nproc)
make installYou can also build plugins (everything in src/plugins subdirectories). Plugins are optional, but can provide such features as:
Currently mascots can't move windows as it is not supported by wl_shimeji.
Currently we have following plugins:
pacman -S libsystemdapt-get install libsystemd-devdnf install systemd-develpacman -S uthashapt-get install libuthash-devdnf install uthash-develmake build-plugins -j$(nproc)make install-pluginsFirst, 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.
shimejictl convert /path/to/shimeji-ee.zip -O /some/output/directoryIt will try to read the zip archive and will ask you to select which mascots you want to convert:
$ 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
After you successfully converted your mascots, you can import them to the wl_shimeji format using the following command:
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.
You can list all available mascot prototypes using the following command:
shimejictl prototypes listTo 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:
shimejictl mascot summon NeuronIf you want to summon mascot at specific location, you can use --select flag or pass your coordinates as -x -y or -position x,y
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.
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.
You can export mascot prototype by using shimejictl prototypes export command. It will produce .wlshm file that you can then share with others.
shimejictl prototypes export -i {prototype_name} -o {output_file}You can stop the application by using shimejictl stop command.
You can configure some options of overlay by using shimejictl config command.
shimejictl config set "option_name" "value"You also can get option value by using get action:
shimejictl config get "option_name"Or values of all options by using list action:
shimejictl config listConfig file is usually located at .config/wl_shimeji/shimeji-overlayd.conf
wl_shimeji supports multiple screens. However, some features may be disabled by default. Config provides following options:
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.
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.
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.
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.
wl_shimeji can be activated on-demand through systemd socket. To enable it, use 'systemctl --use enable wl_shimeji.socket'.
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 pluginsOn first start, the program will create a configuration file in the config directory. Currently config file allows to:
暂无开放 Issues,或尚未同步最近议题。