Giter VIP home page Giter VIP logo

bluetuith's People

Contributors

darkhz avatar gordoncyu avatar isti115 avatar jubalh avatar katexochen 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  avatar  avatar  avatar  avatar

bluetuith's Issues

Keybind quit is set to Shift-q (Q) and not q as the documentation says

Love the tool, I just switched from an older version of bluetuith, and couldn't exit because q didn't work. I looked up the documentation which still mention that the key is q, however in the menu and source it is set to Q. It isn't really a bit deal, I'd be happy to change either if needed =D

KeyQuit: {
Title: "Quit",
Context: KeyContextApp,
Kb: Keybinding{tcell.KeyRune, 'Q', tcell.ModNone},
Global: true,
},

FEATURE REQUEST: Add vimkeys for navigating up/down

Hello! I was wondering if it would be possible to add J & K as keys to move up and down in the TUI besides the arrow keys, since those keys are currently not in use. I found the keybindings file, and might make a PR myself, but if the maintainer is able to implement this, that would be easier. Just a thought!

Menu close delay

After opening the menu with Ctrl+m, I close the menu with Esc. After pressing Esc there is a one second delay before the menu closes. What is the cause of this delay? Can it be removed?

Question about theme colours

Wonderful app. Thanks for making it!
Forgive my ignorance, but which colors conform to standard terminal colors 0-15? I'm just trying to make bluetuith conform to my pywal setup.

Thanks.

Longer passphrase display

When connecting to a bluetooth device, the passphrase is displayed in the bottom right corner. But it disappears after 1s. That's way too short and I always end up connecting to a new device via bluetoothctl

Proposal

Default passphrase display until the device is connected, or make it configurable.

[FEAT] Supporting Vim style navigation and keymap

Description

Vim style navigation is broadly considered something as general feature for most of TUI application. The existing conventional navigation do not conflict with Vim navigation. So why not?

NOTE: I am guessing the maintainer is not a fan of Vim, so that's why the description might seem like a sales pitch :)

Order of help menu sections is not deterministic

Repeatedly opening and closing the help menu, I notice that every so often the sections are ordered differently from what appears to be the default/normal/correct order.

So, e.g., instead of:

image

I might get something like this:

image

This is obviously not a big deal at all, but I thought it was curious. Love the application!

Suspension and Disconnect

Works great, better than blueman for the new distros adopting it now; However, just as blueman does, after a while in suspension it disconnects and you have to pair it again..... in my case with a keyboard.

Authentication aborting

Hi, this project looks super interesting!

I tried to use bluetuith to connect to a flipperzero, which requires a code for pairing, but unfortunately it didn't work. The authentication code was displayed for about a second on the flipper and then the bluetuith returned Error: Authentication cancelled. Is pairing with authentication supposed to work?

Cross-platform interoperability

The current objective is to make the app cross-platform (Linux, macOS, Windows mainly).

The requirements are:

(a) Basic device interaction (connect/pair/authentication)
(b) OBEX support (for file transfer)
(c) Control remote playback / change audio profiles
(d) Networking (PANU/DUN)

Since the APIs differ across platforms, and there is no mature library (that I know of) that can handle these requirements, I would like some suggestions from the users/community on how to proceed with this.

For example: tinygo/bluetooth has limited cross-platform support, and its APIs aren't mature. Also, OBEX, remote playback and networking features are not present in the library, and it would be tedious to implement from scratch.

Some ideas:

tinygo/bluetooth

Maybe wait until the tinygo/bluetooth library becomes mature, and then use its APIs.

Qt

The Qt Bluetooth library has broader support for various platforms.

