{"id":13533784,"url":"https://github.com/nwg-piotr/nwg-bar","last_synced_at":"2025-03-02T17:08:33.340Z","repository":{"id":42081999,"uuid":"380852889","full_name":"nwg-piotr/nwg-bar","owner":"nwg-piotr","description":"GTK3-based button bar for wlroots-based compositors","archived":false,"fork":false,"pushed_at":"2024-08-30T23:28:14.000Z","size":8192,"stargazers_count":137,"open_issues_count":3,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-23T16:07:50.657Z","etag":null,"topics":["gtk","gtk3","gui","hyprland","sway","wlroots"],"latest_commit_sha":null,"homepage":"","language":"Go","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/nwg-piotr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"publiccode":null,"codemeta":null},"funding":{"github":"nwg-piotr","liberapay":"nwg"}},"created_at":"2021-06-27T22:54:53.000Z","updated_at":"2025-02-22T23:00:37.000Z","dependencies_parsed_at":"2024-01-14T02:22:08.676Z","dependency_job_id":"65b50662-e440-41d1-95f1-9d22edc60a71","html_url":"https://github.com/nwg-piotr/nwg-bar","commit_stats":{"total_commits":55,"total_committers":8,"mean_commits":6.875,"dds":0.1636363636363637,"last_synced_commit":"1878c198dd8048cc67c67c0c401554fed862f1a7"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwg-piotr%2Fnwg-bar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwg-piotr%2Fnwg-bar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwg-piotr%2Fnwg-bar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwg-piotr%2Fnwg-bar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwg-piotr","download_url":"https://codeload.github.com/nwg-piotr/nwg-bar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241541445,"owners_count":19979122,"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","gtk3","gui","hyprland","sway","wlroots"],"created_at":"2024-08-01T07:01:23.069Z","updated_at":"2025-03-02T17:08:33.313Z","avatar_url":"https://github.com/nwg-piotr.png","language":"Go","funding_links":["https://github.com/sponsors/nwg-piotr","https://liberapay.com/nwg"],"categories":["Tools","Go"],"sub_categories":["Locking, Idle, Clipboard and Login"],"readme":"# nwg-bar\n\nThis application is a part of the [nwg-shell](https://nwg-piotr.github.io/nwg-shell) project.\n\n**Contributing:** please read the [general contributing rules for the nwg-shell project](https://nwg-piotr.github.io/nwg-shell/contribution).\n\nnwg-bar is a Golang replacement to the `nwgbar` command (a part of\n[nwg-launchers](https://github.com/nwg-piotr/nwg-launchers)), with some improvements. Originally aimed at sway, works with\nwlroots-based compositors only.\n\nThe `nwg-bar` command creates a button bar on the basis of a JSON template placed in the `~/.config/nwg-bar/` folder.\nBy default the command displays a horizontal bar in the center\nof the screen. Use command line arguments to change the placement.\n\n![image](https://user-images.githubusercontent.com/20579136/163154930-883140f3-0f69-481f-b07f-cbd4d4c75117.png)\n\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/nwg-bar.svg)](https://repology.org/project/nwg-bar/versions)\n\n## Installation\n\n### Requirements\n\n- `go` 1.20\n- `gtk3`\n- `gtk-layer-shell`\n\n### Steps\n\n1. Clone the repository, cd into it.\n2. Install golang libraries with `make get`. First time it may take ages, be patient.\n3. `make build`\n4. `sudo make install`\n\nIf your machine is x86_64, you may skip 2 and 3, and just install the provided binary with `sudo make install`.\n\nTo uninstall run `sudo make uninstall`.\n\n## Running\n\n```text\nUsage of nwg-bar:\n  -a string\n    \tAlignment in full width/height: \"start\" or \"end\" (default \"middle\")\n  -f\ttake Full screen width/height\n  -i int\n    \tIcon size (default 48)\n  -mb int\n    \tMargin Bottom\n  -ml int\n    \tMargin Left\n  -mr int\n    \tMargin Right\n  -mt int\n    \tMargin Top\n  -o string\n    \tname of Output to display the bar on\n  -p string\n    \tPosition: \"bottom\", \"top\", \"left\" or \"right\" (default \"center\")\n  -s string\n    \tcsS file name (default \"style.css\")\n  -t string\n    \tTemplate file name (default \"bar.json\")\n  -v\tdisplay Version information\n  -x\topen on top layer witch eXclusive zone\n```\n\n*NOTE: for now the `-o` argument works on sway only.*\n\n## Templates\n\nTemplates in JSON format should be placed in the `~/.config/nwg-bar` folder. The default `bar.json` template creates\n sample Exit menu for sway on Arch Linux. You may adjust it to your system, and also add as many other templates,\n as you need. Use the `-t somename.json` argument to specify the template name to use.\n\n ```json\n [\n  {\n    \"label\": \"Lock\",\n    \"exec\": \"swaylock -f -c 000000\",\n    \"icon\": \"/usr/share/nwg-bar/images/system-lock-screen.svg\"\n  },\n  {\n    \"label\": \"Logout\",\n    \"exec\": \"swaymsg exit\",\n    \"icon\": \"/usr/share/nwg-bar/images/system-log-out.svg\"\n  },\n  {\n    \"label\": \"Reboot\",\n    \"exec\": \"systemctl reboot\",\n    \"icon\": \"/usr/share/nwg-bar/images/system-reboot.svg\"\n  },\n  {\n    \"label\": \"Shutdown\",\n    \"exec\": \"systemctl -i poweroff\",\n    \"icon\": \"/usr/share/nwg-bar/images/system-shutdown.svg\"\n  }\n]\n ```\n\n - `label` field defines the button label;\n - `exec` field defines the command to execute on button click;\n - `icon` field specifies the button icon; you may use a system icon name, like e.g. `system-lock-screen`, or a path to .svg/.png file.\n\nUse labels with underscores (like `_Lock`, `_Reboot') to create keyboard shortcuts to the buttons. You will be able to access them with the `Alt` key.\n\n ## Styling\n\n Edit the `~/.config/nwg-bar/style.css` file to change the bar appearance. You may also specify another .css file\n (in the same folder) with the `-s somename.css` argument.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwg-piotr%2Fnwg-bar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwg-piotr%2Fnwg-bar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwg-piotr%2Fnwg-bar/lists"}