কম্পিউটার

কিভাবে ফায়ারফক্স UI কাস্টমাইজ করবেন - ধাপে ধাপে টিউটোরিয়াল

বছরের পর বছর ধরে, ইদানীং আগের তুলনায় প্রায়ই, আমি আমার মেশিনে ফায়ারফক্সের চেহারা এবং আচরণের পরিবর্তন করতে বাধ্য হয়েছি। পূর্বে বুদ্ধিমান ডিফল্ট পরিবর্তন করা হয়েছিল, প্রায় নির্বিচারে, আমার কর্মপ্রবাহে কার্যকরী এবং নান্দনিক অদক্ষতা নিয়ে আসে। অস্ট্রালিস এবং প্রোটন উল্লিখিত ঘটনার ভাল উদাহরণ।

সম্প্রতি, আমি ফায়ারফক্স 91 এর পরে ধূসর-অন-ধূসর চেহারাকে কীভাবে পূর্বাবস্থায় ফিরিয়ে আনতে হয় তা ব্যাখ্যা করে দুটি মোটামুটি বিস্তারিত নির্দেশিকা প্রকাশ করেছি। উভয় ক্ষেত্রেই, আমি Firefox UI সম্পর্কে আমার পূর্বের জ্ঞানের উপর নির্ভর করেছিলাম। আমি বুঝতে পেরেছিলাম যে অনেক লোকের জন্য, নির্দেশগুলি খুব গোপনীয় হতে পারে। তাই আমি ফায়ারফক্স UI কে কাস্টমাইজ করার জন্য একটি জেনেরিক গাইড তৈরি করার সিদ্ধান্ত নিয়েছি, যাতে আপনি যদি একই অনুশীলন করতে চান তবে এটি অনুসরণ করা খুব কঠিন হবে না।

কিভাবে ফায়ারফক্স UI কাস্টমাইজ করবেন - ধাপে ধাপে টিউটোরিয়াল

মূল বিষয়গুলি

ফায়ারফক্স UI হল - একটি উপায়ে - একটি ওয়েব পৃষ্ঠার মতো৷ এটি CSS নামে একটি ওয়েব-ভিত্তিক ভাষায় মূর্ত শৈলীগত নিয়মগুলির একটি সিরিজ দ্বারা সংজ্ঞায়িত করা হয়। এটি অনেকটা যেকোনো সাইটের মতো। বলুন, dedoimedo.com, আপনি যা দেখেন এবং পড়েন তা হল পাঠ্য, কিন্তু পৃষ্ঠাটি কতটা চওড়া হবে, ফন্টের রঙ, অনুচ্ছেদের ফাঁক এবং অনুরূপ সবই CSS ফাইল ব্যবহার করে সেট করা আছে। একইভাবে, ফায়ারফক্সও একইভাবে স্টাইল করা হয়েছে।

আপনি নিজের তৈরি করে ডিফল্ট নিয়ম ওভাররাইড করতে পারেন। এটি আপনার ফায়ারফক্স প্রোফাইলে একটি নতুন ফাইল যোগ করার মাধ্যমে করা হয়। ফাইলের ভিতরে, আপনি নতুন নিয়ম তৈরি (যোগ) করেন যা ফায়ারফক্স UI-তে বিদ্যমান ভিজ্যুয়াল উপাদানগুলিকে প্রভাবিত করবে। এইভাবে এটি করা হয়:

  • ফায়ারফক্স খুলুন, ঠিকানা বারে about:support টাইপ করুন।
  • যে পৃষ্ঠাটি খোলে সেখানে, প্রদর্শিত টেবিলে "প্রোফাইল ফোল্ডার" লাইনটি সনাক্ত করুন। Open Folder বাটনে ক্লিক করুন। এটি আপনার ফাইল এক্সপ্লোরার চালু করবে (আপনি যে অপারেটিং সিস্টেমই ব্যবহার করছেন না কেন), এবং আপনার ফায়ারফক্স প্রোফাইলের অবস্থান নির্দেশ করবে। অনুগ্রহ করে মনে রাখবেন, ফায়ারফক্স প্রোফাইল প্রতিটি ব্যবহারকারীর জন্য অনন্য, তাই আপনাকে প্রতিটি ব্যবহারকারীর জন্য আলাদাভাবে পরিবর্তন করতে হবে।

কিভাবে ফায়ারফক্স UI কাস্টমাইজ করবেন - ধাপে ধাপে টিউটোরিয়াল

  • এখন যেহেতু আপনি আপনার ফায়ারফক্স প্রোফাইলের অবস্থান জানেন, একটি ব্যাকআপ তৈরি করুন! আপনি সম্পূর্ণ ফোল্ডার এবং এর সমস্ত বিষয়বস্তুর একটি সাধারণ ম্যানুয়াল কপিও করতে পারেন। এইভাবে, যদি কিছু ভুল হয়ে যায়, আপনি জিনিসগুলিকে আপনার আদিম, ভ্যানিলা বেসলাইনে পুনরুদ্ধার করতে পারেন। কোনো বড় পরিবর্তনের আগে এটি করুন।
  • Firefox প্রোফাইল ফোল্ডারে, chrome (ছোট হাতের অক্ষর) নামে একটি ফোল্ডার (যদি এটি বিদ্যমান না থাকে) তৈরি করুন।
  • এই ফোল্ডারে নেভিগেট করুন, এবং এখানে userChrome.css নামে একটি ফাইল তৈরি করুন (লোয়ার/অপারকেস লক্ষ্য করুন)।
  • এই ফাইলটি টেক্সট এডিটরে খুলুন।

