{"id":16630144,"url":"https://github.com/klafyvel/wireguard-manager","last_synced_at":"2025-10-20T00:18:08.678Z","repository":{"id":51741119,"uuid":"520461132","full_name":"Klafyvel/wireguard-manager","owner":"Klafyvel","description":"A Waybar extension to manage a Wireguard connection using Systemd and Rofi.","archived":false,"fork":false,"pushed_at":"2023-02-02T20:38:21.000Z","size":79,"stargazers_count":22,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-02T06:11:22.344Z","etag":null,"topics":["rofi","rofi-scripts","sway","swaywm","systemd","waybar","wayland","wireguard","wireguard-vpn"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Klafyvel.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}},"created_at":"2022-08-02T10:59:30.000Z","updated_at":"2025-01-03T04:16:15.000Z","dependencies_parsed_at":"2023-02-18T00:16:27.519Z","dependency_job_id":null,"html_url":"https://github.com/Klafyvel/wireguard-manager","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/Klafyvel%2Fwireguard-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klafyvel%2Fwireguard-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klafyvel%2Fwireguard-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klafyvel%2Fwireguard-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Klafyvel","download_url":"https://codeload.github.com/Klafyvel/wireguard-manager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238930130,"owners_count":19554122,"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":["rofi","rofi-scripts","sway","swaywm","systemd","waybar","wayland","wireguard","wireguard-vpn"],"created_at":"2024-10-12T04:45:14.000Z","updated_at":"2025-10-20T00:18:08.589Z","avatar_url":"https://github.com/Klafyvel.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wireguard-manager\n\nThis is a simple, stupid `waybar` extension for toggling `wireguard`. It uses\n`rofi` for password prompting, but you could use anything you like.\n\n## Screenshots\n\n![VPN switched off](screenshots/vpn-off.png)\n*VPN switched off, as seen in Waybar.*\n\n![Password prompt](screenshots/password-prompt.png)\n*Password prompt with Rofi.*\n\n![VPN switched on](screenshots/vpn-on.png)\n*VPN switched on, as seen in Waybar.*\n\n## Prerequisites\n\nYou need to be able to manage Wireguard using systemd, even though it should\nnot be too difficult to change the script to use `wg` directly.\n\nIf your Wireguard interface is `wg0`, enable the service using:\n\n```bash\nsudo systemctl enable wg-quick@wg0.service\nsudo systemctl daemon-reload\n```\n\nYou also need `rofi`.\n\n## Installation\n\nClone the repository in `~/.config/waybar/wireguard-manager`, then add this to\n`~/.config/waybar/config` :\n\n```json\n\"custom/wireguard-manager\": {\n    \"exec\": \"exec ~/.config/waybar/wireguard-manager/wireguard-manager.sh -s\",\n    \"format\": \"{icon}\",\n    \"format-icons\": {\n        \"connected\": \"\u003cspan color=\\\"#50fa7b\\\"\u003eVPN: 🔒\u003c/span\u003e\",\n        \"disconnected\": \"\u003cspan color=\\\"#ff5555\\\"\u003eVPN: 🔓\u003c/span\u003e\",\n    },\n    \"interval\": \"once\",\n    \"on-click\": \"~/.config/waybar/wireguard-manager/wireguard-manager.sh -t \u0026\u0026 pkill -SIGRTMIN+1 waybar\",\n    \"return-type\": \"json\",\n    \"signal\": 1,\n}\n```\n\nSee [Waybar's wiki](https://github.com/Alexays/Waybar/wiki/Module:-Custom) for\nmore information on how to customize this.\n\n### Toggling WireGuard \"manually\"\n\nIf you intend on turning your Wireguard tunnel on and off through other means other than clicking on this waybar module, it can be useful to set the module itself in a different fashion:\n\n```json\n\"custom/wireguard-manager\": {\n    \"interval\": 3,\n    \"return-type\": \"json\",\n    \"format-icons\": {\n        \"connected\": \"\u003cspan color=\\\"#50fa7b\\\"\u003eVPN: 🔒\u003c/span\u003e\",\n        \"disconnected\": \"\u003cspan color=\\\"#ff5555\\\"\u003eVPN: 🔓\u003c/span\u003e\"\n    },\n    \"on-click\": \"exec ~/.config/waybar/wireguard-manager/wireguard-manager.sh -t\",\n    \"exec\": \"exec ~/.config/waybar/wireguard-manager/wireguard-manager.sh -s\",\n    \"format\": \"{icon}\"\n}\n```\n\nThis is because the version of the module presented first updates itself only when clicked on, to avoid constant polling of the status of the systemd service for Wireguard. If you do use other means to set your tunnel up or down (such as `sudo systemctl stop wg-quick@wg0.service`), it is recommended to use this other version of the module, as it polls the current status of the systemd service every 3 seconds, updating the status of the module without requiring the user to click on it.\n\n## Usage\n\nWith the given configuration, the status of the connection will be updated every\n3 seconds. You can switch on/off the connection to your peer by clicking on the\nicon in Waybar.\n\n## Customization\n\nThis module is simple enough for anyone to customize it. You can change the way\nthe rofi prompt looks by editing `rofi.rasi`, or you can use any other way to\nprompt the password. You can also change the way things look in Waybar by\nediting the sample configuration.\n\n## Contributions\n\nContributions are most welcome, feel free to submit any idea or improvement you\ncan think of.\n\n## See also\n\nIf you are a NetworkManager user, maybe you should rather use\n[wireguard-rofi-waybar ](https://github.com/HarHarLinks/wireguard-rofi-waybar), which seems to offer\nway more functionalities!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklafyvel%2Fwireguard-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklafyvel%2Fwireguard-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklafyvel%2Fwireguard-manager/lists"}