GithubHelp home page GithubHelp logo

nickclyde / rofi-bluetooth Goto Github PK

View Code? Open in Web Editor NEW
423.0 3.0 48.0 24.34 MB

๐Ÿ”ท A script that generates a rofi menu that uses bluetoothctl to connect to bluetooth devices and display status info.

License: GNU General Public License v3.0

Shell 100.00%
bluetooth rofi rofi-scripts i3wm polybar

rofi-bluetooth's Introduction

rofi-bluetooth

bluetoothctl rofi dmenu

Installation

Install from AUR (rofi-bluetooth-git), or:

  1. Install dependencies: rofi and bluetoothctl (provided by bluez-utils in Arch)
  2. git clone [email protected]:ClydeDroid/rofi-bluetooth.git
  3. cd rofi-bluetooth
  4. ./rofi-bluetooth
  5. (Optional) For easy access, add the script somewhere in your $PATH.

Polybar configuration

NOTE: In order to properly display the bluetooth icon, you will need to use an iconic font in your bar, e.g. Nerd Fonts

[module/bluetooth]
type = custom/script
exec = rofi-bluetooth --status
interval = 1
click-left = rofi-bluetooth &

i3 keybinding

bindsym $mod+b exec --no-startup-id rofi-bluetooth

Thanks for the inspiration!

rofi-bluetooth's People

Contributors

glostis-prl avatar indradhanush avatar jaffex avatar k4r7ik avatar kmarc avatar nhoeher avatar nickclyde avatar niksingh710 avatar notmgsk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rofi-bluetooth's Issues

Unable to apply theme with config

As of now I applied the theme modifying the main file located at /sbin/rofi-bluetooth, but ideally I'd prefer using a config or appending an argument when running the application. Is there any way to do that?

rofi-bluetooth doesn't work with Sway and Rofi (lbonn fork)

Under Arch Linux, with Sway (v1.7) and lbonn's fork of Rofi (v1.7.5), pressing the up/down arrows doesn't do anything, and all I see is the "Bluetooth:" prompt twice (three times if I type some random characters in the prompt).

When I use the script under i3 (also with lbonn's fork of Rofi), it works as expected:

rofi-bluetooth-i3-2022-10-22_12.49.45.mp4

And this is how it looks under Sway:

recording.mp4

I've also tried this fork of Rofi with other custom scripts, and I don't have this problem with them under Sway.

bluetooth label not printing in polybar

Hello I added the polybar module and have nerdfonts installed but I don't get the bluetooth label in my polybar I only get the name of the device once I connect something and that's it ... do I have to do anything else to make this work? thanks in advance

Feature Request: Case Insensitivity

Hi,

I really enjoy this script but I would love if it weren't case sensitive. I don't see how case sensitivity is of any benefit for this utility and rofi is, by default, case-insensitive.

Would you be willing to offer the option to disable case sensitivity?

Thanks

Menu exits after each state-change

Currently turning bluetooth on and connecting to a device looks like this

  1. Open rofi bluetooth
  2. Power > on
  3. Menu closes; Open rofi bluetooth again
  4. Device > Connected > yes
  5. Menu closes

The menu closes after each state-change. Is this because it takes time to perform the state-change and reflecting it live isn't feasible? It would be much more convenient if it returned to the main rofi-bluetooth menu.

Should rofi-bluetooth accept a -theme arg and set it on rofi_command?

In order to use a consistent theme, I hardcoded -theme PATH_TO_MY_ROFI_THEME_FILE into rofi_command. Should the script accept a -theme flag and modify rofi_command as a result based on the value of that flag?

Edit: In case this makes sense, I'd be happy to send in a PR. ๐Ÿ˜„

cannot install with `paru` from the AUR

hello there ๐Ÿ˜‹ ๐Ÿ‘‹

just wanted to report a little bug trying to install this tool from the AUR with the paru AUR helper ๐Ÿ˜‰

> paru rofi-bluetooth-git
1 aur/rofi-bluetooth-git r33.9d91c04-2 [+9 ~0.00]
    A script that generates a rofi menu that uses bluetoothctl to connect to bluetooth devices and display status info
:: Packages to install (eg: 1 2 3, 1-3):
:: 1
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...

Aur (1) rofi-bluetooth-git-r33.9d91c04-2

:: Proceed to review? [Y/n]:

:: Downloading PKGBUILDs...
 PKGBUILDs up to date
 nothing new to review
fetching devel info...
==> Making package: rofi-bluetooth-git r33.9d91c04-2 (Thu 14 Sep 2023 06:51:34 PM CEST)
==> Retrieving sources...
==> ERROR: /home/amtoine/.cache/paru/clone/rofi-bluetooth-git/rofi-bluetooth is not a clone of https://github.com/nickclyde/rofi-bluetooth.git
    Aborting...
error: failed to download sources for 'rofi-bluetooth-git-r33.9d91c04-2':
error: packages failed to build: rofi-bluetooth-git-r33.9d91c04-2

Tagged Releases

It would be nice for downstream distros if there were a release tagged in git/GitHub.

Polybar module toggles continuously when one bluetooth device is connected

For some reason the polybar module using rofi-bluetooth --status, disappears and reappears periodically with the time interval set in the polybar module when one device is connected. However, when two devices are connected, it does not toggle.

Some context:

$ polybar --version
polybar 3.5.4

Polybar module config:

[module/bluetooth]
type = custom/script
exec = rofi-bluetooth --status
interval = 1
click-left = rofi-bluetooth &
format-background = ${color.mb}
format-padding = ${layout.module-padding}

Rofi-bluetooth version:

$ yay -Q rofi-bluetooth-git
rofi-bluetooth-git r18.3b85658-3

While I don't know exactly what caused this behaviour, I was able to fix it by adding

        printf "\n"

at this line.

So I assume when one device was connected, the buffer did not flush properly half of the time.

P.S. this behaviour started after updating this morning.

'$1: unbound variable' in the line 'case "$1" in'

I can run the script from the command line just fine. However, I am running it on NixOS, and am trying to run it using an overlay. When I do so, I get the following error:
$1: unbound variable

refering to this line
case "$1" in

I think it is a bug with the script, and not the setup in NixOS.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.