কিভাবে ফায়ারফক্স UI কাস্টমাইজ করবেন - ধাপে ধাপে টিউটোরিয়াল

ডিফল্টরূপে, ফাইলটি খালি থাকবে এবং এতে কিছুই থাকবে না। আমরা এখন এটিকে সিএসএস নির্দেশাবলী দিয়ে তৈরি করব, যা ফায়ারফক্সের বিভিন্ন উপাদানের চেহারা (এবং আচরণ) ওভাররাইড করবে। আমি এটি আগে অনেকবার করেছি, তাই আপনি এই নির্দেশিকাগুলির মধ্যে কয়েকটিকে কর্মপ্রবাহের জন্য একটি বেসলাইন হিসাবে উল্লেখ করতে পারেন। উদাহরণস্বরূপ:

  • প্লাজমা এইচডি স্কেলিং এবং ফায়ারফক্স
  • ফায়ারফক্স পিন করা ট্যাব
  • ফায়ারফক্স এবং ঠিকানা বার আচরণ

অতিরিক্ত ভিত্তি

পরিবর্তনগুলি কার্যকর করার জন্য, আমাদের আরও কিছু জিনিসের প্রয়োজন:

  • এড্রেস বারে about:config টাইপ করুন। এগিয়ে যাওয়ার জন্য যেকোনো সতর্কতা গ্রহণ করুন।
  • about:config পৃষ্ঠার অনুসন্ধান বাক্সে, উত্তরাধিকার অনুসন্ধান করুন। নিম্নলিখিত পছন্দগুলি দেখানো উচিত:

toolkit.legacyUserProfileCustomizations.stylesheets

এটির অবস্থা মিথ্যা থেকে সত্যে টগল করতে এটিতে ডাবল ক্লিক করুন৷ এটি ফায়ারফক্সকে আপনার কাস্টম পরিবর্তনগুলি ব্যবহার করতে এবং ব্রাউজারে প্রয়োগ করার অনুমতি দেবে৷ এই পছন্দ টগল করা ছাড়া, কোন UI পরিবর্তন হবে না।

  • userChrome.css ফাইলে, যা বর্তমানে খালি, নিচের লেখাটি শীর্ষে যোগ করুন:

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

এটি আপনাকে যেকোনো উত্তরাধিকার উপাদান এবং ঘোষণা ব্যবহার করার অনুমতি দেবে।

  • অবশেষে, আপনার CSS সম্পর্কে কিছু প্রাথমিক বোঝার প্রয়োজন এবং এটি কীভাবে কাজ করে। এটি ছাড়া, আপনি ধারণাগুলি এখানে ব্যাখ্যা করার জন্য সংগ্রাম করবেন। ক্লাস, আইডেন্টিফায়ার, সিএসএস হায়ারার্কির পুরো ধারণা এবং নিয়মের প্রাধান্য ইত্যাদির মতো জিনিস। আমি ভয় পাচ্ছি কোন জাদুকরী শর্টকাট হতে পারে না।

Firefox UI লেআউট

এখন আমাদের কাছে জিনিসগুলি কাজ করার জন্য মূল উপাদান রয়েছে। এর পরে, আমাদের UI এর সাথে পরিচিত হতে হবে। আমার টিউটোরিয়ালে (উপরে লিঙ্ক করা), আমি ট্যাব-ব্যাকগ্রাউন্ড, #সার্চবার, #নেভিগেটর-টুলবক্স এবং আরও অনেক কিছু ব্যবহার করেছি। আপনি ঠিকই ভাবতে পারেন, আমি কীভাবে জানব যে এগুলো কী, এবং আমি সেই তথ্য কোথায় পাব?

উত্তরটি এত সহজ নয়, আমি ভয় পাচ্ছি ...

এক, আপনার রেফারেন্স গাইড দরকার। দুই, আপনি ফায়ারফক্সের অন্তর্নির্মিত ব্রাউজার টুলবক্স ব্যবহার করতে পারেন, যা আপনাকে উপাদান বাছাই করতে এবং তাদের সনাক্ত করতে দেয়। এ কিছুটা পরিশ্রম, মন। প্রথমে ব্রাউজারের মেনু> More Tools> Web Developer Tools-এ ক্লিক করুন। Then, when this menu opens, click on the three-dot element to the far right (another menu)> Settings. Or press F1. Here, you will need to select the last two options in the right column:Enable browser chrome ... and Enable remote debugging. Not very intuitive. And let's not rant about the use of hamburger and three-dot menu for two different things in the same UI.

কিভাবে ফায়ারফক্স UI কাস্টমাইজ করবেন - ধাপে ধাপে টিউটোরিয়াল

