SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2010-05-01 19:53:28

safetycopy
urban legend
From: The Chatsubo
Registered: 2010-04-03
Posts: 1,311

MOC Configs & Themes

I thought it might be cool to have a place to keep our custom MOC configs and themes.

Config goes in ~/.moc
Themes go in either ~/.moc/themes or /usr/local/share/moc/themes

Some documentation is included in the MOC readme, but the default theme and config files provided with MOC are very well documented and probably your best source of info.

I've been playing around with things for a little while today, and came up with a custom layout and a monochrome theme that matches my Conky and Tint2 configurations (I tried defining custom colours, but either this is bugged in my build or Terminator doesn't support it).

Config:

ReadTags        = yes
MusicDir        = "~/music"
Sort            = FileName
ShowStreamErrors    = no
Mp3IgnoreCRCErrors    = yes
Repeat            = no
Shuffle            = no
AutoNext        = yes
FormatString        = "%(n:%n :)%(t:%t:)"
OutputBuffer        = 2048
InputBuffer        = 512
Prebuffering        = 64
SoundDriver        = JACK, ALSA, OSS
JackOutLeft        = "alsa_pcm:playback_1"
JackOutRight        = "alsa_pcm:playback_2"
OSSDevice        = /dev/dsp
OSSMixerDevice        = /dev/mixer
OSSMixerChannel        = pcm
OSSMixerChannel2    = master
AlsaMixer         = PCM
AlsaMixer2        = Master
AlsaDevice        = default
ShowHiddenFiles        = no
StartInMusicDir        = yes
HideFileExtension    = no
ShowFormat        = yes
ShowTime        = yes
Theme            = monochrome_theme
MOCDir        = ~/.moc
UseMmap            = no
SyncPlaylist        = yes
ASCIILines        = no
Fastdir1 = ~/music
Fastdir2 = ~/gpodder-downloads
Fastdir3 = "/media/Windows/Documents and Settings/safetycopy/My Documents/My Music"
TagsCacheSize        = 256
PlaylistNumbering    = yes
Layout1 = "directory:0,0,50%,100% playlist:50%,0,50%,100% "
FollowPlayedFile    = yes
CanStartInPlaylist    = no
OnSongChange = "/usr/lib/lastfmsubmitd/lastfmsubmit --artist %a --title %t --length %d --album %r"

Theme:

background                = default   default
frame                    = white     default
window_title            = white     default
directory                = white     default
selected_directory        = black     white
playlist                = white     default
selected_playlist        = black     white
file                    = white     default
selected_file            = black     white
marked_file                = white     default
marked_selected_file    = black     white
info                    = white     default
selected_info            = black     white
marked_info                = white     default
marked_selected_info    = black     white
status                    = white     default
title                    = white     default
state                    = white     default
current_time            = black     white
time_left                = white     default
total_time                = white     default
time_total_frames        = white     default
sound_parameters        = white     default
legend                    = white     default
disabled                = white     default
enabled                    = black     white
empty_mixer_bar            = white     default
filled_mixer_bar        = black     white
empty_time_bar            = white     default
filled_time_bar            = black     white
entry                    = white     default
entry_title                = white     default
error                    = white     default
message                    = white     default
plist_time                = white     default

Screenshot:
4568395399_2edd01c625.jpg


i wonder if i missed the warning
Skinny Puppy, Love in Vein

Offline

Be excellent to each other!

#2 2010-05-01 22:25:57

FonzCam
Member
Registered: 2010-04-19
Posts: 16

Re: MOC Configs & Themes

Great work.  The biggest issue I found is with using colours you seem to have to change the Terminator colours if you want your colours to be anything other then the defaults.  I'm still trying to find the best colours to change to get a good look in MOC and not screw up any other terminal based apps using the same colours.

Offline

#3 2010-05-01 22:54:07

safetycopy
urban legend
From: The Chatsubo
Registered: 2010-04-03
Posts: 1,311

Re: MOC Configs & Themes

Yeah, the theme features in MOC sort of feel like they were thrown in as an afterthought. Specifying RGB colours as numbers between 0 and 1000 seems a little, erm... non-standard, and, as you mentioned, a lot of what you can achieve depends on the terminal you use. I'm not too familiar with ncurses yet, but will be looking into things and will be sure to post any discoveries here :-)

Edit: Apparently, the 0-1000 value for colours comes from ncurses. I haven't found a terminal emulator yet that can deal with MOC's colordef options, so let us know if you know of one!

Last edited by safetycopy (2010-05-02 06:46:11)


