Code Monkey home page Code Monkey logo

ranger_udisk_menu's Introduction

Ranger udisk menu

This script draws menu to mount and unmount partitions using udisksctl and ncurses

Screenshot

Requirements

  • python3.8 or newer
  • udisks2 (for udisksctl)
  • lsblk 2.3 or newer

How to install

Firstly you need to clone this repo to the plugins directory of ranger

cd ~/.config/ranger/plugins
git clone https://github.com/SL-RU/ranger_udisk_menu

Then you need to add to ~/.config/ranger/commands.py line:

from plugins.ranger_udisk_menu.mounter import mount

Thats all

How to use

Enter in ranger :mount, than will be shown menu. In this menu you can press:

  • j or arrow down or Ctrl+n to move selection down
  • k or arrow up or Ctrl+p to move selection up
  • Ctrl+g or Esc or q to quit
  • g or r to refresh all partitions and drives
  • m to mount selected partition
  • u to unmount selected partition
  • e to unmount all partitions of selected partition's drive
  • p to power off selected the selected partition's drive (also called safely remove). It can be done only when all partitions of the drive are unmounted
  • ENTER to open selected mountpoint in current tab of the ranger

Troubles

If there is trouble with permissions, then you need to create group storage and add your user to it. Then you need to update your Polkit or PolicyKit permissions like it shown here: https://github.com/coldfix/udiskie/wiki/Permissions

ranger_udisk_menu's People

Contributors

sl-ru avatar aik2mlj avatar syphdias avatar vardanheroic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.