LinuxCommandLibrary

udiskie-dmenu

Interactively mount and unmount removable devices

TLDR

Launch the menu to mount or unmount devices

$ udiskie-dmenu
copy

Use rofi instead of dmenu
$ udiskie-dmenu --rofi
copy

Display help
$ udiskie-dmenu --help
copy

SYNOPSIS

udiskie-dmenu [DMENU_OPTIONS]

PARAMETERS

-l <lines>
    Specify the number of lines to display in the dmenu menu. This is a dmenu option passed by udiskie-dmenu.

-p <prompt>
    Set the prompt text displayed by dmenu (e.g., 'Disk Action:'). This is a dmenu option.

-fn <font>
    Define the font to be used by dmenu. This is a dmenu option.

-nb <color>
    Set the normal background color for dmenu. This is a dmenu option.

-nf <color>
    Set the normal foreground color for dmenu. This is a dmenu option.

-sb <color>
    Set the selected background color for dmenu. This is a dmenu option.

-sf <color>
    Set the selected foreground color for dmenu. This is a dmenu option.

-m <monitor>
    Specify the monitor to display dmenu on. This is a dmenu option.

-i
    Enable case-insensitive matching for menu entries in dmenu. This is a dmenu option.

-v
    Display the version information for dmenu. This is a dmenu option.

-h
    Show the help message for dmenu. This is a dmenu option.

DESCRIPTION

udiskie-dmenu is a convenience script provided by the udiskie package, designed to offer an interactive menu for managing removable media. It integrates the automated disk management capabilities of udiskie with the lightweight, dynamic menu system of dmenu.

When executed, udiskie-dmenu presents a dmenu prompt listing available actions (such as mount, unmount, eject, lock, unlock, format, loop-setup, crypt-setup, smart-info) applicable to various removable devices (e.g., USB drives, external hard drives, optical media, encrypted volumes). Users can then select an action and, subsequently, a specific device to perform the desired operation.

This script acts as a user-friendly graphical front-end for udiskie's command-line operations, making it particularly useful in minimalist window manager environments that leverage dmenu for system interaction. Its behavior respects the global udiskie configuration for mounting points, notification settings, and device filtering rules.

CAVEATS

Requires dmenu: udiskie-dmenu needs the dmenu utility to be installed and accessible in the system's PATH for its interactive menu functionality.
Dependency on udiskie: Its functionality is entirely dependent on the underlying udiskie background service and its configuration. Without a running udiskie instance, udiskie-dmenu will not be able to perform disk actions.
X11 environment: Primarily designed for X11 display server environments; it may require XWayland for compatibility when used in a Wayland session.
Action limitations: The specific disk management actions presented and available through udiskie-dmenu depend on the detected devices, their current state, and the capabilities exposed by the udiskie and udisks services.

CONFIGURATION

The behavior of udiskie-dmenu is heavily influenced by the main udiskie configuration file, typically located at ~/.config/udiskie/config.yml. This YAML-formatted file allows users to define comprehensive rules for auto-mounting, specify preferred mount points, configure notification settings, and set device white/blacklists. udiskie-dmenu respects these global udiskie configurations when presenting options and performing disk management actions.

INTEGRATION WITH WINDOW MANAGERS

Due to its interactive nature and reliance on dmenu, udiskie-dmenu is frequently bound to a specific keyboard shortcut (hotkey) within the configuration of various window managers (e.g., using sxhkd or directly in i3wm's config file). This setup allows users to quickly invoke the disk management menu with a simple key combination, significantly enhancing workflow efficiency by providing immediate access to device handling operations.

HISTORY

The udiskie project was developed to offer a streamlined and automated client for the udisks D-Bus service, providing functionalities like automatic mounting of removable media similar to those found in full-featured desktop environments. The udiskie-dmenu script emerged as a natural extension, catering specifically to users of minimalist window managers (such as i3, dwm, Openbox, or AwesomeWM) who often prefer using dmenu for launching applications and interacting with system utilities.

It provides a simple, interactive way to access udiskie's powerful features without needing to type commands directly, becoming a core component for many who seek a balance between automation and user control in their customized desktop environments. It has been an integral part of the udiskie distribution, evolving alongside the main client to provide a consistent and user-friendly interface.

SEE ALSO

udiskie(1), dmenu(1), udisks(8), mount(8), umount(8)

Copied to clipboard