{"id":24109394,"url":"https://github.com/mbugert/tailscale-polybar-rofi","last_synced_at":"2025-06-16T13:10:43.921Z","repository":{"id":92269617,"uuid":"487466622","full_name":"mbugert/tailscale-polybar-rofi","owner":"mbugert","description":"Select and show tailscale VPN status with rofi and polybar","archived":false,"fork":false,"pushed_at":"2022-12-11T17:48:58.000Z","size":142,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T22:54:43.683Z","etag":null,"topics":["polybar-scripts","rofi-menus","tailscale","vpn-connections"],"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/mbugert.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":"2022-05-01T06:49:28.000Z","updated_at":"2025-01-16T21:07:33.000Z","dependencies_parsed_at":"2023-06-08T05:30:36.076Z","dependency_job_id":null,"html_url":"https://github.com/mbugert/tailscale-polybar-rofi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mbugert/tailscale-polybar-rofi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbugert%2Ftailscale-polybar-rofi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbugert%2Ftailscale-polybar-rofi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbugert%2Ftailscale-polybar-rofi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbugert%2Ftailscale-polybar-rofi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbugert","download_url":"https://codeload.github.com/mbugert/tailscale-polybar-rofi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbugert%2Ftailscale-polybar-rofi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260166308,"owners_count":22968635,"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":["polybar-scripts","rofi-menus","tailscale","vpn-connections"],"created_at":"2025-01-11T00:32:57.233Z","updated_at":"2025-06-16T13:10:43.896Z","avatar_url":"https://github.com/mbugert.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Polybar Module and Rofi dmenu for tailscale\n* display [tailscale](https://tailscale.com) VPN connection status in [polybar](https://github.com/polybar/polybar)\n* enable/disable tailscale from [rofi](https://github.com/davatorium/rofi)\n    * automatically shows one option per available exit node\n\n![Polybar module and Rofi dmenu for tailscale](doc/demo.gif)\n\n## Setup\n\n### Polybar Module\n1. Put `info-tailscale.sh` somewhere on your system, for example to `~/.config/polybar/info-tailscale.sh`.\n2. In your polybar config, add:\n   ```\n   [module/info-tailscale]\n   type = custom/script\n   exec = ~/.config/polybar/info-tailscale.sh\n   interval = 10\n   ```\n   Also add `info-tailscale` to `modules-left`, `modules-center`, or `modules-right`.\n\n(The demo GIF uses `interval = 3` for added effect.)\n\n### Rofi Switcher\n1. Put `choose_vpn_config.sh` somewhere on your system, for example `~/.config/scripts/choose_vpn_config.sh`.\n2. Add a keybinding in your window manager that triggers the script. Example config snippet for i3wm:\n   ```\n   bindsym $mod+Shift+v exec --no-startup-id $HOME/.config/scripts/choose_vpn_config.sh\n   ```\n3. Run `sudo tailscale up --operator $(whoami)` once. This gives your username permission to `tailscale up` without sudo in the future (i.e. when using the rofi switcher).\n\n#### Alternative with polkit\nSupport for the `--operator` option [wasn't unanimous when it was introduced](https://github.com/tailscale/tailscale/issues/1684).\nIn case it is removed again in the future, polkit can be used as an alternative for rights elevation:\n1. Install [polkit and a polkit authentication agent](https://wiki.archlinux.org/title/Polkit#Installation).\n    * for example `sudo apt install lxpolkit` on Debian-based OS\n2. Run the agent on session startup.\n    * for example `exec --no-startup-id lxpolkit` when using i3wm\n3. Remove the `--operator` options in [choose_vpn_config.sh](choose_vpn_config.sh), and use `pkexec` for the `tailscale` invocation.\n\n### Font (optional)\nFor the door icons, I use [fontawesome](https://fontawesome.com/how-to-use/on-the-desktop/setup/getting-started).\n\n## Alternatives and Credits\n* tailscale widget for my desktop bar - tiling window manager: https://forum.tailscale.com/t/widget-for-my-desktop-bar-tiling-window-manager/623\n    * Thanks to [sidepodmatt](https://forum.tailscale.com/u/sitepodmatt) and [within](https://forum.tailscale.com/u/within) for the efficient and succinct way of obtaining the tailscale status with curl (instead of calling `tailscale status`).\n* Linux port of tailscale system tray menu: https://github.com/mattn/tailscale-systray/\n\n## Related Projects (not for tailscale)\n* Rofi-based interface to enable VPN connections with NetworkManager: https://gitlab.com/DamienCassou/rofi-vpn\n* Custom rofi menu that allows for activating and deactivating VPN connections: https://github.com/marcje/rofi-vpn\n* Polybar module for Mullvad VPN control: https://github.com/shervinsahba/polybar-vpn-controller\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbugert%2Ftailscale-polybar-rofi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbugert%2Ftailscale-polybar-rofi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbugert%2Ftailscale-polybar-rofi/lists"}