Comments (8)
@Kabouik please try v0.4.4 and let me know if the issue is fixed! :)
from handlr.
It's working, thanks a lot!
from handlr.
There's another issue though, I'm not sure if it is related to that one but since I did not notice it before, maybe you'll know better:
I noticed that you updated the README to explain how to add extra handlers, so I wanted to test. I configured handlr.toml
to my liking to use my rofi
theme, set enable_selector = true
, and then ran handlr add .mp3 sayonara.desktop
. When I click on a .mp3, cmus
is still being used by default and rofi
doesn't show up. Yet, the .toml
file is correct because if I handlr get .mp3
, then rofi
selector appears.
Another thing: if I handlr open /path/to/mp3
, it opens Audacity. I have no idea where this comes from, since Audacity is not listed in handlr list
. I guess it might be some leftovers in other mime/whatever files?
from handlr.
@Kabouik it is probably because handlr open
detects an mp3 file as audio/mpeg
, while .mp3
gets resolved as audio/mp3
.
I've fixed this in v0.4.5 by resolving the extensions through the same database that's used to guess the mime from content.
Thanks for providing useful feedback!
from handlr.
Thanks for the quick fix! Just after updating handlr
, I ran handlr get .mp3
and this time it returned audacity.desktop
indeed. I now set again cmus.desktop
as default and sayonara.desktop
as extra.
Not sure if this is a real issue or if it's caused by my hacky desktop file:
- Double click on an mp3 file in a file manager → adds mp3 to queue in
cmus
. Norofi
selector despite the option being enabled.cmus
is my default so I'm no particularly surprised, but I was assuming the selector would show up in this situation. handlr open /path\ with\ spaces/to/file.mp3
→rofi
selector. SelectSayonara
and see the program open up with the file in its play queue; else selectcmus
and see the file failing to add in the play queue, because of the spaces in the path (confirmed working without spaces). Perhaps it's an issue in my .desktop'sExec=
but if so, I would expect it to fail similarly when double clicking in a file manager.
from handlr.
@Kabouik it depends on how the file manager handles double-clicking. There's a few options
- it uses something specific like
gvfs-open
or similar, which does not callhandlr
- it uses
xdg-open
. In this case you can install https://aur.archlinux.org/packages/xdg-utils-handlr or override it manually
If you want you can let me know what DE/file manager you use and I could look into it
from handlr.
Thanks. Since I don't use Arch, I just created two aliases in my ~/bashrc
instead of creating a bash file in /usr/bin
:
alias xdg-open='handlr open "$@"'
alias gvfs-open='handlr open "$@"'
And then confirmed from command line that both aliases now call handlr
(.mp3 files invoked the rofi
selector).
The issue with files containing a space in their path was due to missing quotes in my cmus.desktop
's Exec
line. Not sure why it was working correctly from file managers and not from command line, but anyway I fixed it with:
Exec=bash -c '(! pgrep cmus && tilix -e cmus && tilix -a session-add-down -e cava); sleep 0.1 && cmus-remote -q "%f"'
Nautilus still bypasses handlr
though, I have to investigate and see what it is using by default and maybe make another alias. nnn
does the same, although it should be using xdg-open
, there must still be something I'm missing.
from handlr.
Turns out trying to be smart and making aliases instead of using a script placed in $PATH
was a very bad idea, since aliases work only directly in a shell, not when called from other programs (this is what I learnt here). Works as expected with the simple script you linked in my user $PATH
to replace xdg-open
from the base $PATH
.
from handlr.
Related Issues (20)
- Unable to open m3u with default application
- panic when mimeapps.list doesn't end with newline? HOT 1
- Compile errors due to breaking changes in Clap 3.0 betas
- Panic when mimeapps.list is not writable HOT 2
- open multiple files by spawning mulitple programs
- set handlers really by extensions, not merely by mime-type hiding behind extensions
- mimeo-style custom association file
- Panic when using '<' or '>' characters in a commented line in mimeapps.list
- handlr does not respect desktop file IDs from subdirectories
- An example of setting the default terminal within filemanagers? HOT 1
- What's the proper way of setting up handler to open telegram links?
- no handlers found for 'application/x-zerosize'
- handlr incorrectly handling `Terminal` property with launch command
- command to run a .desktop file
- Error after installing HOT 1
- Clap Error HOT 6
- Base mime on file extension not on contents HOT 1
- sphere files (.sph)
- Cancelling selection for `https://` opens Brave web browser anyway HOT 1
- Is this repo dead? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from handlr.