i wonder if i missed the warning
Skinny Puppy, Love in Vein

Offline

#4 2010-05-04 19:07:03

gutterslob
#! Resident Bum
Registered: 2009-11-03
Posts: 2,924

Re: MOC Configs & Themes

My config was carried over from my previous #! install (I'm on Sidux now), with only minimal changes.

MOC Theme was made by the wise pvsage (thanks again, mate)
It basically just uses whatever foreground colour your terminal uses.

I did tweak it a little, so you'll have to wait for pvsage to post the "original"

# Replaces the default configuration:
background        = default    default
frame            = default    default
window_title        = default    default
directory        = default    default    
selected_directory    = default    default    reverse
playlist        = default    default
selected_playlist    = default    default    reverse
file            = default    default
selected_file        = default    default    reverse
marked_file        = default    default   bold
marked_selected_file    = default    default    bold
info            = default    default
selected_info        = default    default
marked_info        = default    default    
marked_selected_info    = default    default    
status            = default    default
title            = default    default    
state            = default    default   
current_time        = default    default
time_left        = default    default    
total_time        = default    default   
time_total_frames    = default    default
sound_parameters    = default    default
legend            = default    default
disabled        = default    default
enabled            = default    default  bold
empty_mixer_bar        = default    default
filled_mixer_bar    = default    default    reverse
empty_time_bar        = default    default
filled_time_bar        = default    default    reverse
entry            = default    default
entry_title        = default    default
error            = default    default    bold
message            = default    default    bold
plist_time        = default    default

Screenshot: MOC running in Tilda
201005050225371024x600s.png

I'm sure there's a way to get MOC to use my .Xdefaults, but haven't looked into it yet, since I'm pretty happy with this one. (most of my desktops tend to rely on analogous or monochromatic colour schemes, anyways)

Cheers.

Last edited by gutterslob (2010-05-04 22:28:48)


Point & Squirt

Offline

#5 2010-05-04 22:11:05

safetycopy
urban legend
From: The Chatsubo
Registered: 2010-04-03
Posts: 1,311

Re: MOC Configs & Themes

gutterslob wrote:

It basically just uses whatever foreground colour your terminal uses.

I must admit, it never occurred to me to try the default/reversed combination you have going here. I might have a play around with that idea later :-) Thanks!


i wonder if i missed the warning
Skinny Puppy, Love in Vein

Offline

#6 2010-05-05 02:17:28

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 11,446

Re: MOC Configs & Themes

@gutterslob:  Thanks for the kind words.

I think the only real difference I see between your theme and mine is you've removed the bold from the state and time bits.  I'd encourage people eager to tweak MOC themes to start with yours, but for what it's worth, here's what I've been using:

