darkhz / bluetuith Goto Github PK
View Code? Open in Web Editor NEWA TUI bluetooth manager for Linux.
License: MIT License
A TUI bluetooth manager for Linux.
License: MIT License
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
Lines 103 to 108 in a088dae
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!
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?
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.
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
Default passphrase display until the device is connected, or make it configurable.
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 :)
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:
I might get something like this:
This is obviously not a big deal at all, but I thought it was curious. Love the application!
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.
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?
The current objective is to make the app cross-platform (Linux, macOS, Windows mainly).
(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.
Maybe wait until the tinygo/bluetooth library becomes mature, and then use its APIs.
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.
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
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.
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.
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
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.
Thanks.
Hello,
FreeBSD does not have any thing like this great tool, so would you port this tool to FreeBSD
I hope you find this a good point
Thanks
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.
> wget https://github.com/darkhz/bluetuith/archive/refs/tags/v0.1.2.tar.gz
> tar xvf v0.1.2.tar.gz
> cd bluetuith-0.1.2/
> go build .
> ./bluetuith
Error: Could not initialize bluez DBus connection
> file bluetuith
bluetuith: Mach-O 64-bit executable x86_64
Hi!
Can someone please share an example how a proper "config" for bluetuith should look like.
Thanks and cheers.
PS: Great tool, using it every day
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.
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 I'm stupid, I just tried h
or ?
keybinding to show all available keybindings for the current selection would be handy too, though that would likely require more work?h
but not ?
.
when i recover system, i always reconnected my bluetooth,
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?
I don't use OBEX, and don't plan to, but use bluetuith constantly for managing bluetooth headsets and other peripherials. The warning on start is quite annoying :)
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?
Would be nice to have an option to use the XDG Desktop Portal file dialogue to be consistent with the rest of the desktop.
Whilst pairing a keyboard (MX keys) entering a code on the keyboard is customary. This code is displayed in the bluetuith interface - display time is very short though.
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.
I wasn't aware that the badge referred to where I could install this from. Maybe this one could be used instead? But at the bottom of the README instead.
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.
The new release of bluetuith-bin on the AUR will not install due to SHA256 checksum not passing.
I'm having issues connecting an MX Master 3B to my host.
s
to scanc
to connectMouse connects, and immediately disconnects.
Select the device, remove it from the list, power cycle it and put it in pairing mode again.
s
to scant
to trust and press c
to connectMouse 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.
I am so used to that, always have to search for Q ^^
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?
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
:
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.
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 :)
Hello,
when I have bluetuith opened in a terminal window and click on the empty space below the device list, the first device is selected. I would prefer if the previous selected device would stay selected.
Sorry for not investigating this issue in more detail
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.