{"id":13533110,"url":"https://github.com/scorpion-26/gBar","last_synced_at":"2025-04-01T21:31:50.178Z","repository":{"id":65547007,"uuid":"588622212","full_name":"scorpion-26/gBar","owner":"scorpion-26","description":"Blazingly fast status bar written with GTK","archived":false,"fork":false,"pushed_at":"2024-04-03T14:43:56.000Z","size":503,"stargazers_count":358,"open_issues_count":17,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-03T15:52:02.963Z","etag":null,"topics":["bar","cpp","gtk3","linux","status-bar","wayland"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scorpion-26.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-01-13T15:19:25.000Z","updated_at":"2024-04-14T17:25:30.268Z","dependencies_parsed_at":"2023-11-22T01:08:27.229Z","dependency_job_id":"50fe6493-4d3d-4bf9-b5c3-082e212193ca","html_url":"https://github.com/scorpion-26/gBar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorpion-26%2FgBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorpion-26%2FgBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorpion-26%2FgBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorpion-26%2FgBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scorpion-26","download_url":"https://codeload.github.com/scorpion-26/gBar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246713237,"owners_count":20821862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bar","cpp","gtk3","linux","status-bar","wayland"],"created_at":"2024-08-01T07:01:16.671Z","updated_at":"2025-04-01T21:31:49.645Z","avatar_url":"https://github.com/scorpion-26.png","language":"C++","funding_links":[],"categories":["Tools","Bar"],"sub_categories":["Status Bar/Shell","Nerd Fonts"],"readme":"# gBar\nMy personal blazingly fast and efficient status bar + widgets, in case anyone finds a use for it.\n\n*gBar: **G**TK **Bar***\n\n## Prerequisites \n*If you don't have the optional dependencies, some features are not available.*\n- wayland\n- Hyprland(Optional -\u003e For workspaces widget)\n- nvidia-utils(Optional -\u003e For Nvidia GPU status)\n- bluez(Optional -\u003e For Bluetooth status)\n- GTK 3.0\n- gtk-layer-shell\n- PulseAudio server (PipeWire works too!)\n- pamixer\n- libsass\n- meson, gcc/clang, ninja\n\n## Building and installation (Manually)\n1. Clone gBar\n    ```\n    git clone https://github.com/scorpion-26/gBar\n    ```\n2. Configure with meson\n    \n    *All optional dependencies enabled*\n    ```\n    meson setup build\n    ```\n3. Build and install\n    ```\n    ninja -C build \u0026\u0026 sudo ninja -C build install\n    ```\n\n## Building and installation (AUR)\nFor Arch systems, gBar can be found on the AUR.\nYou can install it e.g.: with yay\n```yay -S gbar-git```\n\n## Building and installation (Nix)\nIf you choose the Nix/NixOS installation there are a couple of ways to do it but they all require you to have flakes enabled.\n- Building it seperately and just running the binary, run nix build in the directory and use the binary from ./result/bin\n- Import the flake to inputs and then add `gBar.defaultPackage.x86_64-linux` to either environment.systemPackages or home.packages.\n- Use the home manager module. This is done by, as in the previous way, importing the flake and then adding `gBar.homeManagerModules.x86_64-linux.default` into your home-manager imorts section. This exposes the option programs.gBar to home-manager, use it like below.\n```nix\n# Inputs section\ninputs.gBar.url = \"github:scorpion-26/gBar\";\n...\n# Inside home config\nhome-manager.users.user = {\n    ...\n    imports = [ inputs.gBar.homeManagerModules.x86_64-linux.default ];\n    ...\n    programs.gBar = {\n        enable = true;\n        config = {\n            Location = \"L\";\n            EnableSNI = true;\n            SNIIconSize = {\n                Discord = 26;\n                OBS = 23;\n            };\n            WorkspaceSymbols = [ \" \" \" \" ];\n        };\n    };\n};\n```\n\n## Running gBar\n*Open bar on monitor \"DP-1\"*\n```\ngBar bar DP-1\n```\n*Open bar on monitor 0 (Legacy way of specifying the monitor)*\n```\ngBar bar 0\n```\n*Open audio flyin (either on current monitor or on the specified monitor)*\n```\ngBar audio [monitor]\n```\n*Open microphone flyin, this is equivalent to the audio flyin*\n```\ngBar mic [monitor]\n```\n*Open bluetooth widget*\n```\ngBar bluetooth [monitor]\n```\n\n## Gallery\n![The bar with default css](/assets/bar.png)\n\n*Bar with default css*\n\n![The audio flyin with default css](/assets/audioflyin.png)\n\n*Audio widget with default css*\n\n![The bluetooth widget with default css](/assets/bt.png)\n\n*Bluetooth widget with default css*\n\n## Features / Widgets\nBar: \n- Workspaces (Hyprland only. Technically works on all compositors implementing ext_workspace when ```UseHyprlandIPC``` is false, though workspace control relies on Hyprland)\n- Time\n- Title of the focused Window\n- Bluetooth (BlueZ only)\n- Audio control\n- Microphone control\n- Power control\n   - Shutdown\n   - Restart\n   - Suspend\n   - Lock (Requires manual setup, see FAQ)\n   - Exit/Logout (Hyprland only)\n- Battery: Capacity\n- CPU stats: Utilisation, temperature (Temperature requires manual setup, see FAQ)\n- RAM: Utilisation\n- GPU stats (Nvidia/AMD only): Utilisation, temperature, VRAM\n- Disk: Free/Total\n- Network: Current upload and download speed\n- Update checking (Non-Arch systems need to be configured manually)\n- Tray icons\n\nBluetooth:\n - Scanning of nearby bluetooth devices\n - Pairing and connecting\n\nAudio Flyin: \n- Audio control\n- Microphone control\n\n## Configuration for your system\nCopy the example config (found under data/config) into ~/.config/gBar/config and modify it to your needs.\n\n## Plugins\ngBar utilizes a plugin system for custom widgets anyone can create without modifying the source code.\nPlugins are native shared-libraries, which need to be placed inside ```~/.local/lib/gBar```, ```/usr/lib/gBar``` or ```/usr/local/lib/gBar```.\nInside example/ there is an example plugin setup. To build and run it, run the following commands inside the example directory:\n\n```\nmeson setup build -Dprefix=~/.local\n```\nfor the local user\nOR \n```\nmeson setup build\n``` \nfor all users\n\n```\nninja -C build install\ngBar gBarHelloWorld\n```\nThe second argument is the name of the shared library (without 'lib' and '.so').\n\nFor more examples on how to use the gBar API, you can have a look at the built-in widgets (AudioFlyin.cpp, BluetoothDevices.cpp, Bar.cpp) as they use the same API.\n\n## FAQ\n### There are already many GTK bars out there, why not use them?\n- Waybar: \nGreat performance, though limited styling(Almost no dynamic sliders, revealers, ...) and (at least for me) buggy css.\n- eww: \nReally solid project with many great customization options. There is one problem though: Performance.\\\nDue to the way eww configuration is set up, for each dynamic variable (the number of them quickly grows) you need a shell command which opens a process. \nThis became quickly a bottleneck, where the bar took up 10% of the CPU-time due to the creation of many processes all the time (without even considering the workspace widget).\ngBar implements all of the information gathering(CPU, RAM, GPU, Disk, ...) in native C++ code, which is WAY faster. In fact, gBar was meant to be a fast replacement/alternative for eww for me.\n\nAnd lastly: Implementing it myself is fun and a great excuse to learn something new!\n\n### Can you implement feature XYZ? / I've found a bug. Can you fix it?\nThis project is meant to be for my personal use, though I want it to be easily used by others without bugs or a complicated setup. This means the following:\n -  If you found a bug, please [open an issue](https://github.com/scorpion-26/gBar/issues/new/choose) and I'll try to fix it as quickly as I can.\n -  If you're missing a particular feature, please [open an issue](https://github.com/scorpion-26/gBar/issues/new/choose) as well and I'll see what I can do, although I can't guarantee anything. Small requests or features I'll find useful too will probably be implemented in a timely fashion though.\n\n\n### What scheme are you using?\nThe colors are from the Dracula theme: https://draculatheme.com\n\n### I want to customize the colors\nFirst, find where the data is located for gBar. Possible locations: \n - In a 'gBar' directory found in any of the directories listed by `echo $XDG_DATA_DIRS`\n - /usr/share/gBar\n - /usr/local/share/gBar\n - ~/.local/share/gBar\n - If you cloned this repository locally: Inside css/\n\n Copy the scss and css files from within the data direction into ~/.config/gBar. e.g.:\n ```\n mkdir ~/.config/gBar/\n cp /usr/local/share/gBar/* ~/.config/gBar/\n ```\n This will override the default behaviour. If you have sass installed, you can modify the scss file and then regenerate the css file accordingly. Else modify the css file directly.\n\n### The margins of the bar are inconsistent/messed up / Custom CSS broke.\nIf you have a custom style.[s]css, make sure that the margins/names/... are the same as the ones found in ```style/style.[s]css```.\\\nIf you've checked the css against upstream gBar and the issue persists, please [open an issue](https://github.com/scorpion-26/gBar/issues/new/choose).\\\nMajor (breaking) changes to the css:\n - [f78758c](https://github.com/scorpion-26/gBar/commit/f78758c4eedb022ae49fbecf2f2505f9672d0b9d): Margins are no longer used in the default css. If you didn't play around with margins, you can safely remove them from your css.\\\n - [56c53c4](https://github.com/scorpion-26/gBar/commit/56c53c49cdbd7fac11726a5b7ab12f1e6490a211): The lock icon now has its own selector, causing wrong styling when using an outdated css. This can be fixed by including the default ```.lock-button``` section into your css.\n\n### The Audio/Bluetooth widget doesn't open\nDelete ```/tmp/gBar__audio```/```/tmp/gBar__bluetooth```.\nThis happens, when you kill the widget before it closes properly (Automatically after a few seconds for the audio widget, or the close button for the bluetooth widget). Ctrl-C in the terminal (SIGINT) is fine though.\n\n### CPU Temperature is wrong / Lock doesn't work / Exiting WM does not work\nSee *Configuration for your system*\n\n### The icons are not showing!\nPlease install a Nerd Font from https://www.nerdfonts.com (I use Caskaydia Cove NF), and change style.css/style.scss accordingly (Refer to 'I want to customize the colors' for that). You _will_ need a Nerd Font with version 2.3.0 or newer (For more details see [this comment](https://github.com/scorpion-26/gBar/issues/5#issuecomment-1442037005))\n\n### The tray doesn't show\nSome apps sometimes don't actively query for tray applications. A fix for this is to start gBar before the tray app\nIf it still doesn't show, please open an issue with your application.\nThe tray icons are confirmed to work with Discord, Telegram, OBS, Steam and KeePassXC\n\n### Clicking on the tray opens a glitchy transparent menu\n~This is semi-intentional and a known bug (See https://github.com/scorpion-26/gBar/pull/12#issuecomment-1529143790 for an explanation). You can make it opaque by setting the background-color property of .popup in style.css/style.scss~\\\nAs of [bc0281c](https://github.com/scorpion-26/gBar/commit/bc0281ca5321cb6e72ab6d295c790ae10d7eec7e) this is now fixed! For things to look properly you may want to update your css (Specifically the selectors ```.popup``` and ```menu```)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscorpion-26%2FgBar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscorpion-26%2FgBar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscorpion-26%2FgBar/lists"}