# Example color theme for MOC.
# You can use a theme by copying it to ~/.moc/themes directory and using
# Theme config option or -T command line option.
#
# Fill free to make your own themes and send me them. It will be included in
# official MOC releases or on the MOC web site.
#
# The format of this file is:
# Lines beginning with # are comments.
# Blank lines are ignored.
# Every other line is expected to be in format:
#
# ELEMENT = FOREGROUND_COLOR BACKGROUND_COLOR [ATTRIBUTE[,ATTRIBUTE,..]]
#
# or
#
# colordef COLOR = RED GREEN BLUE
#
# Where names are case insensitive.
#
# ELEMENT is an element of MOC interface. This can be:
# background         - default background for regions when nothing is displayed
# frame              - frames for windows
# window_title       - the title of the window (eg name of the current
#                      directory)
# directory          - a directory in the menu
# selected_directory - a directory that is selected using arrows
# playlist           - playlist file
# selected_playlist  - see selected directory
# file               - an ordinary file in the menu (mp3, ogg, ...)
# selected_file      - see selected directory
# marked_file        - a file that is currently being played
# marked_selected_file - a file that is currently being played and is also
#                      selected using arrows
# info               - information shown at the right side of files
# selected_info      - see selected directory
# marked_info        - a file (its time) that is currently being played
# marked_selected_info - a file (its time) that is currently being played
#                      and is also selected using arrows
# status             - the status line with a message
# title              - the title of the file that is currently being played
# state              - the state: play, stop, or paused (>, [], ||)
# current_time       - current time of playing
# time_left          - the time left to the end of playing the current file
# total_time         - the length of the currently played file
# time_total_frames  - the brackets outside the total time of a file ([10:13])
# sound_parameters   - the frequency and bitrate numbers
# legend             - "KHz" and "Kbps"
# disabled           - disabled element ([STEREO])
# enabled            - enabled element
# empty_mixer_bar    - "empty" part of the volume bar
# filled_mixer_bar   - "filled" part of the volume bar
# empty_time_bar     - "empty" part of the time bar
# filled_time_bar    - "filled" part of the time bar
# entry              - place wher user can type a search query or a file name
# entry_title        - the title of an entry
# error              - error message
# message            - information message
# plist_time         - total time of displayed items
#
# FOREGOUND_COLOR and BACKGROUND_COLOR can have one of the following values:
# black, red, green, yellow, blue, magenta, cyan, white, default (can be
# transparent), grey (not standard, but works)
#
# Optional ATTRIBUTE parameters can be (from ncurses manual):
# normal      - default (no highlight)
# standout    - best highlighting mode of the terminal
# underline   - underlining
# reverse     - reverse video
# blink       - blinking
# dim         - half bright
# bold        - extra bright or bold
# protect     - protected mode
#
# You can specify a list of attributes separated by commas: attr1,attr2,attr3.
# Don't use spaces anywhere in such a list.
#
# With colordef you can change the definition of a color. It works only if
# your terminal supports it, if not those lines will be silently ignored.
# COLOR must be a valid color name and the RED GREEN and BLUE are numbers
# from 0 to 1000. Example:
#
# colordef red = 1000 0 0
#
# HINT: you have only 8 colors, but combined with attributes bold and/or
# reversed you actually get more colors.
#
# If you don't specify some elements, the default values will be used.
#
# Replaces the default configuration:
background        = default    default
frame            = default    default
window_title        = default    default
directory        = default    default    bold
selected_directory    = default    default    reverse
playlist        = default    default
selected_playlist    = default    default    reverse
file            = default    default
selected_file        = default    default    reverse
marked_file        = default    default    bold
marked_selected_file    = default    default    reverse
info            = default    default
selected_info        = default    default
marked_info        = default    default    bold
marked_selected_info    = default    default    bold
status            = default    default
title            = default    default    bold
state            = default    default    bold
current_time        = default    default    bold
time_left        = default    default    bold
total_time        = default    default    bold
time_total_frames    = default    default
sound_parameters    = default    default    bold
legend            = default    default
disabled        = default    default
enabled            = default    default    bold
empty_mixer_bar        = default    default
filled_mixer_bar    = default    default    reverse
empty_time_bar        = default    default
filled_time_bar        = default    default    reverse
entry            = default    default
entry_title        = default    default
error            = default    default    reverse
message            = default    default    bold
plist_time        = default    default

Yes; as a matter of fact, I am a cop.  Why do you ask? cool
I'm a moderator here.  How are we doing?  Feedback is encouraged.

Offline

#7 2010-09-01 10:54:30

teegoat
Member
From: Paris
Registered: 2010-08-07
Posts: 28

Re: MOC Configs & Themes

Guys, I'm trying to personalise my Moc and since I'm new to it I have a few questions:
is there a certain filename.ext for config files/theme files you should use with Moc?
how do you program Moc to use config/theme?
what command do you use in Openbox menu to start Moc in terminal?
Cheers


The Fool

Offline

#8 2010-09-01 11:45:44

safetycopy
urban legend
From: The Chatsubo
Registered: 2010-04-03
Posts: 1,311

Re: MOC Configs & Themes

Have at look at the official readme - that should answer your questions :-)


i wonder if i missed the warning
Skinny Puppy, Love in Vein

Offline

#9 2010-09-01 19:53:06

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 11,446

Re: MOC Configs & Themes

@teegoat:
1.  ~/.moc/config
2.  In the file above, you should find the following two lines:

Theme            = [/path/to/configfile]

XTermTheme        =[ /path/to/configfile]

3.  `mocp`, because there was already an unrelated program called moc.

EDIT:  I just realized teegoat was looking for that one would bind to a keyboard shortcut and put in rc.xml to open MoC in a terninal.  That would be `terminator --command="mocp"`.


Yes; as a matter of fact, I am a cop.  Why do you ask? cool
I'm a moderator here.  How are we doing?  Feedback is encouraged.

Offline

#10 2010-11-26 15:33:13

gutterslob
#! Resident Bum
Registered: 2009-11-03
Posts: 2,924

Re: MOC Configs & Themes

Thought I'd necrobump this old thread. Hoping more will post their setups in future.

