Ranger won't show image preview - terminal

some weeks ago i installed ranger on my new ubuntu machine and tried out the image preview. It did not work immediately but after some tweaks i could get the desired result.
What I did (at least what i remember)
install all dependencies (w3m, pillow)
change TERM (back) to "xterm-kitty" (i'm using Kitty)
set preview_images true
set preview_images_method w3m
i know, it should be "kitty", but that did not work)
After i realized, that there was no way to get it to work with tmux, iwas disapointed and did not use ranger that much.
Now i switched to a tiled WM and use ranger a lot, but the image preview is not working anymore.
It would be nice if someone could help me out.
Here are the relevant parts of may ranger config:
# Use one of the supported image preview protocols
set preview_images true
# set preview_images_method w3m
set preview_images_method kitty # does not work in tmux
you can find the whole config at my dotfiles
Edit
Note this is not about apache-ranger

Related

Removing Neovim window focus

I love the Gruvbox theme. The only problem I've ever had with it was when it started to cause a W18 warning on all of my newly opened buffers so, I finally decided to get rid of it. I've replaced it with the Tokyonight theme, but I've come across another issue: it doesn't seem to override the settings for transparency nor dim-inactive like the example config says it would. Frustrated and incompetent, I'm asking you guys at SO as a last resort if there is a way to remove the inactive pane/buffer dim using the solely the Neovim API in Lua?
Updating the Tokyonight config to the following
The above configuration resulted in this which is anything but what it's supposed to do.
This is what I expect to happen (with the statusbar visibility toggling on focus and other default behaviors)

Strange lines appearing instead of cells when rendering jupyter notebook from a remote server [duplicate]

I am using quite large notebooks in JupyterLab to run Python code. They contain many Markdown cells with text and some images. The problem I am having is that when I close the Notebook and reopen, some of these cells have collapsed and can't be expanded (show as a horizontal line). Sometimes I will get a message telling me how many cells are hidden but they can't be expanded. Others seem to have disappeared completely.
Occasionally, I can get some cells to expand if I reload the page. I thought it may have been because I had lots of Markdown header levels and those too far down the hierarchy were collapsing. However, even removing many of the header levels has not solved the problem.
Have others had this issue and has anyone been able to resolve it? Thanks!
Edit: Thank you Vinson. My Jupyter Version is Version 3.1.7, running on Google Chrome (Version 92.0.4515.159 (Official Build) (64-bit)), on Windows machine.
This was fixed in JupyterLab 3.1.10 (this PR) released on 2021-09-01 - the issue should disappear after you upgrade and restart JupyterLab:
# (or conda-forge equivalent if you use conda/mamba)
pip install -U "jupyterlab>=3.1.10"
If however, you are unable to update right now, you can use a workaround of disabling the placeholder rendering, by going to Advanced Settings Editor -> Notebook and in the right pane (User Preferences) paste the following:
{
"renderCellOnIdle": false,
"numberCellsToRenderDirectly": 10000000000000
}
then press save and reload JupyterLab.
I do not know how to fix this with conda. But option 2 is working for me. For those who are not family with the deep tech, you can try these, two extran configure there are shown the line numbers.
{
"markdownCellConfig": {
"lineNumbers": true
},
"codeCellConfig": {
"lineNumbers": true
},
"renderCellOnIdle": false,
"numberCellsToRenderDirectly": 10000000000000
}

How to remove an application "tile" from Anaconda Navigator Home tab

