September 24, 2021, 04:00:16 Last Edit: September 24, 2021, 05:35:45 by MountainX
I just started using GMB recently. I love the customization options for layouts, but it will take a while to learn how to change or create layouts myself.

I guess the first step is to copy an existing layout to my user folder, right?

cp /usr/share/gmusicbrowser/layouts/main.layout ~/.config/gmusicbrowser/layouts
My current Layout = with browser & queue

I like this layout, but I would like to try a few changes:

1. add a horizontal volume scroll to the right of the seek bar (I think you call it the TimeSlider)

2. change the fonts and colors everywhere. I want to use a slightly larger font and make it less gray (more white).

I don't want to make too many changes to start with. I just want to start learning how layouts work.

Can anyone help me with tips for making some of those changes?

Thanks.


Yes you can copy the file, but be aware that it contains several layouts, you probably want to keep only the ones you plan to edit.

Also, that layout, like many others, use the "based on" system so that they only modify a few things from another layout. It is a simple and useful system but it can get messy fast, so unless you change just a few lines, you may be better off making a independent layout first. For that you first copy the original layout (the X in "based on X"), and then add the lines from the layout variation at the end (doesn't have to be at the end but safer if you forget to remove the line it replaces) and remove the lines that begin with the same "word =" (if any) from what you copied.

For example:
[original]
Type = G
Category = _"Small"
Name = _"test player"
Default = Window(sticky=1)
VBmain = HBButtons _Title
HBButtons = Prev Stop Play Next

[variation] based on original
Name = _"test player variant"
VBmain = HBButtons _Title _Artist _Album

Then you create the independent layout:
[variation2]
Type = G
Category = _"Small"
Default = Window(sticky=1)
HBButtons = Prev Stop Play Next
Name = _"independent test player variant"
VBmain = HBButtons _Title _Artist _Album


So here's the result you wanted, it actually would have been easy to do it as a "based on" layout.
The VolumeSlider is placed before Cover because they are added at the end ("-" before the name), so the order is reversed.
Sadly the color and font only apply to some simple widgets. If you want to change it for everything, you'll have to use the gtk theme method: https://wiki.gmusicbrowser.org/customization/themes.

[with browser & queue modified]
Type=G+
DefaultFocus = Play
HBIndic = MBmenu Sort 10Filter Queue 10Pos
MBmenu = MainMenuItem LayoutItem PSortItem PFilterItem QueueItem
VBleft = HBIndic HBButtons
HBButtons = VolumeIcon Prev Stop Play Next Time 5_ABtimebar
ABtimebar = (yscale=0) TimeBar
HBTitle = Filler0 _Title -Stars
HBArtist = LockArtist _Artist
HBAlbum = LockAlbum _Album -Year
VBright = 2HBTitle 2HBArtist 2HBAlbum
VBmain = HBupper 5HBstatus 5_HPbig Progress
HBstatus = _SimpleSearch(maxwidth=250) 10MBlist ResetFilter Refresh PlayFilter FilterLock -Total
MBlist = HistItem LSortItem PlayItem
HPfp = FilterPane0(nb=1,hidebb=1,page=artists,page_artists/lmarkup=1) FilterPane1(nb=2,hidebb=1,page=album,page_album/lpicsize=32,page_album/lmarkup=1)
VPlistAA = _SongList HBAA
HBAA = _ArtistBox _AlbumBox
HSize0 = Filler0 LockArtist LockAlbum
VolumeScroll = HBupper

Default = Window(size=1120x820) HPbig(size=400-700) HPfp(size=140-140) VPlistAA(size=575-150) VPBrowserQueue(size=490-210)
HPbig = HPfp _VPBrowserQueue
VPBrowserQueue = _VPlistAA VBQueue
VBQueue = _QueueList(group=1,hidewidget=VBQueue,hideif=empty) HBQueueButtons
HBQueueButtons = EditListButtons(group=1) 4QueueActions

Name = _"with browser & queue (modified)"
HBupper = VBleft _VBright -VolumeSlider  5-Cover
DefaultFontColor= #f0f0f0
DefaultFont = Sans 16

QuoteSadly the color and font only apply to some simple widgets. If you want to change it for everything, you'll have to use the gtk theme method: https://wiki.gmusicbrowser.org/customization/themes.

I do want to change the font and font color everywhere, so I used this method. It works! Very happy with the result.

For now I have set the command in my .desktop file to:

GTK_THEME=gmbtheme gmusicbrowser %F
What are my other options for telling gmusicbrowser to use this GTK theme every time it starts up?

Thanks again for the very impressive music app.