This one's from the little netbook. Config is pretty much stock, with just small changes to allow 24bit output and to make it read my preferred theme upon start, so I won't bother posting that. Theme file is attached below.

       201011262239291024x600s.png

# MoC Custom Theme No.6
background                = default         default
frame                     = black           default         bold
window_title              = cyan            default    
directory                 = yellow          default    
selected_directory        = white           default 
playlist                  = default         default         bold
selected_playlist         = red             default         bold
file                      = green           default       
selected_file             = red             default         bold
marked_file               = white           default      
marked_selected_file      = yellow          default         bold
info                      = default         default         bold
selected_info             = red             default         bold
marked_info               = white           default    
marked_selected_info      = yellow          default         bold
status                    = blue            default       
title                     = red             default         bold   
state                     = red             default   
current_time              = cyan            default
time_left                 = magenta         default    
total_time                = yellow          default       
time_total_frames         = black           default         bold
sound_parameters          = magenta         default         bold
legend                    = default         default
disabled                  = black           default         bold
enabled                   = blue            default         bold
empty_mixer_bar           = default         default
filled_mixer_bar          = default         default         reverse
empty_time_bar            = default         default
filled_time_bar           = default         default         reverse
entry                     = red             default
entry_title               = green           default
error                     = red             default         bold
message                   = yellow          default         bold
plist_time                = yellow          default         bold

Last edited by gutterslob (2010-11-26 15:34:31)


Point & Squirt

Offline

#11 2011-06-10 03:44:53

dmhdlr
#! Junkie
From: Philadelphia
Registered: 2011-05-09
Posts: 312

Re: MOC Configs & Themes

Just installed MOC today on Squeeze/Openbox to keep my netbook at full speed. Looking for some Clearlooksy themes; anyone seen any? big_smile


"Emacs: making you posthuman since 1976"
Axiom #1: Emacs is a text interface prosthesis
Axiom #2: Org-mode gives you super cyborg organizational powers
cf. Why Emacs | Emacs-fu | EmacsWiki | Worg

Offline

#12 2011-06-20 21:44:20

the real dave
#! CrunchBanger
From: Cork, Ireland
Registered: 2010-03-15
Posts: 146
Website

Re: MOC Configs & Themes

gutterslob wrote:

Thought I'd necrobump this old thread. Hoping more will post their setups in future.

This one's from the little netbook. Config is pretty much stock, with just small changes to allow 24bit output and to make it read my preferred theme upon start, so I won't bother posting that. Theme file is attached below.

       201011262239291024x600s.png

</snip>

*cough* Necro-stealing code *cough*

Thanks Slob smile This is exactly what I was looking for smile


Linux Expresso -My collection of Computer madness
HTML5 Responsive Webpage

Offline

#13 2011-09-03 12:34:47

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: MOC Configs & Themes

just installed MOC and it is looking and working awesome. i used xmms2 before but i like to have a terminal app for this that is visual so i can view the playlist etc. used the 1st theme Gutterslob posted (the one modified from pvsage), and it is really nice. config/theme either posted already or not that interesting/different.

thanks!

Offline

#14 2011-10-31 20:46:52

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: MOC Configs & Themes

so i thought i'd revive this thread for a bit. moc is wonderful and i absolutely love it. i started out with gutterslob's theme as posted here (credits apparently go to pvsage in the end): http://crunchbanglinux.org/forums/post/66965/#p66965

i adapted this theme to make it black+white+blue (my default theme being black+white, so mind that!)
directories are blue, files are white, now-playing is light-blue (bold blue), and the selected options (stereo, next) are light-blue as well.