Another option is just a quick, dirty crash course from me, with focus on just the most important UI elements. Which is why I made this annotated screenshot, pointing out the elements I changed in my Proton guides.

কিভাবে ফায়ারফক্স UI কাস্টমাইজ করবেন - ধাপে ধাপে টিউটোরিয়াল

Here are the (magnificent) seven important elements:

  1. #navigator-toolbox - This is the frame containing the page navigation + tab bar.
  2. #nav-bar - This is only the lower half of the navigator-toolbox (the bottom section).
  3. .tabbrowser-tab[selected="true"] - This is the active tab element. Notice the state (selected, true).
  4. .tabbrowser-tab:not([selected="true"]) - This is an inactive tab.
  5. .tabbrowser-tab[usercontextid] - This is a container tab (if you use the containers add-on). Please note that for items 3-5, you should also be aware of the following element - a class called .tab-background, which specifies the background area of the tab(s). We will use it in conjunction with the tab-browser-tab* declarations above shortly.
  6. #urlbar - This is the address bar. Note that there's also #urlbar-background, an identifier that is similar to the tab background element we introduced earlier, and which serves a similar purpose. Once again, we will see the necessary examples very soon.
  7. #searchbar - This is the search box, if you use it.

Things are a bit more complicated than that, of course, but now, you can begin to understand where we're going with this. I think the best solution is to simply demonstrate with a handful of examples, so you understand what gives.

Some basic examples

The code below, when added to userChrome.css will do the following:

  • For the active tab, it will set the borders for the tab's large square background piece.
  • The top border will be 3px thick, while the left and the right will be only 1px thick.
  • They also have different colors.
  • The side borders have 30% transparency.

.tabbrowser-tab[selected="true"] .tab-background {
border-left:1px solid rgba(0, 0, 0, 0.3) !important;
border-right:1px solid rgba(0, 0, 0, 0.3) !important;
border-top:3px solid #0a84ff !important;
}

কিভাবে ফায়ারফক্স UI কাস্টমাইজ করবেন - ধাপে ধাপে টিউটোরিয়াল

The code below, when added to userChrome.css will do the following:

  • For inactive tabs, it will configure the tab background (the large square canvas of the tab) in the following manner:set the actual background color to a mix of current color (system accent color) and transparency layer, using the sRGB color space, and with the system accent color set to just 5% opacity. Basically, the tabs will be pretty much transparent and match your browser's native color.
  • Create a very thin 1px (black) border with 30% opacity. The !important clause means your rule will take precedence over any other rule that applies to the same element.

.tabbrowser-tab:not([selected="true"]):not([multiselected="true"]) .tab-background {
background-color:color-mix(in srgb, currentColor 5%, transparent);
border:1px solid rgba(0, 0, 0, 0.3) !important;
}

The code below, when added to userChrome.css will do the following:

  • It will slightly indent (push inwards) the tabs by adding a 2px margin on the left side. In other words, it will create a tiny bit of extra distance between the tabs and the browser's window edge.

#navigator-toolbox {
margin-left:2px !important;
}

কিভাবে ফায়ারফক্স UI কাস্টমাইজ করবেন - ধাপে ধাপে টিউটোরিয়াল

Then, there's more ...

The code below, when added to userChrome.css will do the following:

  • It will set the background of the urlbar to pure white, with a thin 30%-opaque border than matches the accent color of the active tab (specified earlier). You have full artistic freedom here.

#urlbar-background {
background-color:white !important;
border:1px solid rgba(10, 132, 255, 0.3) !important;
}

Of course, there's way more! But these examples should get you going, I believe.

উপসংহার

That was fairly complicated, I admit. I wish there was a simpler way to edit the Firefox UI, but unfortunately, if you're not happy with Firefox's default looks, and you want to alter them beyond the basic customization available, you will need CSS knowledge, CSS files, and a bunch of rules. This guide outlines how you can achieve that, without going into every specific detail of the browser's interface.

I am fully aware that this isn't a trivial task. CSS looks "easy" to those who know how to use it, but it also creates aversion, justifiably, with ordinary people seeking simple ergonomic solutions. I believe the right way is to actually invest a little bit of time and master this lingo, as it gives you the freedom to make the necessary adjustments to the UI, without relying on arbitrary decisions out there somewhere. I wish Mozilla was making better choices, but hey, even with all this nonsense piled into Firefox, it's still the best browser, it allows you to change the interface, and it's the one browser you should use on your desktop and mobile. It's the only thing that makes the Internet still barely usable, and you will not like the future without Firefox. So grab the CSS, get rid of the annoyances, and continue using Firefox. We're done here.

চিয়ার্স।


  1. Firefox 70 পর্যালোচনা - ইনভার্সন পয়েন্ট?

  2. Firefox 13 - বিভিন্ন ধরণের পর্যালোচনা

  3. লিনাক্সে ফায়ারফক্সে .mht ফাইলগুলি কীভাবে খুলবেন

  4. কিভাবে KVM-তে স্টোরেজ পরিচালনা করবেন - টিউটোরিয়াল