LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-11-2018, 05:26 PM   #1
LenHoff
Member
 
Registered: Mar 2017
Posts: 92

Rep: Reputation: Disabled
Solved: Bless hex editor create & name custom layout file


In Bless hex editor, anyone created a custom layout file to change startup UI size?

I read the manual & found (only) one example on Github - but he just edited the default.layout to change font in ascii area.
https://github.com/bdsword/bless-lay...default.layout.
Code:
<layout>
  <area type="offset">
    <display>
      <evenrow>
        <evencolumn>
          <foreground>dark red</foreground>
          <background>white</background>
        </evencolumn>
      </evenrow>
      <oddrow>
        <evencolumn>
          <foreground>dark red</foreground>
          <background>white</background>
        </evencolumn>
      </oddrow>
      <font>Monaco 12</font>
    </display>
  </area>
  <area type="separator">
    <display>
      <evenrow>
        <evencolumn>
          <foreground>dark green</foreground>
          <background>white</background>
        </evencolumn>
      </evenrow>
      <font>Monaco 12</font>
    </display>
  </area>
  <area type="hexadecimal">
    <case>upper</case>
    <bpr>16</bpr>
    <display>
      <font>Monaco 12</font>
    </display>
  </area>
  <area type="separator">
    <display>
      <evenrow>
        <evencolumn>
          <foreground>dark green</foreground>
          <background>white</background>
        </evencolumn>
      </evenrow>
      <font>Monaco 12</font>
    </display>
  </area>
  <area type="ascii">
    <display>
      <font>Monaco 12</font>
    </display>
  </area>
</layout>
I'd like the ascii column ("area") to automatically open wider than default, which probably means the other areas will have to increase the same.

1st, I'm not sure what the customized layout file needs to be named.
When I open the View > Layouts, it's not showing the file I saved in .config/bless/<filename>.layout.

I understood you should be able to choose a custom layout from Bless' menu (if one exists)? Even if I made syntax error, it should still show the file name? AFAIK, the manual doesn't give an actual example of a custom layout file or naming convention. I assume it'd be like the default - "bless-default.layout."

I'm not sure if using the <bpr> option is the best way (or NO way) to make an area open larger than the default? There's another layout file in the package, named /usr/share/bless/bless-16-bytes-per-row.layout. It's not visible from the menu, either.

Thanks.

Last edited by LenHoff; 08-18-2018 at 07:38 PM.
 
Old 08-11-2018, 11:08 PM   #2
LenHoff
Member
 
Registered: Mar 2017
Posts: 92

Original Poster
Rep: Reputation: Disabled
I figured out one issue - why no "user layouts" were visible from the Bless menu.
When it installed, it created the user config files path as ~/.config/bless.

Per the manual, any custom layout files should be in ~/.config/bless/layouts.
But the deb installer didn't create the "layouts" directory. It had a few other files already in ~/.config/bless, so that's where I put a test layout file.

Once I move it to ~/.config/bless/layouts, they were visible from the Bless menu.

I'm still not sure about the best way to make the ascii area a little wider & the entire starting UI bigger in x & y.
There are some default height & width values in a couple of files, but they aren't close to the actual opening UI size.
 
Old 08-12-2018, 02:17 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
in the example file you gave, i see no indication that width & height can be changed.
if you have reason to believe otherwise, please show us.
 
Old 08-18-2018, 07:37 PM   #4
LenHoff
Member
 
Registered: Mar 2017
Posts: 92

Original Poster
Rep: Reputation: Disabled
Solved: Bless hex editor create & name custom layout file

Quote:
Originally Posted by ondoho View Post
in the example file you gave, i see no indication that width & height can be changed.
if you have reason to believe otherwise, please show us.
No, it doesn't show the ascii area size. That was the point of my question - how to change it. In case I wasn't clear, I was asking, not telling.

I surmised the ascii area is controlled by the hex area - it increases the # of ascii characters per line when you drag the window length and the hex area enlarges.
But it wasn't retaining the size, in spite of a pref: "Session.RememberWindowGeometry">True. Maybe a bug.

The DEFAULT.layout file seems to show 16 bytes per row for the hex area, but it *actually* opens at 18 chars, not 16 - not a biggie.
I can't find what controls the default UI opening width & height.

There's a Glade file that specifies sizes of various boxes. It controls other box sizes correctly, but not the overall main window size.

The question was, is enlarging the default size of the Hex area the best way to control the default opening UI size?
In the default layout file, only the bpr - bytes per row - are specified for the hex area.

**The dirty solution: They didn't make it easy. The Glade file controlled some default configuration, while the "bless-default.layout" file controlled others.
I think it was necessary to enter larger Main Window sizes under Glade, before making the width stored in a custom layout file.

Glade's orig. Bless main window size was 400 x 400. It observed that height, but something (I never found) was increasing the startup length - but not enough for my needs.
The ascii pane showed only 8 char - hard to find anything, that way.

So, increased Glade's "Main Window" length to 1100; width to 550.
I copied the contents of "bless-default.layout" to a user / custom layout file, in ~/.config/bless/layout/bless-24bpr.layout.
In the custom layout file, under the section, "<area type="hexadecimal">", I added the line, "<bpr>24</bpr>", which made the hex area 24 bytes / char wide, which automatically increased the width of aasci area to the same.

Again, for some reason, installing bless from a repo didn't create the sub dir, "layout," under ~/.config. Bless couldn't read custom layout files unless in that path.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Attempting to create a custom keyboard layout. folatt Linux - General 5 04-21-2018 06:41 AM
Hex editor Fixit7 Puppy 2 05-24-2014 11:41 AM
Hex editor? posix_memalign Linux - Software 5 06-23-2010 08:18 PM
Looking for a hex and disk editor pofadda Linux - Hardware 3 10-14-2007 06:26 PM
Hex editor Jeebizz General 1 07-05-2007 01:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration