Skip to content
Stephan Raabe edited this page Aug 8, 2024 · 6 revisions

The status bar for the ML4W Dotfiles is Waybar. You can find the waybar configuration in ~/dotfiles/waybar

You can toggle waybar with SUPER + CTRL + B

You can reload the waybar theme with SUPER + SHIFT + B

In addition, you can switch the Waybar Template with SUPER + CTRL + T or by pressing the "..." icon in Waybar with the themeswitcher.

Waybar Themes and themeswitcher

Select a theme with SUPER + CTRL + T (custom Hyprland key binding) to execute the themeswitcher.sh script. The script will open rofi to show the themes in the folder ~/.config/waybar/themes/

Define your Quicklinks

The waybar status bar includes a section for quicklinks.

image

The icon for ChatGPT and Settings are fixed. All the other icons can be customized or extended in ~/.config/ml4w/settings/waybar-quicklinks.json

In the JSON file you can define up to 10 Quicklinks and add them into the quicklinks group in Waybar:

{
    "custom/quicklink1": {
        "format": "",
        "on-click": "chromium",
        "tooltip-format": "Open Chromium"
    }, 
    "custom/quicklink2": {
        "format": "",
        "on-click": "~/.config/ml4w/settings/browser.sh",
        "tooltip-format": "Open Firefox"
    },
    "custom/quicklink3": {
        "format": "",
        "on-click": "~/.config/ml4w/settings/filemanager.sh",
        "tooltip-format": "Open filemanager"
    }, 
    "custom/quicklink4": {
        "format": "",
        "on-click": "betterbird",
        "tooltip-format": "Open Betterbird"
    }, 
    "custom/quicklinkempty": {
    }, 
    "group/quicklinks": {
        "orientation": "horizontal",
        "modules": [
            "custom/quicklink2",
            "custom/quicklink3",
            /*
            "custom/quicklink4",
            */
            "custom/quicklinkempty"
        ]
    }
}

This configuration includes already a prepared quicklink for Firefox incl. the correct icon. Just activate it by removing the /* */ and remove Chromium.

After changing the file, you have to reload waybar with SUPER + SHIFT + B

You can find free icons of font-awesome here: https://fontawesome.com/search?o=r&m=free

Define your own config and style.css for a ML4W theme

If you want to hide modules from the dotfiles ML4W themes or tweak the style, you can do this by creating a copy of the config file and name it config-custom or a copy of style.css and name it style-custom.css

The waybar loader will the use your copies instead of the default files.

With a personal config-custom you can also load a personal modules.json with additional modules.

You can reload the waybar theme with SUPER + SHIFT + B

Create your own theme based on the starter theme

Please check the configurations of the folders in ~/dotfiles/waybar/themes/

A good starting point is to copy the the waybar starter theme.

Copy the folder ~/.config/waybar/themes/starter and name the copy for example to mytheme.

Open the file ~/.config/waybar/themes/mytheme/config.sh and give your theme a name

#!/bin/bash
theme_name="MyTheme"

Select your new theme by clicking in the ... icon or with SUPER + CTRL + T

To customize your theme, you can edit the files config, style.css and modules.json

You can reload the waybar theme with SUPER + SHIFT + B

Waybar documentation

Waybar configuration: https://github.com/Alexays/Waybar/wiki/Configuration Waybar Styling: https://github.com/Alexays/Waybar/wiki/Styling

Clone this wiki locally