Archive for April, 2009

screenshot5

Cool XUL tricks with Firefox using Stylish

Firefox is an excellent browser that runs on an open, extendable platform by Mozilla which many users have improved through the creation of extensions, themes and add-ons. As a web developer / design and code hobbyist, I’m always looking for ways to give myself more power out of my browser and communicate ideas visually in the most efficient way. Using Stylish (a program that runs css on top of userStyles.css), I’ve found I can not only edit the looks of webpages with CSS but XUL, the building language of Firefox. This allows for some nice little enhancements.

Align Bookmarks to the Top Right

Here’s one I brewed up myself spawning from an discussion on IRC where someone pointed out the clutter I had going on in my bookmarks toolbar, I set out to condense my collection.

The plan was to align a few folders to the top right of my browser at the same level as my file menu and remove the bookmarks toolbar. Sounds easy enough right? Well.. perhaps it’s my ignorance in the XUL / CSS relationship that doesn’t allow me to float boxes but I actually ended up doing a strange little trick to make this successful.

screenshot5

To figure out how to get it to align to the right, I had to first figure out some class and id names. That I started trying different atrributes with….

screenshot-mozilla-firefox-dom-inspector

Until I came up with the code below.

/* Align Bookmarks to the top right of Firefox
   Tyler Mulligans www.doknowevil.net

-- Right click the your file menu and click customize to drag around your bookmarks.
*/

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

#toolbar-menubar { direction:rtl !important; }
#toolbar-menubar #menubar-items, #toolbar-menubar .bookmarks-toolbar-items { direction:ltr !important; }

Using that code in stylish, I right clicked my file menu, click customize and dragged my file menu, bookmarks and loader to their appropriate places.

right_click_file_menu

drag_bookmarks

Fixing webpages that don’t explicitly define the background and foreground as white and black

I changed my default background color so that I’m not blinded by white when I open a new blank tab. Unfortunately many web developers assume that users have a white background with black text and don’t bother to explicitly define them. I use the script below to fix 95% of these pages… some just use inheritently bad design techniques like defining their background color in the html tag (something w3c recommended you DON’T do in HTML. While technically okay in XHTML, I think it’s better to use the first VISUAL tag on the page. After the HTML tag you have a head… and title.. etc, which technically inherit the HTML tag settings.

@-moz-document url-prefix(http://), url-prefix(https://) { body { background-color:#fff; color:#000; } }

Theme specific enhancements

I use an unusual brown theme and I’ve do what I can to match and extend my applications. I borrowed and enhanced the scripts below

Tabs / Tab Bar

A darker background and more prominent selected tab (pictured above)

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

[class="close-button tabs-closebutton"], .tabbrowser-tabs tab[selected="true"] {
  -moz-appearance: none !important;
  background-color: #654C30 !important;
}

.tabbrowser-tab[selected="true"] .tab-text {
  color: white !important;
  -moz-opacity: .85 !important;
}

.tabbrowser-tab[selected="true"]:hover {
  -moz-opacity: 1 !important;
  background-color: #755533 !important;
}

.tabbrowser-tabs {
  border-top:1px solid #5F4A2A;
  border-bottom:2px solid #503C1E;
  background-color:#120F0B !important;
  padding:5px 1px 0 1px;
}

Awesome Bar

Added colors to match my theme.

awesome_bar

/*
 _________________________________________________________________________
|                  |                                                      |
|          Title:  |  Awesome Bar Background Color Based on Type (WOW)    |
|    Description:  |  Different Colors based on Bookmark, tag, or regular |
|         Author:  |  -=Ben=-                                             |
|   Date Created:  |  July 3, 2008                                        |
|   Last Updated:  |  October 7, 2008                                     |
|        Version:  |  1.0.0.3                                             |
|__________________|______________________________________________________|

*/

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

.autocomplete-richlistitem[type="bookmark"] /*Blue*/
{
  background-color: #45586A;  /*#E3FCFE;*/
  color: #fff;
}

.autocomplete-richlistitem[type="favicon"] /*Green*/
{
  background-color: #556A45;  /*#E3FEE5;*/
  color: #fff;
}

.autocomplete-richlistitem[type="tag"] /*Yellow*/
{
  background-color: #6A5745;
  color: #fff;
}

.autocomplete-richlistitem:focus
{
  background-color: #0A246A;
  color: #FFFFFF;
}

If you enjoy my theme, you can download a beta I’ve been working on here: http://z.nexuizninjaz.com/linux/themes/

nexuiz_screenshot_5

Nexuiz 2.5 is released!

Quoting the change log:

Almost a year of hard work, 3000 single changes, new developers and players, a few tourneys and lots of matches have passed since the last release.

Today the Alientrap team is proud to bring you a new and improved Nexuiz! Still trying to achieve this fine balance between fun and a challenge, you will notice lots of small additions that will make playing even more fun.

Some larger changes like the new guns and particle effects will make you want to dive into the great and friendly Nexuiz community, while the large additions including the race game mode, some new maps and improved netcode will take away lots of hours of your free time.

Do you dare to take a look and see for yourself what a totally free and open source game can be?

New features include:

  • Completely redone HUD and user adjustable scoreboard
  • Totally rewritten Client/Server communication to cut the bandwidth usage in half
  • New gamemode “Race”. Try to get from start to end of a level as fast as possible. Available as free-for-all and team variant. Further allows to play with or without a qualification period.
  • Added several new weapons (on-hand Grappling Hook, Port-O-Launch, T.A.G. Seeker, Heavy Laser Assault Cannon, Rifle)
  • Map editor NetRadiant included
  • Improved all effects for eye candy and tweakability
  • All maps recompiled with external lightmaps which allow for much crisper shadows
  • Added maps desertfactory (DM, TDM, MinstaGib), racetrack (Race) and made aggressor support Key Hunt
  • New player sounds, announcer sounds/voices, textures, crosshairs, weapon models, effects and menu skins
  • Added support for video capture to OggTheora
  • Integrated the Havoc mod into the menu! Havoc servers use quite different physics and weapons, give it a try!
  • Fixed a crash with ATI drivers on shutdown or vid_restart
  • Fixed several problems with lagging gameplay/crashes/wrong display of effects
  • Improved bots (teamworking, bunnyhopping, swimming, better way finding, support for ladders, less CPU usage, faster map loading)
  • Better visual display of carried items (Strength, Shield, flags and keys)
  • Better parental guidance support with cl_gentle and cl_nogibs
  • Lots of tourney-related features (timeout/in, spectator-slots, allready, warmup mode, lockteams, unlockteams, movetoteam_red/blue/…, nospectators, records, cointoss)
  • Added some effects customization options like cl_casings, cl_weaponpriority
  • Many more map entities allowing for more dynamic maps
  • Restructured and improved menu: demos menu and multiple campaigns are back, also added an advanced menu containing ALL settings of the game

For a more complete list of changes see: https://sourceforge.net/project/shownotes.php?release_id=672474&group_id=81584

As usual, you can download the newest release from our download page.

If you are providing a mirror of the release, please notify us so we can add it to the official mirror list. For any comments, suggestions or questions, please refer to our forum or the FAQ.

Because of many major changes there is NO PATCH available.
To make sure nothing breaks, you should use a new directory to unzip Nexuiz 2.5!

If you use 2.5 and see a server with no gametype it’s an 2.4.2 server, don’t play on those. :)

Alientrap is also currently looking for new coders, modelers, mappers and people experienced with creating sound effects. If you feel like helping improve Nexuiz or Zymotic please contact the team via forum or IRC.

You can Download Nexuiz Here. To run Nexuiz, extract the files anywhere on your computer and run the executable. Try GLX first and if you experience problems, you hardware maybe better suited for the SDL version. The main difference between the two is the software libraries they are compiled for.

If you’d like to spread the word, it’s a good idea to share the Nexuiz 2.5 release on your facebook account. You can digg it here: http://digg.com/pc_games/Nexuiz_2_5_is_released