General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
KUSTOMeleon
Posted by: foliator
Date: August 16, 2015 06:39PM

KM75 has to be the most customizable browser on the planet! Thought I'd share some of my own customizations:

I wanted to write a macro that would toggle more than one privacy item at a time, and it turned out to be far easier than I thought. Being too lazy to learn the macro language, I studied a few existing macros as examples, and simply stacked the commands, like this:

ToggleJC{
macros(pref_ToggleJavaScript)
macros(pref_ToggleCookies)
}

In fact, that's all the macro file contains, just those four lines, not even any comments! I named the file ToggleJC.kmm, and assigned a keyboard shortcut to it. Since JavaScript and Cookies are the only privacy items that I ever toggle, I re-labeled them on the privacy bar as J and C respectively, so they take up less room, and hid all the others except the Clear All button. Now when I press Alt Spacebar, voilà! The two checkmarks show disabled/enabled simultaneously! I never toggle one at a time, anyway.

To compact things even more, I also moved the items on the Main bar onto the Go bar and added an Exit button to it, since I keep the title bar hidden. The main bar is hidden now. It was also very easy to change the order of the buttons once I got the hang of it (my Go bar is on the right side, and I wanted the search button closer to the URL bar).

I've even used an icon editor for modifying some toolbar icons to my liking, or for creating new ones.

So now I have a really nice looking and spacious browser screen without sacrificing functionality. Just two bars: The first row contains the Config, Privacy, URL, and Go bars, and the second row is just the tab bar. Besides, why would I need a whole lot of bars when I don't even drink! grinning smiley

I've abandoned the bookmarks bar in favor of my local HTML startup page full of links, which now open new tabs as I designed them to do, thanks to siria's FlipFocus macro. I keep the startup page tab open all the time, and the beauty of it is that it can be used as a home page in any browser; no more importing/exporting of bookmarks.

Options: ReplyQuote
Re: KUSTOMeleon
Posted by: siria
Date: August 16, 2015 09:24PM

Hehe, congratulations, your first macro! Looks like you're quite advanced already, and glad you're having so much fun with KM! smiling smiley
Can promise you it will occasionally still surprise you after years, by discovering new/old simple tricks grinning smiley I still remember vividly how often I thought in the beginning: What?! Can't believe it, it's really SO easy? THAT's why I didn't get it, LOL! For example adding right-click menus to any buttons, or creating all new toolbars, changing toolbar background pic etc.

Yeah, lots of things may not be as simple and intuitive as in other browsers (like drag-n-drop to move buttons), but in exchange there are far more special user-customizations possible, without first having to find a skilled addon-developer for every little user wish :cool: And if there's help needed to customize a little KM macro, those are still a lot shorter and easier than xpi-addons, needing only skilled fellow-users not full pro developers.
Still, KM is a very special browser, best for users with special wishes who like fiddling a bit themselves smiling smiley

Regarding toolbars my taste is exactly the opposite, have two rows cramped full with icons - and I don't drink either grinning smiley Absolutely love this flexibility for all user tastes too!

And yep, am sure all of us have started by first taking other macros as examples before taking a closer look at the wiki. Just be aware that not all existing user macros are necessarily perfect examples! Many contain code that's far more complicated than necessary, because those too were often just based on previous macros, which themselves were based on others, and those on others too etc. Especially "von-hinten-durch-die-Brust-ins-Auge" menubuildings got copied again and again as template until everyone thought menus really had to be built so twisted, sigh...

But shining examples are the native macros like main.kmm of course. Absolutely worth looking inside, even if just for curiosity, have learned quite some handy tricks that way... And once beyond bloody beginner level, the macrolanguage wiki gets the first source to look up syntax. Ah yes, and of course commands.html, in KMs program folder, extremely helpful for all sorts of stuff!

PS: couldn't bookmarks.html also be used as start page? But guess if it contains hundreds of bookmarks it gets a bit long for that purpose... Hm, and did you discover "hotlinks" already? (in F2) Ten shortcuts opening with Ctrl+Number, being a keyboard fan you may like it. And should be a snap to create a short toolbar for them, using macros(hotlink(0-9))... oops, the toolbars fan was me not you :-)

Options: ReplyQuote
Re: KUSTOMeleon
Posted by: foliator
Date: August 16, 2015 11:24PM

Quote
siria
Regarding toolbars my taste is exactly the opposite, have two rows cramped full with icons - and I don't drink either grinning smiley Absolutely love this flexibility for all user tastes too!

... and for all kinds of hardware. You're probably using a machine with a much larger monitor, or perhaps a more conventional aspect ratio. The old standard for computer screens used to be 4:3, e.g. 1024x768 or 800x600. Now computer screens come in all shapes and sizes. Mine is 1024x600, so in return for a wide screen I lose a lot of vertical space. That's why I've been eliminating unnecessary toolbars. Another reason is that I started using computers back in the days of DOS and BASIC before the first version of Windows was released, and I'm also a touch typist, so I tend to favor the keyboard and have made frequent visits to my accel.cfg file.

Quote
siria
Just be aware that not all existing user macros are necessarily perfect examples! Many contain code that's far more complicated than necessary, because those too were often just based on previous macros, which themselves were based on others, and those on others too etc. Especially "von-hinten-durch-die-Brust-ins-Auge" menubuildings got copied again and again as template until everyone thought menus really had to be built so twisted, sigh...

I can read German fluently, but never saw that expression before. To continue from where it leaves off, then from the eye via the forehead to the top of the skull, bypassing the brain. Another way of expressing it would be "from Point A to Point B via Point Y." grinning smiley I've seen that kind of design at work in many apps.

Many years ago I enrolled in a computer programming course, but my full-time job interfered and I dropped out just after starting to learn COBOL. tongue sticking out smiley What you're describing reminds me of what my instructor used to call "spaghetti code". He wasn't very good, anyway, because after he had dictated a short program to us line by line, none of us were able to compile it successfully, let alone run it. I think all it was supposed to do was print the current date.

Yes, commands.html has been a great help.

Quote
siria
PS: couldn't bookmarks.html also be used as start page? But guess if it contains hundreds of bookmarks it gets a bit long for that purpose...

I've done that at times, but to be honest with you, bookmarks.html is ugly to look at, whereas I've formatted mine using CSS for a better layout, some icons for the categories, and a pleasant background color (I can't stand dead white -- it's hard on the eyes). When I want to add a new site, I copy the URL, then view the source of my start page in a text editor and create a new link. It takes very little time, since I use AkelPad, where I was able to record a macro to add the necessary HTML tags. No macro language necessary; I simply created a link template with the macro recorder turned on. Once a new URL has been pasted onto a new line, I use a shortcut key to run the macro, which moves the cursor to the beginning of the line, inserts tags for LI and A HREF, then moves the cursor to the spot where I can insert the name of the site manually.

Those KM hotlinks are quite useful. Ctrl 0 is what I use to open a list of my K-Meleon keyboard shortcuts, the standard ones and those I've assigned, which of course includes the hotlinks themselves.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.