Control rhythmbox inside Emacs

Source: Internet
Author: User
Tags rhythmbox
Control rhythmbox inside Emacs Control rhythmbox inside Emacs

It is until recently that I came authentication ss a configuration option that Emacs cansend shell command to other applications such as rhythmbox, so I created asimple file to make this work inside Emacs.

The rhythmbox comes with a client tool to make it possible to control theplaying from a terminal, so that life will be a lot easier when implementingcontrolling inside Emacs, the functions involved is as follows:

(defun rhythmbox-linux-command (command-name)  "Execute command for rhythmbox inside emacs"  (interactive)  (setq command-text (format "rhythmbox-client %s" command-name))  (shell-command command-text))(defun rhythmbox-toggle ()  "Play/Pause rhythmbox"  (interactive)  (rhythmbox-linux-command "--play-pause"))(defun rhythmbox-next ()  "Next song in rhythmbox"  (interactive)  (rhythmbox-linux-command "--next"))(defun rhythmbox-previous ()  "Previous song in the rhythmbox"  (interactive)  (rhythmbox-linux-command "--previous"))(defun rhythmbox-volume-up ()  "Increase the playback valume"  (interactive)  (rhythmbox-linux-command "--volume-up"))(defun rhythmbox-volume-down ()  "Decrease the playback volume"  (interactive)  (rhythmbox-linux-command "--volume-down"))(global-set-key (kbd "<C-kp-4>") ‘rhythmbox-previous)(global-set-key (kbd "<C-kp-6>") ‘rhythmbox-next)(global-set-key (kbd "<C-kp-5>") ‘rhythmbox-toggle)(global-set-key (kbd "<C-kp-8>") ‘rhythmbox-volume-up)(global-set-key (kbd "<C-kp-2>") ‘rhythmbox-volume-down)

I only implemented some common controlling functions for the rhythmbox, more canbe added with the reference manualRhythmbox-Client.

Author: Wujing

Created:

Emacs 24.3.1 (Org mode 8.2.6)

Validate

Control rhythmbox inside Emacs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.