You are not logged in.

#26 2020-06-11 21:18:47

damo
....moderator....
Registered: 2015-08-20
Posts: 6,043

Re: Using command-line text-editors as bl-text-editor

christopherisnow wrote:

What is the solution to use a CLI editor (e.g. nvim) in place of Geany on Lithium -- haven't the relevant files changed somewhat from previous versions of BL?

I would also be curious to change my default file browser to ranger. I suppose this is analogous.

Menu > System > Edit Debian Alternatives > bl-text-editor

Would love to (1) leave kb shortcuts as they are, and (2) have different default terminal window sizes for different apps. Currently x-terminal-emulator opens at a 1/4-screen size with `Ctl+t` but I would prefer for nvim and ranger to be full-screen.

Thanks in advance.

Edit bl-rc.xml and add new "Applications" sections for the applications you want to behave differently. openbox.org/wiki/Help:Applications

Menu > Help & Resources > Openbox


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#27 2020-06-12 04:15:47

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,951
Website

Re: Using command-line text-editors as bl-text-editor

damo wrote:
christopherisnow wrote:

What is the solution to use a CLI editor (e.g. nvim) in place of Geany on Lithium -- haven't the relevant files changed somewhat from previous versions of BL?

I would also be curious to change my default file browser to ranger. I suppose this is analogous.

Menu > System > Edit Debian Alternatives > bl-text-editor

To expand slightly, set bl-text-editor to /usr/bin/bl-cli-editor
This makes calls to bl-text-editor open a terminal with your choice of the Debian alternative "editor".
By default, on BL that's /bin/nano but in the same "Edit Debian Alternatives" you can set "editor" to vim.tiny or anything else you choose to install.

There's no equivalent mechanism for a cli file manager like ranger to be used as bl-file-manager, unfortunately, although if you looked at how bl-cli-editor works, maybe you could roll your own. If you do, please post it back here, and we'll incorporate it in BL Beryllium!

Last edited by johnraff (2020-06-12 04:17:24)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#28 2020-06-12 23:10:07

christopherisnow
Member
Registered: 2018-05-19
Posts: 36

Re: Using command-line text-editors as bl-text-editor

Thanks both, I will give it a spin and report back.

It should probably be within my limited coding capacities to write a simple bash script to get ranger going. Stay tuned...

Offline

#29 2020-06-16 15:55:07

christopherisnow
Member
Registered: 2018-05-19
Posts: 36

Re: Using command-line text-editors as bl-text-editor

Opening ranger instead of Thunar with the usual Super+f is as easy as changing the relevant line in .xbindkeysrc to

"x-terminal-emulator -e ranger"
    Mod4 + f

I also wrote a bash script ~/bin/launch_ranger based on /usr/bin/bl-cli-editor:

#!/bin/bash

x-terminal-emulator -T "${1##*/} - CLI File Manager" -e ranger "$@"

and made it executable with chmod +x.

However, it doesn't work when I call it from .xbindkeys (same line as above) or when manually added to the Debian Alternatives and selected as "bl-file-manager". 

What am I missing?

TBH I don't know how badly I need to have ranger installed system-wide as bl-file-manager. Is there any other advantage other than being able to open files with ranger in GUI apps?. Just having the keyboard shortcut is already great. Maybe being able to open ranger in a different sized terminal window via Openbox would also be nice but not essential.

On the other hand I'm kinda curious to finish this miniproject for it's own sake!

Offline

#30 2020-06-16 17:10:38

christopherisnow
Member
Registered: 2018-05-19
Posts: 36

Re: Using command-line text-editors as bl-text-editor

Well, maybe I spoke too soon. After rebooting, the Super+f, +e, and all keybindings listed below 

"x-terminal-emulator -e ranger"
    Mod4 + f

in .xbindkeys are not working. What's goin on?

Offline

#31 2020-06-16 21:24:10

damo
....moderator....
Registered: 2015-08-20
Posts: 6,043

Re: Using command-line text-editors as bl-text-editor

christopherisnow wrote:

...
in .xbindkeys are not working. What's goin on?

man xbindkeys

Perhaps you can run it manually and see any error messages (after killing it first).


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

Board footer

Powered by FluxBB