# Thank you Gutterslob & pvsage from #! forums!
# Example color theme for MOC.
# You can use a theme by copying it to ~/.moc/themes directory and using
# Theme config option or -T command line option.
#
# Fill free to make your own themes and send me them. It will be included in
# official MOC releases or on the MOC web site.
#
# The format of this file is:
# Lines beginning with # are comments.
# Blank lines are ignored.
# Every other line is expected to be in format:
#
# ELEMENT = FOREGROUND_COLOR BACKGROUND_COLOR [ATTRIBUTE[,ATTRIBUTE,..]]
#
# or
#
# colordef COLOR = RED GREEN BLUE
#
# Where names are case insensitive.
#
# ELEMENT is an element of MOC interface. This can be:
# background         - default background for regions when nothing is displayed
# frame              - frames for windows
# window_title       - the title of the window (eg name of the current
#                      directory)
# directory          - a directory in the menu
# selected_directory - a directory that is selected using arrows
# playlist           - playlist file
# selected_playlist  - see selected directory
# file               - an ordinary file in the menu (mp3, ogg, ...)
# selected_file      - see selected directory
# marked_file        - a file that is currently being played
# marked_selected_file - a file that is currently being played and is also
#                      selected using arrows
# info               - information shown at the right side of files
# selected_info      - see selected directory
# marked_info        - a file (its time) that is currently being played
# marked_selected_info - a file (its time) that is currently being played
#                      and is also selected using arrows
# status             - the status line with a message
# title              - the title of the file that is currently being played
# state              - the state: play, stop, or paused (>, [], ||)
# current_time       - current time of playing
# time_left          - the time left to the end of playing the current file
# total_time         - the length of the currently played file
# time_total_frames  - the brackets outside the total time of a file ([10:13])
# sound_parameters   - the frequency and bitrate numbers
# legend             - "KHz" and "Kbps"
# disabled           - disabled element ([STEREO])
# enabled            - enabled element
# empty_mixer_bar    - "empty" part of the volume bar
# filled_mixer_bar   - "filled" part of the volume bar
# empty_time_bar     - "empty" part of the time bar
# filled_time_bar    - "filled" part of the time bar
# entry              - place wher user can type a search query or a file name
# entry_title        - the title of an entry
# error              - error message
# message            - information message
# plist_time         - total time of displayed items
#
# FOREGOUND_COLOR and BACKGROUND_COLOR can have one of the following values:
# black, red, green, yellow, blue, magenta, cyan, white, default (can be
# transparent), grey (not standard, but works)
#
# Optional ATTRIBUTE parameters can be (from ncurses manual):
# normal      - default (no highlight)
# standout    - best highlighting mode of the terminal
# underline   - underlining
# reverse     - reverse video
# blink       - blinking
# dim         - half bright
# bold        - extra bright or bold
# protect     - protected mode
#
# You can specify a list of attributes separated by commas: attr1,attr2,attr3.
# Don't use spaces anywhere in such a list.
#
# With colordef you can change the definition of a color. It works only if
# your terminal supports it, if not those lines will be silently ignored.
# COLOR must be a valid color name and the RED GREEN and BLUE are numbers
# from 0 to 1000. Example:
#
# colordef red = 1000 0 0
#
# HINT: you have only 8 colors, but combined with attributes bold and/or
# reversed you actually get more colors.
#
# If you don't specify some elements, the default values will be used.
#
# Replaces the default configuration:

background        = default    default
frame            = default    default
window_title        = default    default
directory        = blue    default    
selected_directory    = blue    default    reverse
playlist        = default    default
selected_playlist    = default    default    reverse
file            = default    default
selected_file        = default    default    reverse
marked_file        = blue    default   bold
marked_selected_file    = blue    default    reverse
info            = default    default
selected_info        = default    default
marked_info        = blue    default    bold
marked_selected_info    = blue    default   bold 
status            = default    default
title            = blue    default     bold    
state            = default    default   
current_time        = default    default
time_left        = default    default    
total_time        = default    default   
time_total_frames    = default    default
sound_parameters    = default    default
legend            = default    default
disabled        = default    default
enabled            = blue  default  bold
empty_mixer_bar        = default    default
filled_mixer_bar    = default    default    reverse
empty_time_bar        = default    default
filled_time_bar        = default    default    reverse
entry            = default    default
entry_title        = default    default
error            = default    default    bold
message            = default    default    bold
plist_time        = default    default

and a screenshot:

2011-10-31--1320093794_1280x800_scrot.png

Offline

#15 2011-11-04 10:39:08

kowloonboy
#! Junkie
Registered: 2011-10-13
Posts: 443

Re: MOC Configs & Themes

Wow, thanks all #! bro and sis. MoC is awesome, I was never aware about this awesome player until, you guys and gals start showing me. Cheers smile


"To me, the extraordinary aspect of martial arts lies in its simplicity. The easy way is also the right way, and martial arts is nothing at all special; the closer to the true way of martial arts, the less wastage of expression there is." - Bruce Lee

Offline

#16 2011-11-04 14:33:22

h8uthemost
#! Junkie
Registered: 2011-08-09
Posts: 291

Re: MOC Configs & Themes

I like that theme, rhowaldt. big_smile Thanks for posting.


We are a nice, friendly community here and I hope we stay that way.

Offline

#17 2011-11-04 14:41:12

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: MOC Configs & Themes

