I am using a notebook as a single data analysis gui interface by means of ipywidget.
Using the widgets performs tasks and self updates the gui. The text output is a cronological log of the data analysis.
For this reason a good, although unusual target for the log would be the log console.
However the standard "down" location of Log console is inconvenient because of the browser aspect ratio, with limited vertical space and lots of horizontal space.
For this reason i would like to relocate the log console to the right sidebar.
I found a template in Interface Customization. Something like
,
"layout": {
"single": {
"Log Console": { "area": "right" },
}}
I think I should place this in the Jupyterlab Shell but I cannot find where this is.
Don't reinvent the wheel, just use this jupyterlab extension:
SideCar - A Right Vertical Bar for JupyterLab
Related
I work in an environment where we have to have a security classification banner displayed at the top of each monitor on our Gnome Desktops. Currently, I am using a Perl/Tk window to display the classification of the system. However, that window cannot be moved because of the way it is built (no decorations) and occasionally overlays open windows making it difficult for users to manage those windows.
I would like to be able to do something different, but I'm not sure where to start. Three ideas I have are this:
An icon or something in the Top Bar showing the classification
A banner, like the Top Bar, that sits above the Top Bar
A window, like I already have, but relocatable
I figure the first option would be easiest, but since the Top Bar isn't shown on every monitor, that may not be the best option. I don't even know if the second option is even possible. The third option would require me to use something other than Perl/Tk but that's the only language I'm fluent in at the moment.
So I'm looking for suggestions or examples or Gnome extensions I can use to solve this problem.
Thanks.
There is a classification-banner python utility at https://github.com/fcaviggia/classification-banner. It's no longer maintained, but we've been using it without change for a few years now. It's OK. One problem is that it doesn't "shrink" the desktop screen, so application windows can overlap it; it's set to Always On Top, but it would be nicer if it actually couldn't be overlaid at all.
A simple solution, of sorts, would be to change the desktop background image. This can have issues if you're displaying on multiple resolutions (I don't know if Gnome supports SVG for such purposes) and of course it can be obscured by windows covering it.
Older versions of Gnome let you create multiple bars that worked perfectly, but that disappeared - along with many other customizations - in Gnome 3.
I was looking for a way to get the location of the active window on my screen when I stumbled upon a post in SO that had the code for me, but I got stuck trying to figure out what it did. The xlibs docs (for python) doesn't seem very helpful either. Going through https://tronche.com/gui/x/xlib-tutorial, it provides a link to https://tronche.com/gui/x/xlib-tutorial/screen-and-root-window.html which, based on the URL, looks like what I'm looking for but sadly it gives me a "Page Not Found".
So, what does "The screen root window" refer to? Also, is there a better place I can look for xlib resources?
X window system organizes its display into a hierarchy of windows.
By default, X creates one window the size of a physical screen. This is called the "root window" and its purpose is typically to provide a default background in cases when there is nothing else covering that part of the screen. When root window is empty, X will (at least in the older versions) display a white-black checkerboard pattern.
In most graphical environments the root window is typically used for desktop background or for screen savers. When rendering the output, the X first paints the root window into a framebuffer, followed by all the nested elements. The nested elements are the "normal" windows - they are painted over the parent by covering parts of it, which is what in the end gives you the impression of "windows on a background".
Here I am attempting to expand the DDL and select one of the options. I spied and built my BP application on my monitor and when testing on my laptop all the regions are slightly off. All elements spied in Browser mode are fine. In the region editor I have tried changing the Location Method to Image and the Position to Anywhere, which works when the using the monitor and the view has scrolled but unfortunately this does not resolve the region issues on my laptop. I have checked previous threads and I don't think zoom is the issue.
Highlighting the region when using my monitor:
Highlighting when on laptop:
Does anyone have any suggestions?
Thanks
This typically happens for zoom settings on your browsers. Double check your zoom is set to 100% for both browsers.
Can confirm on my machines the zoom settings are different but then align when both set to 100% zoom.
For using region mode we have to check the following things to make sure it works a correctly.
Screen resolution used while spying a region. Set the same screen resolution while running the process.
Use the tolerance property 60%.
If image is not visible on screen, use some static labels and spy them first through html mode. Focus the label, so that the region element gets visible in screen
Region mode elements takes time to identity. make sure to apply appropriate wait time.
I've tried searching for this, and the closest related question that I could find was from 3+ years ago and had to do with the incognito window being dark, while a normal chrome window was light back then.
Now that we have the ability to have a light or dark mode browser, it's hard to find an icon design and color that looks good for both light and dark modes. Here's an example:
In the image above you can see that the first and third icons are black, so they are hard to see when using dark-mode. The middle icon (the one I'm using for my extension)looks great on dark mode, but terrible on light mode. See below:
So does anyone know if there is there a way to detect the browser mode (light or dark) and swap out the icon?
Thanks to wOxxOm I was able to figure this out.
First, I needed to create a content script (which I called toggleIcon.js) and add it to the manifist.json file.
Then I added the following to toggleIcon.js - which sends scheme: "dark" to my background.js file if window.matchMedia matches prefers-color-scheme: dark.
Then in my background.js file I listen for that message, and if request.scheme == "dark" I use chrome.broserAction.setIcon to change the paths for each of my icons to the dark version.
This effectively overrides my original icon paths as declared in the manifest.json file (as shown below).
The only downside I see is that this requires a content_script, which if you want your extension to work on any page, requires you to also add "matches": ["<all_urls>"] to your extension, which slows down the approval process. Which is why in my comments above I mentioned I had been avoiding using a content_script.
Also, I think it makes sense to use the version of your icons that work best on light-mode as your default, because I think the chrome extension page will pull from these for some of the icons they use (and that page has a white background). As an example, here's how my old icon looked (not enough contrast).
Hopefully this helps someone else!!
I am creating a terminal-based RPG game. Recently, due to issues with the CMD (flickering when refreshing and other problems) I decided to move to curses.
I encountered issues with screen capacity during, say, long dialogues. In the CMD the screen just scrolled automatically - and that is what I am looking for.
My approach was as follows. I have a number of scripts containing classes and functions grouped according to functionality (such as ones pertaining to the board, to the player, NPCs, general utility functions script etc.). All of them also require access to some shared variables and objects; I group those in a shared.py script and subscribe the remaining scripts to it; the portion of that script relevant to the display mechanism looks like this:
shared.py
import curses
sc = curses.initscr()
scr = curses.newpad(1000,1000)
scr.scrollok
And for refreshing I use:
shared.scr.refresh(0, 0, 0, 0, shared.sc.getmaxyx()[0] - 1, shared.sc.getmaxyx()[1] - 1)
But at the moment, when the display fills up, the new content is, I believe, still being dumped into the pad, but is not visible on the display. I could probably come up with a way of shifting the arguments of refresh() so that the bottom line of the display is always coincident with the most recent line added to the pad, but that still only gives me one screen's worth of visibility.
Is it possible to print the contents of the pad into the window in such a way so that the old contents are retained and accessible by scrolling up? Effectively, I want to be able to keep adding lines to my display and as it fills up, I want more display area to be generated and the old content that no longer fits inside the display to move out through the top edge of the display (but for it to still be accessible by scrolling).