{"id":26725498,"url":"https://github.com/nudelkurre/ngb","last_synced_at":"2026-04-15T16:05:04.282Z","repository":{"id":283324265,"uuid":"932269829","full_name":"nudelkurre/ngb","owner":"nudelkurre","description":"Statusbar written in python with Gtk4","archived":false,"fork":false,"pushed_at":"2025-03-26T21:10:57.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T22:24:19.375Z","etag":null,"topics":["gtk-layer-shell","gtk4","linux-desktop","python","python3","status-bar","system-bars"],"latest_commit_sha":null,"homepage":"","language":"Python","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/nudelkurre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"publiccode":null,"codemeta":null}},"created_at":"2025-02-13T16:38:13.000Z","updated_at":"2025-03-26T21:10:51.000Z","dependencies_parsed_at":"2025-03-21T03:32:13.307Z","dependency_job_id":null,"html_url":"https://github.com/nudelkurre/ngb","commit_stats":null,"previous_names":["nudelkurre/ngb"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nudelkurre%2Fngb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nudelkurre%2Fngb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nudelkurre%2Fngb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nudelkurre%2Fngb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nudelkurre","download_url":"https://codeload.github.com/nudelkurre/ngb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245924501,"owners_count":20694731,"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":["gtk-layer-shell","gtk4","linux-desktop","python","python3","status-bar","system-bars"],"created_at":"2025-03-27T21:19:10.486Z","updated_at":"2026-04-15T16:05:04.276Z","avatar_url":"https://github.com/nudelkurre.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ngb\n\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Configuration](#configuration)\n  - [Bars](#bars)\n    - [Output](#output)\n    - [Widgets](#widgets)\n    - [Widget modules](#widget-modules)\n      - [Bluetooth](#bluetooth)\n      - [Clock](#clock)\n      - [Cpu](#cpu)\n      - [Disk](#disk)\n      - [Headset](#headset)\n      - [Network](#network)\n      - [Volume](#volume)\n      - [Weather](#weather)\n      - [Workspace](#workspace)\n  - [Icon_size](#icon_size)\n  - [Spacing](#spacing)\n- [License](#license)\n\n## Installation\n\n### Install dependenices\nInstall all dependencies needed to build ngb.\n\n#### Arch Linux\n```console\nsudo pacman -S python python-pip git gtk4 gtk4-layer-shell glib2 gobject-introspection\n```\n#### Fedora\n```console\nsudo dnf install python3 python3-pip git gtk4-devel gtk4-layer-shell-devel glib2-devel gobject-introspection-devel\n```\n\n### Install ngb\nBuild from source and install.\n```console\npip install git+https://github.com/nudelkurre/ngb.git\n```\n\n### Nixos\n\n#### Run from terminal\nTo run latest version from main branch without installing ngb\n```console\nnix run github:nudelkurre/ngb#ngb\n```\n\nTo run latest commits\n```console\nnix run github:nudelkurre/ngb/develop#ngb\n```\n\nTo run specific release\n```console\nnix run github:nudelkurre/ngb/\u003cversion\u003e\n```\n\n#### Add to nix flake\nAdd flake as input to flake.nix\n\n```nix\ninputs = {\n    # Use this for latest release\n    ngb.url = \"github:nudelkurre/ngb\";\n\n    # Use this for latest commits\n    ngb.url = \"github:nudelkurre/ngb/develop#ngb\"\n\n    # Use this to pin to specific version\n    ngb.url = \"github:nudelkurre/ngb/\u003cversion\u003e\";\n  };\n```\n\nAdd the ngb overlay to nixpkgs.overlays to be able to get the package inside nixpkgs\n```nix\nnixpkgs.overlays = [\n    ngb.overlay\n];\n```\n\nTo be able to configure ngb via home manager, import the module inside your home manager modules\n```nix\nhomeConfigurations = {\n  myUser = home-manager.lib.homeManagerConfiguration {\n      modules = [\n          ngb.outputs.homeManagerModules.ngb\n      ];\n  };\n};\n```\n\n## Configuration\nThe configuration is by default a json formated file stored in $XDG_CONFIG_HOME/ngb/config.json if XDG_CONFIG_HOME is set, else it is stored in $HOME/.config/ngb/config.json.\n\nIf a configuration file is not found when ngb first run, it will create one in the right location specified above and looks like this:\n\n```json\n{\n  \"bars\": [\n      {\n          \"output\": \"DP-1\",\n          \"gaps\": 2,\n          \"height\": 25,\n          \"layer\": \"bottom\",\n          \"widgets\": {\n              \"left\": [\n                  {\n                      \"config\": {},\n                      \"module\": \"workspace\"\n                  }\n              ],\n              \"center\": [],\n              \"right\": [\n                  {\n                      \"config\": {\n                          \"mountpoint\": \"/\"\n                      },\n                      \"module\": \"disk\"\n                  },\n                  {\n                      \"config\": {\n                          \"interface\": \"eth0\"\n                      },\n                      \"module\": \"network\"\n                  },\n                  {\n                      \"config\": {},\n                      \"module\": \"volume\"\n                  },\n                  {\n                      \"config\": {\n                          \"timeformat_normal\": \"%H:%M:%S\",\n                          \"timeformat_revealer\": \"%Y-%m-%d\"\n                      },\n                      \"module\": \"clock\"\n                  }\n              ]\n          }\n      }\n  ],\n  \"icon_size\": 20,\n  \"spacing\": 5\n  }\n```\n\nIt is possible to specify a different path with the \"--config\" flag. The specified file can be in json, toml or yaml format and is defined by either the file extension or can be specified with the \"--type\" flag (the flag takes precedence over file extension if both is found). This can also be used to create the default configuration file to create the file in any of the other formats than default json.\n\n### bars\nBars is a list of bars containing objects with settings for each bar.\n\n#### output\nOutput sets the output to show the bar on.\n\n#### gaps\nSet spacing to use around the bar. Set per bar and can be different for each bar.\n\n#### height\nSet the height to use for the bar. If font size is to big, the bar will get bigger to fit the text.\n\n#### layer\nSet the layer shell layer to show the bar at. Valid layers are background, bottom, overlay and top.\n\n#### widgets\nWidgets is an object that keeps three lists, center, left and right. The lists contains the widgets to show on respective position of the bar.\n\n#### widget modules\nEach widget module contain an object with a module name and config object.\n```json\n{\n  \"config\": {},\n  \"module\": \"module_name\"\n}\n```\nEvery widget can set the following for each module.\n|configureation key|description|data type|default|\n|---|---|---|---|\n|icon_size|Set the icons font size|Integer|20|\n|spacing|Number of pixels to set as spacing between icon and text|Integer|10|\n|timer|How often the module should be updated in seconds|Integer|1|\nIf icon_size and spacing is not set in the module, it will use the global set value or if not set at all, will use the default value (icon_size=20, spacing=5)\n\n##### Battery\nShow battery level of connected laptop battery and show charging status.\n\n##### Bluetooth\nShow battery level of all connected bluetooth devices.\nBluetoothctl is needed to be in $PATH to work.\n\n##### Clock\nShow a clock and can be configured to show different formats and also show additional format if clicked on. If right click on clock, a calendar is shown in a dropdown.\n|configureation key|description|data type|default|\n|---|---|---|---|\n|timeformat_normal||String using date format|\"%T\"|\n|timeformat_revealer||String using date format|\"%A %Y-%m-%d\"|\n|show_heading||Boolean|True|\n|show_day_names||Boolean|True|\n|show_week_numbers||Boolean|True|\n\n##### Cpu\nShow current cpu usage in percent\n\n##### Disk\nShow the percentage used of the chosen mountpoint, and if clicked on will show a dropdown with which mountpoint it shows, a bar visualize disk usage and text showing amount used/total space.\n|configureation key|description|data type|default|\n|---|---|---|---|\n|mountpoint|Mountpoint to use|String|\"/\"|\n\n##### Headset\nUse the command headsetcontrol to show current battery level of compatible headset.\nheadsetcontrol is needed to be in $PATH to work.\nHave a minimum timer set at 5 seconds\n(May remove this in the future since it is unstable and can crash the headset controller if to many requests is sent to the headset at a low interval)\n\n##### Network\nShow ipv4 address of chosen interface. When clicked on show a dropdown with interface name, mac address, ipv4 address and ipv6 addresses of interface.\n|configureation key|description|data type|default|\n|---|---|---|---|\n|interface|Set interface name to show|String|\"\"|\n|show_public_ip|Set to show public ip|Boolean|True|\n|show_ipv6|Set to show ipv6 address|Boolean|False|\n|show_disconnected|Set to show disconnected network interface|Boolean|False|\n\n##### Volume\nShow the current volume of default sink. By default, click on widget will show a dropdown with all sinks and be able to use slider to set volume, middle click will mute and right click will change default sink to the next in the list. Left click and middle click action can be swapped in config.\nwpctl is needed to be in $PATH to work.\n|configureation key|description|data type|default|\n|---|---|---|---|\n|click_to_mute|Swap left and middle click action, to make left click toggle mute|Boolean|False|\n|muted_icon|Set icon to show when a sink is muted|String|\"󰝟\"|\n|unmuted_icon|Set icon to show when a sink is unmuted|String|\"󰕾\"|\n\n##### Weather\nShow current temperature of specified city. Left click will show a dropdown with city name, current temperature, current wind speed and current weather description.\nCurrently only gets the data from SMHI API (for Sweden) and YR.no (for nordic countries). \nOpenWeatherMap (for global) is planned for future.\n|configureation key|description|data type|default|\n|---|---|---|---|\n|city|City to show weather info for|String|\"\"|\n|api|Set which api to use|String|\"YR\"|\n|show_big_icon|Set to show larger weather icon in dropdown|Boolean|False|\n|big_icon_size|Set size of large weather icon|Integer|60|\n\n##### Window Title\nShow active windows title. Click will show a dropdown with all windows and click on a title in the dropdown to change focus to that window (only for Niri and SwayWM)\n|configureation key|description|data type|default|\n|---|---|---|---|\n|hide_no_focus|Set to hide the widget if no window is focused|Boolean|False|\n|hide_on_close|Set to close the dropdown after closing a window|Boolean|True|\n|title_max_length|Set to limit the max amount of character a window title can show|Integer|200|\n\n##### Workspace\nShow active workspaces and highlight the focused one. Can be set to show only a specific monitor or show all workspaces from all monitors.\nWorks with SwayWM, Hyprland and Niri (requires xwayland-satellite for the moment).\n|configureation key|description|data type|default|\n|---|---|---|---|\n|monitor|Set either specific monitor or \"all\" for all workspaces|String|\"all\"|\n|use_workspace_names|Use workspace name set by window manager|Boolean|False|\n|default_name|Set default name to use for workspaces|String|\"*\"|\n|names|Can be used if workspace names is numbers but want to change to icons|Object of key-value pairs with strings as value|{}|\n\n### gaps\nSet spacing to use around the bar. Set per bar and can be different for each bar. Can be overridden by setting it on a bar.\n\n### height\nSet the height to use for the bar. If font size is to big, the bar will get bigger to fit the text. Can be overridden by setting it on a bar.\n\n### font_size\nSet a font size to use. If not set the font size set by gtk4 is used.\n\n### Icon_size\nSet icon size for every widget in all bars.\n\n### layer\nSet the layer shell layer to show the bar at. Valid layers are background, bottom, overlay and top. Can be overridden by setting it on a bar.\n\n### Spacing\nSet spacing to use for every bar. Spacing is used between each widget, between label and icon for each widget (can be overridden in each widget module, described [above](#widget-modules)) and as margin in top and bottom of dropdowns.\n\n### Corner_radius\nSet the corner radius to use for all bars. Set in pixels.\n\n## License\n\n`ngb` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnudelkurre%2Fngb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnudelkurre%2Fngb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnudelkurre%2Fngb/lists"}