/dmenu-maim

dmenu wrapper for maim supporting saving to a file and copying to the system clipboard, using the entire screen, a selection, or the currently focused window

Primary LanguagePythonBSD 2-Clause "Simplified" LicenseBSD-2-Clause

dmenu-maim

dmenu wrapper for maim (X11) or grim (Wayland), supporting saving to a file and copying to the system clipboard, using the entire screen, a selection, or the currently focused window.

Dependencies (X11): dmenu, maim (and slop), xdotool, xclip

Dependencies (Wayland): dmenu, grim, slurp, wl-clipboard

On Wayland, taking a screenshot of the selected window is currently only supported on Sway, because swaymsg is used to get the current window (as in the example in the grim README).

Arch Linux package

Running makepkg --noextract should create an Arch Linux package. This works because src/dmenu-maim is a symlink to the root of the repository.

Configuration

The command lines used for dmenu and xclip / wl-copy can be configured in the file $XDG_CONFIG_HOME/dmenu-maim/config.ini (usually ~/.config/dmenu-maim/config.ini). Here is a sample config file which uses bemenu instead of dmenu on Wayland:

License

Copyright (c) 2020-21 Pratyush Venkatakrishnan

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.