项目作者: obfusk

项目描述 :
m - minimalistic media manager - GUI
高级语言: Python
项目地址: git://github.com/obfusk/m-gui.git
创建时间: 2018-09-11T04:48:28Z
项目社区:https://github.com/obfusk/m-gui

开源协议:GNU General Public License v3.0

下载


  1. File : README.md
  2. Maintainer : Felix C. Stegerman <flx@obfusk.net>
  3. Date : 2018-09-16
  4. Copyright : Copyright (C) 2018 Felix C. Stegerman
  5. Version : v0.1.1
  6. License : GPLv3+

PyPI Version
Build Status
GPLv3+

Description

m - minimalistic media manager - GUI

A minimalistic GUI for m.

Examples

  1. $ m-gui --stay-fullscreen --scale 2.0

Help

  1. $ m-gui --help # show options
  2. $ m-gui --show-config # show configuration

Requirements

Python >= 3.5, PyGObject, GTK+ 3,
VTE; and m of course.

Installing

You can just put m-gui.py somewhere on your $PATH (in e.g.
~/bin; I suggest calling it m-gui, but you’re free to choose
another name).

You may want to clone the repository instead of just downloading
m-gui.py to be able to get new versions easily.

Alternatively, you can install mmm-gui using pip (the Python package
manager) or build and install a Debian package.

NB: the pip and Debian packages are called mmm-gui instead of
m-gui.

Using git

  1. $ cd /some/convenient/dir
  2. $ git clone https://github.com/obfusk/m-gui.git obfusk-m-gui
  3. $ cd ~/bin # or some other dir on your $PATH
  4. $ ln -s /some/convenient/dir/obfusk-m-gui/m-gui.py m-gui

Updating:

  1. $ cd /some/convenient/dir/obfusk-m-gui
  2. $ git pull

Using pip

  1. $ pip3 install --user mmm-gui # for Debian; on other OS's you may need
  2. # pip instead of pip3 and/or no --user

Building a Debian package

  1. $ sudo apt install debhelper dh-python pandoc # install build dependencies
  2. $ sudo apt install python3-gi libgtk-3-0 libvte-2.91-0 # run dependencies
  3. $ cd /some/convenient/dir
  4. $ git clone https://github.com/obfusk/m-gui.git obfusk-m-gui
  5. $ cd obfusk-m-gui
  6. $ dpkg-buildpackage
  7. $ sudo dpkg -i ../mmm-gui_*_all.deb

Configuration File

You can configure some settings in ~/.obfusk-m/gui.json. To see the
current configuration, run:

  1. $ m-gui --show-config

NB: some (non-gui-specific) options — like using mpv as player —
are better configured via config.json; see the documentation of m
for more information.

Bookmarks

NB: since bookmarks are saved in gui.json, adding a bookmark from
the GUI will open and re-save this file. Formatting is thus not
preserved, data should be (unless you happen to trigger a race
condition by writing to this file in between loading and saving by the
GUI).

  1. {
  2. "bookmarks": [
  3. "/some/media/dir",
  4. "/some/other/media/dir"
  5. ]
  6. }

Defaults

  1. {
  2. "scale": 2.0,
  3. "stay_fullscreen": true
  4. }

Adding commands

  1. {
  2. "add_commands": [
  3. [
  4. "mark-and-next space _Mark Playing and Play Next"
  5. ]
  6. ],
  7. "scripts": {
  8. "mark-and-next": "#{M} mark playing && #{M} next"
  9. }
  10. }

m options

  1. {
  2. "m_options": {
  3. "colour": true,
  4. "ignorecase": true,
  5. "numeric-sort": true,
  6. "show-hidden": true
  7. }
  8. }

m command

  1. {
  2. "m_command": "mmm"
  3. }

NB: the command is passed to the shell, so you’ll need to escape/quote
special characters (including spaces) appropriately; be careful!

TODO

  • update README + version (4x + dch) + package (deb + pip)!
  • ack TODO
  • also allow setting —numeric-sort etc. on the fly
    • checkboxes in gui?
    • —options passed through to m?
  • handle exceptions better.
  • document, test!?; screenshot?
  • use shell “m …” only if no need to quote?!
  • running w/ python3 -Wd results in DeprecationWarnings
    • Vte.Terminal.spawn_async not yet available

License

GPLv3+