I have a bunch of apps that I will never use (GLueviz, Orange3, Rstudio) that I would like gone from my Home tab. They are not installed, but there is no way to remove the tile for the app. The gear icon isn't going to do it for me.
I dug into the config file ~/.anaconda/navigator/anaconda-navigator.ini and nothing obvious there. Oddly it says that vscode_enable = False yet VS Code does appear as a tile.
I'm running 1.9.12 individual edition on MacOS Catalina.
On navigator 2.1.1, I was able to comment out the two lines for Datalore and IBM Watson in ~/opt/anaconda3/pkgs/anaconda-navigator-2.1.1-py39_0/lib/python3.9/site-packages/anaconda_navigator/api/external_apps/__init__.py.
web_apps: 'typing_extensions.Final[typing.Mapping[str, WebAppInitializer]]' = {
#'datalore': DataloreApp, # noqa: F405
#'ibm_watson': IBMWatsonApp, # noqa: F405
}
Based on the Anaconda docs https://docs.anaconda.com/navigator/tutorials/custom-tiles/, you can create a yaml file that will allow you to disable some of the tiles.
In practice, I've found this works for some apps, but may not work for all. For example, some of the gnuradio apps go away, but many do not (e.g., gnuradio-build-deps).
Create a yaml file at ~/.anaconda/navigator/applications/ (MacOS)
Add the code to disable an application from view:
glueviz:
is_available: false

How can I permanently setting the Screen Layout (arandr) in Manjaro i3?

I recently installed Manjaro i3 on my laptop and tried to connect an external Monitor, to extend the main Screen when it's plugged in and just use the single monitor mode when not.
This seems to mostly work using arandr. Unfortunately I have to reapply the arandr settings again on every boot to get my layout back, since it gets reset every time.
I have tried exporting the arandr commands to .xinitrc and /root/xinitrc, I have tried editing the xorg confs and I have tried putting it into .screenlayout, but with no result.
So how can I permanently set my screen resolution and layout?
I case somebody comes across this question:
1. open arandr
2. Set your desired layout
3. Export it
4. open /etc/lightdm/xsession
5. Add the exported code before the last line
6. reboot

Programming a Gnome extension to disable left edge drag gesture to show the app picker

My apologies to all, if this is in the wrong group.
We’d like to use Fedora 23 in Kiosk mode, but there is was a recently added left edge swipe feature that was added to Gnome Shell (https://github.com/GNOME/gnome-shell)that cannot be disabled easily.
https://github.com/GNOME/gnome-shell/commit/9c4ffc4bf353fe9c64368f3e194e38b0e8f61311
As far as I can tell, our options are:
1) Write an extension to fix this — My favorite
We spoke to the original author, who recommended removing the gesture via an extension.
We have tried writing an extension, but cannot figure out a way to iterate over the gesture list in global.stage to remove it.
(These gestures were added using global.stage.add_action(gesture) and can be removed using global.stage.remove_action(gesture).)
The author has since stopped responding to our emails :(
Any advice on this would be great!
2) Check out the version that we’re on, comment out the code, recompile
and install onto our machines
This sounds great! That way we can fix other bugs also. Looking at the README file
https:// github.com/GNOME/gnome-shell/blob/master/README
It says:
For more information about GNOME Shell, including instructions on how
to build GNOME Shell from source and how to get involved with the
project,
See https:// wiki.gnome.org/Projects/GnomeShell
So, we’ve followed it to this page:
https:// wiki.gnome.org/Newcomers/BuildGnome
And this tells us to check out JHBuild, but we can’t seem to figure out where the gnome shell code is checked out on the machine when we use JHBuild.
If there’s an easier way to make/install, that’d be great. We probably just followed the wrong recommended link.
3) Roll back to an earlier version of gnome shell
But this brings us back to the problem of checking out the gnome shell and make/install as shown in #2.
4) Switch to KDE
We could try KDE instead of Gnome, but we've done lots of testing in Gnome already and could be a major setback.
5) Build a Fedora 22 box to get back to Gnome 3.16 — my least favorite
It’s a huge effort and we can’t be sure what’s changed and what will break. Our Kiosk software may not even run on Fedora 22. But it’s the hail mary back up plan
I work with SciComputing, and, with the help of Florian Müllner, we realized that an extension with the following Javascript code would get rid of the gestures that closed our kiosk window:
/*
* Disable all of the unwanted touchscreen gestures.
*/
function enable() {
global.stage.get_actions().forEach(a => a.enabled = false);
}
/*
* Re-enable the touchscreen gestures.
*/
function disable() {
global.stage.get_actions().forEach(a => a.enabled = true);
}

Resources