Using the Qt bindings for Golang (this isn't active apparently, a newer fork of this will be used), the Qt Bluetooth APIs could be leveraged.

The caveat is the building process (cross-compilation). Binary sizes may be bigger, but there are methods to reduce the size.

Any more ideas/opinions from the community will be much appreciated.

cannot print version without dbus connection

In some situations, dbus isn't available but I still would like to check bluetuith's version. When checking the version of a tool, I'd expect the tool to not do much beside printing a simple embedded string. Right now, this fails with

$ bluetuith --version
[!] Could not initialize bluez DBus connection

Error: Could not setup bluez OBEX agent

Hi I just installed the binarie on a Arch linux set up and I received the error "Error: Could not setup bluez OBEX agent
" with no other output I am running a really small set up using awesomewm tiling window manager so this might due to dependecies but I am having issues finding whihc one should I install.

Change navigation keys?

Hi, is there some way to change the navigation keybindings? I've got a Nordic keyboard setup which means that the standard h j k l has to be replaced into j k l ö, as it will otherwise defeat the purpose of not using other forms of navigation.

arch install error

go installs but bluetuith command not found and installing from the release

error: missing package metadata in Downloads/bluetuith_0.0.1_Linux_x86_64.tar.gz error: 'Downloads/bluetuith_0.0.1_Linux_x86_64.tar.gz': invalid or corrupted package

Nano-style on-screen help by default

Thanks a lot for the project. It's already at the top end of Linux bluetooth interfaces I have used in terms of comfort for me. I wonder whether it would be possible to display the keybindings by default like nano does? An equivalent of -x and set nohelp could be added.

how can auto scan

when i enter bluetuith

image
is just not scan

and i always enter s ,i scan

image

so how can bluetuith start and auto scan driver

hjkl to move around by default

Could we add vim-like movement by doing, by default :
h -> left
j -> down
k -> up
l -> right

It has the advantage of not forcing you to move your right hand to the arrow keys, that is why vim does it like that. It's more efficient.
Most tui applications I know have this by default so I think is good UX to have it by default here too.

Using inexistent commit for github.com/darkhz/tview

Current master points to a commit in tview which does not exist upstream:

> go run ./main.go 
go: downloading github.com/darkhz/tview v0.0.0-20240130154506-5ca91a0d158f
ui/adapter.go:12:2: github.com/darkhz/[email protected]: invalid version: unknown revision 5ca91a0d158f
> git clone https://github.com/darkhz/tview
> cd tview
> git show 5ca91a0d158f
fatal: ambiguous argument '5ca91a0d158f': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

GitHub does show this commit, but it seems to belong only in a fork: darkhz/tview@5ca91a0d158f

Using github.com/darkhz/tview v0.0.0-20240308094543-6078a888ff79 instead seems to work.

Keyboard navigation

Even though bluetuith is built around mouse support, as a TUI, it would be very nice if it could be fully controlled from the keyboard. Unfortunately, I can't seem to navigate through the three top entries or their contextual menus without clicking, be it using Left/Right arrows, Tab , or vi-bindings. Only Up and Down arrows seem to allow moving the selection among known devices.

Even without going too complicated, just allowing selecting those entries with Left/Right arrows or Tab/Shift+Tab, and showing/hiding their contextual menus with Return/Escape would be very useful. A h or ? keybinding to show all available keybindings for the current selection would be handy too, though that would likely require more work? I'm stupid, I just tried h but not ?.

Quit Menu

Wouldn't it much easier if it would quit as soon as I pressed 'y' instead of having to type 'y' and then press enter?

new version cannot close

when i close bluetuith, use q, or ctrl c is not work
so i just use kill command.

and i kill bluetuith.
it show look this
image

cannot run anything

Show aliases on device list

Bluez supports aliases for devices. I currently have three devices of the same model, and aliases would be a good way to distinguish them. Would it be possible to add a setting to show aliases instead of the device name on the menu?

Release binaries not working on Guix System

I tried to package bluetuith for Guix System but I am a newbie and it turned out to be a bit more involving than I hoped because some dependencies need to be packaged too. This is as far as I got after using guix import go github.com/darkhz/bluetuith:

(define-public go-github-com-darkhz-bluetuith
  (package
    (name "go-github-com-darkhz-bluetuith")
    (version "0.1.2")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/darkhz/bluetuith")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0l9wdq5ja7d6c1l4dxy5r33bsfs1rimcri15q76mjdfmvrnwmplj"))))
    (build-system go-build-system)
    (arguments
     '(#:import-path "github.com/darkhz/bluetuith"))
    (propagated-inputs `(("go-golang-org-x-text" ,go-golang-org-x-text)
                         ("go-golang-org-x-term" ,go-golang-org-x-term)
                         ("go-golang-org-x-sys" ,go-golang-org-x-sys)
                         ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
                         ("go-github-com-rivo-uniseg" ,go-github-com-rivo-uniseg)
                         ("go-github-com-mitchellh-colorstring" ,go-github-com-mitchellh-colorstring)
                         ("go-github-com-mattn-go-runewidth" ,go-github-com-mattn-go-runewidth)
                         ("go-github-com-lucasb-eyer-go-colorful" ,go-github-com-lucasb-eyer-go-colorful)
                         ("go-github-com-gdamore-encoding" ,go-github-com-gdamore-encoding)
                         ("go-golang-org-x-sync" ,go-golang-org-x-sync)
                         ("go-github-com-schollz-progressbar-v3" ,go-github-com-schollz-progressbar-v3)
                         ("go-github-com-pkg-errors" ,go-github-com-pkg-errors)
                         ("go-github-com-mafik-pulseaudio" ,go-github-com-mafik-pulseaudio)
                         ("go-github-com-jnovack-flag" ,go-github-com-jnovack-flag)
                         ("go-github-com-google-uuid" ,go-github-com-google-uuid)
                         ("go-github-com-godbus-dbus-v5" ,go-github-com-godbus-dbus-v5)
                         ("go-github-com-gdamore-tcell-v2" ,go-github-com-gdamore-tcell-v2)
                         ("go-github-com-darkhz-tview" ,go-github-com-darkhz-tview)
                         ("go-github-com-wifx-gonetworkmanager" ,go-github-com-wifx-gonetworkmanager)))
    (home-page "https://github.com/darkhz/bluetuith")
    (synopsis "TUI-based Bluetooth connection manager")
    (description
     "@command{bluetuith} is a TUI-based bluetooth connection manager, which can
interact with bluetooth adapters and devices.  It aims to be a replacement to
most bluetooth managers, like blueman.")
    (license license:expat)))

So I wanted to just use one of the prebuilt binaries in the release, but this is what I get:

mat@p3-guix~/P/bluetuith $ ./bluetuith                                                                 16:44:41
exec: Failed to execute process '/home/mat/Projects/bluetuith/bluetuith': The file exists and is executable. Check the interpreter or linker?

Any ideas what could be wrong? I'm not sure how to check the interpreter or linker.

Full Repology badge?

I wasn't aware that the Packaging status badge referred to where I could install this from. Maybe this one could be used instead? But at the bottom of the README instead.

Packaging status

Some context. When I clicked on the documentation link in the bottom of the README, I assumed that the new "VIEW DOCUMENTATION" link I was seeing was actually just a link to the same page. So not only did I not click on it, I also assumed there were no installation instructions. So then I went to the Nix packages search website to see if somebody had made a package for it, which they very much had. I then wondered why that wasn't mentioned in the docs, "surely there must be more docs", I thought. After more clicking I finally decided to click on "VIEW DOCUMENTATION" out of curiosity and then saw the installation instructions at last. But still no mention of a Nix package! I had never heard of Repology, so again, didn't click on the link to it at first. Of course, once I landed on https://repology.org/project/bluetuith/versions everything made sense.

I think just putting the full Repology badge in the README would be the easiest fix for this.

Cannot connect bluetooth mouse

I'm having issues connecting an MX Master 3B to my host.

Scenario A

  1. Set mouse to pairing mode
  2. Open bluetuith
  3. Press s to scan
  4. Select the mouse from bluetuith's UI, c to connect

Mouse connects, and immediately disconnects.

Reset

Select the device, remove it from the list, power cycle it and put it in pairing mode again.

Scenario B

  1. Set mouse to pairing mode
  2. Open bluetuith
  3. Press s to scan
  4. Select the mouse from bluetuith's UI, press t to trust and press c to connect

Mouse connects, and immediately disconnects, the reconnected again and disconnects, ad infinitum.


I see this in the system logs:

[Apr 01 17:33:29] daemon bluetoothd[4180]: src/service.c:service_accept() input-hog profile accept failed for XX:XX:XX:XX:XX:XX 

I think that the mouse sends some kind of pairing request/code. I'm not sure how to debug this further.

Connected headphones don't show as connected

When I connect to my bluetooth headphone using bluetuith, they don't show up as connected. The UI shows:

MX Master 3 B (Unknown)             (Connected, Battery 50%, Trusted, Bonded) 
OpenRun Pro by Shokz (Headphones)                           (Trusted, Bonded) 

(the first device is a mouse, the second is headphones).

bluetoothctl also doesn't list the headphones:

> bluetoothctl devices Connected
Device D1:C5:F9:DC:D5:B7 MX Master 3 B

If I open pavucontrol, the headphones are listed as an available audio output, and audio playback actually does work.

I finally used d-feet to check the device's status (bus name org.bluez, object path /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX). The Connected property shows False. If I execute the Disconnect method, the headphones do disconnect, and if I execute the Connect method, they reconnect properly and do register as connected.

I can reproduce this with another pair of headphones too.

Any ideas what might be wrong?

[Solved] Cannot set adapter power state

Hello, I just installed Bluetuith, but when I try to power on the adapter I got that problem... (I cannot scan, pair or connect cuz adapter's powered off)

image

See keybindings in the application

Hello! This is great. Much easier to use than bluetoothctl, and thanks for making it.

It would be helpful if the application included an easy way to see all the keybindings; same table as the one in the README.

Here's a screenshot of how pulsemixer does it, triggered by pressing the ? key, side by side with bluetuith:

image

Text is completely invisible on common light terminal configurations

It’s very common on light terminals for white to match the default background colour exactly. As it stands, bluetuith uses bold white (␛[37;1m). This means that, in terminals like mine, almost all of the text is invisible, and the entire output of bluetuith --help.

If you’re going to default to using foreground colours like black or white, you must also set a contrasting background colour.

The vastly preferable option is not using black or white. As far as I can tell, all the places bluetuith is using bold white should be just default colour (that is, drop the ␛[37m), and almost always not bold, either (that is, drop the ␛[1m). Certainly bluetuith --help has no business setting colours.

More generally, if you’re going colouring things, here’s my advice, independent of project. I recommend that a default theme use only these styles: the default foreground and background colours; foreground colours 1, 2, 5 and 6; bold for emphasis; uncoloured invert for emphasis; and faint, italic and underline as optional enhancements which not all terminals will support. Black and white are verboten (they might each be maximum or zero contrast). Blue is somewhat risky (because of mostly-historical-but-definitely-not-entirely-gone dark themes). Yellow is fine, but bright yellow is very risky (because of light themes), so bold yellow becomes risky as it may become bright. Background colours are moderately risky, must not be used without specifying a foreground colour, and should not be used for large areas. Invert with non-default colours is generally unwise. Bright colours (8–15) are a little risky because in light themes they can be higher contrast (darker) or higher intensity (lighter). Really, the 16-colour thing is just fundamentally a very bad design that made assumptions that were never correct.

Another remark, the stuff exposed in --theme is strange and limiting. It doesn’t let you remove colours (default colour!) or styles like bold, or specify colour numbers (0–255) which is commonly preferable and likely to be much clearer.

Extra keyword for search purposes: color.

Quit application with lowercase Q

Hi!

First of all thanks for creating and maintaining this project. I use this for my Sway setup and it works great, even better than the X11 GUIs in my opinion!

I was just wondering if it's possible to set the exit/quit keybinding to lowercase Q instead of capital Q because it would be more consistent with other TUI applications like pulsemixer.

Thanks for considering!

Have a nice day :)

default quit behavior changed

Hi - I recently updated from v0.1.3 (the last updated version on the AUR for bluetuith package - not bluetuith-bin or bluetuith-git) up to v0.1.7. I noticed two changes, lowercase 'q' does not quit the application anymore. Additionally, when I do quit the application (by pressing uppercase "Q"), I am not prompted if I really want to quit anymore.

I think that lowercase 'q' should still act as a quit key. If there are good reasons for this not to happen then the help menu should be updated to reflect that uppercase "Q" is the correct key to Quit

Also since users are not prompted anymore on quit (to confirm quit), either that functionality should be added back or the confirmQuit func should be removed from the code (I believe it isn't called anywhere else).

I am happy to make the PR for these changes if they make sense. Thank you for making such a great tui for bluetooth!

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.