^ thanks man, always ready to share. remember, it is just the theme by gutterslob, who got it from pvsage. i adapted that. so you could do the exact same. the point here is that the original theme used is so basic and simple (pure black&white on a virgin #! install) that it is a great (if not the best) starting point.

Offline

#18 2011-11-04 15:39:21

kowloonboy
#! Junkie
Registered: 2011-10-13
Posts: 443

Re: MOC Configs & Themes

rhowaldt wrote:

^ thanks man, always ready to share. remember, it is just the theme by gutterslob, who got it from pvsage. i adapted that. so you could do the exact same. the point here is that the original theme used is so basic and simple (pure black&white on a virgin #! install) that it is a great (if not the best) starting point.

Sorry mate. I forgot to thank you for this theme. It is cool. cool


"To me, the extraordinary aspect of martial arts lies in its simplicity. The easy way is also the right way, and martial arts is nothing at all special; the closer to the true way of martial arts, the less wastage of expression there is." - Bruce Lee

Offline

#19 2011-11-07 21:20:24

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: MOC Configs & Themes

a little addition to my blue-theme. this makes the volume-bar and playing-time-bar light-blue just like the rest of the 'active' parts of the UI.

find these lines in your theme-file and change them to this:

empty_mixer_bar        = default    default
filled_mixer_bar    = default    blue    bold
empty_time_bar        = default    default
filled_time_bar        = default    blue    bold

Last edited by rhowaldt (2011-11-07 21:21:28)

Offline

#20 2011-12-13 00:59:40

damaru
Member
From: canada
Registered: 2011-12-13
Posts: 47
Website

Re: MOC Configs & Themes

wow - that is gold ! I love moc and had the hardest time to find nice theme for it !!


ponnuki studio
ponnuki.net

Offline

#21 2011-12-13 15:34:50

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: MOC Configs & Themes

check here to see how to copy any selected or playing file to an external usb drive (when you use rockbox on your ipod, you can copy it there as well as it will function just like an external usb drive): http://crunchbanglinux.org/forums/post/171017/#p171017

Offline

#22 2012-01-14 21:25:07

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 11,446

Re: MOC Configs & Themes

custom action in MOCP - delete/move file & rescan directory?

Here's the deal:  I have a very large directory of thousands of mp3s I've downloaded over the years, and I want to go through them all, decide which ones I like enough to legally own a copy and delete the ones that I'm willing to do without.  Obviously, I could open an mp3 in VLC, give a thumbs up/down, close VLC, and either move the file to a "keep" directory or delete it with Shift-Delete...repeat...repeat...

I'd like to be able to assign a couple custom actions in my MOCP config file to automate this:
1.  Stop playing the current song.
2.  Either
  a.  delete the current song, or
  b.  move the current song to "keep" directory.
3.  Rescan the current directory.
4.  Play another song in the directory at random.

I have a handle on part 2, but is there a way to have the execv string automate the other steps?


Yes; as a matter of fact, I am a cop.  Why do you ask? cool
I'm a moderator here.  How are we doing?  Feedback is encouraged.

Offline

#23 2012-01-14 23:57:32

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: MOC Configs & Themes

^ the only way i can think of how it might be possible is to write a shell-script for that. but it seems you'd need to do something like 'stop MOC, restart MOC (with certain command-line options, so 'man mocp'). however, since you are executing a script from MOC's exec-call, even if you are able to quit MOC with that, it might not want to progress with your script? this last part is just guesswork, haven't tried any of this. but this is the direction i'd be looking.

Last edited by rhowaldt (2012-01-15 11:07:16)

Offline

#24 2012-01-15 00:39:39

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 11,446

Re: MOC Configs & Themes

Well, I'm pretty sure between having MoCP echo the currently playing song to a script variable, and executing a mv or del on that file name, I have 75% of this covered.  If a file has been deleted from the current directory and MoC tries to play it, it just says it can't find it and moves on to the next song.  Can't seem to find a way to get it to automatically restart in its current directory (EDIT: from the command line) after stopping though...playlist, but not current directory.  I suppose just having to press <Enter> afterward isn't such a chore though.

Last edited by pvsage (2012-01-15 00:41:02)


Yes; as a matter of fact, I am a cop.  Why do you ask? cool
I'm a moderator here.  How are we doing?  Feedback is encouraged.

Offline

Be excellent to each other!

#25 2012-01-15 11:06:56

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: MOC Configs & Themes

^ if its current directory is always the same, wouldn't this work?

       -m --music-dir
              Start in MusicDir (set in configuration file). This can be  also
              set in configuration file as StartInMusicDir.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo