How to display specific workspace to selected screen on i3 startup? - multiple-monitors

I have 8 different workspaces defined in ~/.i3/config:
set $workspace1_name 1:www
set $workspace2_name 2:programming
set $workspace3_name 3:communication
set $workspace4_name 4:files+dictionary
set $workspace5_name 5:documents
set $workspace6_name 6:graphics
set $workspace7_name 7:virtualization
set $workspace8_name 8:music
I also have 2 screens. When I start i3 on my Linux start-up, each screen shows a different workspace. The right screen is showing workspace 2:programming, but the left screen shows empty workspace 1 (not 1:www).
How can I configure i3 so that the left screen shows properly named workspace 1:www instead of 1?

According to the doc, the syntax is
workspace <workspace> output <output>
where output is the name of the RandR output you attach your screen to.
You can use one of the following RandR commands to get the output value
xrandr --current
# or if your X server supports RandR 1.5
xrandr --listmonitors
So, as an example (for my current dual screen set-up) the configuration should look like this
workspace "1: www" output DP-1

Related

Jupyter Lab Max Number of Outputs Trimmed

How to change Jupyter Lab default behaviour trimming higher number of outputs.
The message in the middle of outputs says:
Output of this cell has been trimmed on the initial display.
Displaying the first 50 top and last bottom outputs.
Click on this message to get the complete output.
There is maxNumberOutputs parameter in Jupyter Lab source code, but I didn't found any method to change it.
You can change maxNumberOutputs in settings: click on Menu bar → Settings → Advanced Settings Editor → Notebook → set maxNumberOutputs in the User Preferences tab, like:
{
"maxNumberOutputs": 100
}
save, and reload.
Using jupyter lab path to find the "User settings" path, you can write from the notebook directly by executing this writefile magic from within a cell:
%%writefile <your-jupyter-lab-path>/user-settings/#jupyterlab/notebook-extension/tracker.jupyterlab-settings
{
"maxNumberOutputs":100
}
This path may be slightly different depending on your environment and Jupyterlab version, so probably best to manually change it using this answer and then finding the file that was modified. After that you can place this code before the %%writefile command to ensure that this works on your next Jupyter session without manually going to advanced settings in the menu bar:
!file="<your-jupyter-lab-path>/user-settings/#jupyterlab/notebook-extension/tracker.jupyterlab-settings" && mkdir -p "${file%/*}" && touch "$file"
Finally, to ensure that you have correctly changed the values,use this code to test your output:
from IPython.display import display
[display(i) for i in range(75)]
where 75 outputs should not be trimmed. If it is, then try refreshing the page to re-apply the settings.

Unable to view executed cell code in Spyder's IPython console [duplicate]

I updgraded from Spyder 3 to Spyder 4 and now when I execute a cell I need to wrap a print() around whatever variable is in the last line of the cell so that the contents are automatically printed / displayed in the console. What setting do I need to revert in order to get back to the prior set up.
in case this is not clear:
display = "1 2 3 4 5"
display
{Ctrl Enter}
would ouput:
1 2 3 4 5
to the console
now it does not display anything in the console
Thank you.
What setting do I need to revert in order to get back to the prior set up?
You need to go to the menu
Tools > Preferences > Editor > Run Code
and activate the option called
Copy full cell contents to the console when running code cells.

In dwm how can I send a window to another tag from the command line?

Using the default keyboard layout in dwm, I can send a window to tag 9 using Alt+Shift+9, for example.
Can I do the same thing programatically?
(I want to achieve a toggle feature for certain windows - showing them on one key press and hiding them on the next. I also tried working with things like wmctrl -xR WINDOW_NAME, but in dwm the window in question is not being pulled as it would be expected according the wmctrl man page.)
I've just found a patch written by ericpruitt that allows to use wmctrl to send windows. The reason why it doesn't work by default is also explained:
Because of how dwm tags work, there is not a one-to-one mapping of tag numbers and desktop numbers. For example, if a window is on tags 1 and 3 (indexed from 1) in dwm, wmctrl will report the window as being on desktop 5: 2^(1 - 1) + 2^(3 - 1).

how to set -A flag in screenrc

The screen man says
‘-A’
Adapt the sizes of all windows to the size of the display. By
default, screen may try to restore its old window sizes when attaching
to resizable terminals (those with ‘WS’ in their descriptions, e.g.
suncmd or some varieties of xterm).
This works when you start off a screen with the -A flag. But, how do I set it in screenrc so that all my screen sessions get it by default?
fit
Change the window size to the size of the current region. This command is needed
because screen doesn't adapt the window size automatically if the window is dis-
played more than once.
Default key binding for fit is C-a F.

How to increase size of DOSBox window?

I am running Turbo C on DOSBox in Ubuntu 12.04.
The problem is that two black stripes are coming on either of screen. I want to remove them.
My computer is a Dell Studio 15z with screen resolution 1366x768. I don't have a problem even if distortion occurs.
Relevant part of my dosbox.conf file:
[sdl]
fullscreen=true
fulldouble=false
fullresolution=1366x768
windowresolution=1366x768
output=overlay
autolock=true
sensitivity=100
waitonerror=true
priority=higher,normal
mapperfile=mapper-0.74.map
usescancodes=true
go to dosbox installation directory (on my machine that is C:\Program Files (x86)\DOSBox-0.74 ) as you see the version number is part of the installation directory name.
run "DOSBox 0.74 Options.bat"
the script starts notepad with configuration file: here change
windowresolution=1600x800
output=ddraw
NOTE: Non-windows users will want to use output=opengl instead.
(the resolution can't be changed if output=surface - that's the default).
safe configuration file changes.
For using DOSBox with SDL, you will need to set or change the following:
[sdl]
windowresolution=1280x960
output=opengl
Here is three options to put those settings:
Edit user's default configuration, for example, using vi:
$ dosbox -printconf
/home/USERNAME/.dosbox/dosbox-0.74.conf
$ vi "$(dosbox -printconf)"
$ dosbox
For temporary resize, create a new configuration with the three lines above, say newsize.conf:
$ dosbox -conf newsize.conf
You can use -conf to load multiple configuration and/or with -userconf for default configuration, for example:
$ dosbox -userconf -conf newsize.conf
[snip]
---
CONFIG:Loading primary settings from config file /home/USERNAME/.dosbox/dosbox-0.74.conf
CONFIG:Loading additional settings from config file newsize.conf
[snip]
Create a dosbox.conf under current directory, DOSBox loads it as default.
DOSBox should start up and resize to 1280x960 in this case.
Note that you probably would not get any size you desired, for instance, I set 1280x720 and I got 1152x720.
Here's how to change the dosbox.conf file in Linux to increase the size of the window. I actually DID what follows, so I can say it works (in 32-bit PCLinuxOS fullmontyKDE, anyway). The question's answer is in the .conf file itself.
You find this file in Linux at /home/(username)/.dosbox . In Konqueror or Dolphin, you must first check 'Hidden files' or you won't see the folder. Open it with KWrite superuser or your fav editor.
Save the file with another name like 'dosbox-0.74original.conf' to preserve the original file in case you need to restore it.
Search on 'resolution' and carefully read what the conf file says about changing it. There are essentially two variables: resolution and output. You want to leave fullresolution alone for now. Your question was about WINDOW, not full. So look for windowresolution, see what the comments in conf file say you can do. The best suggestion is to use a bigger-window resolution like 900x800 (which is what I used on a 1366x768 screen), but NOT the actual resolution of your machine (which would make the window fullscreen, and you said you didn't want that). Be specific, replacing the 'windowresolution=original' with 'windowresolution=900x800' or other dimensions. On my screen, that doubled the window size just as it does with the max Font tab in Windows Properties (for the exe file; as you'll see below the ==== marks, 32-bit Windows doesn't need Dosbox).
Then, search on 'output', and as the instruction in the conf file warns, if and only if you have 'hardware scaling', change the default 'output=surface' to something else; he then lists the optional other settings. I changed it to 'output=overlay'. There's one other setting to test: aspect. Search the file for 'aspect', and change the 'false' to 'true' if you want an even bigger window. When I did this, the window took up over half of the screen. With 'false' left alone, I had a somewhat smaller window (I use widescreen monitors, whether laptop or desktop, maybe that's why).
So after you've made the changes, save the file with the original name of dosbox-0.74.conf . Then, type dosbox at the command line or create a Launcher (in KDE, this is a right click on the desktop) with the command dosbox. You still have to go through the mount command (i.e., mount c~ c:\123 if that's the location and file you'll execute). I'm sure there's a way to make a script, but haven't yet learned how to do that.
Looking again at your question, I think I see what's wrong with your conf file. You set:
fullresolution=1366x768
windowresolution=1366x768
That's why you're getting the letterboxing (black on either side). You've essentially told Dosbox that your screen is the same size as your window, but your screen is actually bigger, 1600x900 (or higher) per the Googled specs for that computer. So the 'difference' shows up in black. So you either should change fullresolution to your actual screen resolution, or revert to fullresolution=original default, and only specify the window resolution.
So now I wonder if you really want fullscreen, though your question asks about only a window. For you are getting a window, but you sized it short of your screen, hence the two black stripes (letterboxing). If you really want fullscreen, then you need to specify the actual resolution of your screen. 1366x768 is not big enough.
The next issue is, what's the resolution of the program itself? It won't go past its own resolution. So if the program/game is (natively) say 1280x720 (HD), then your window resolution setting shouldn't be bigger than that (remember, it's fixed not dynamic when you use AxB as windowresolution).
Example: DOS Lotus 123 will only extend eight columns and 20 rows. The bigger the Dosbox, the bigger the text, but not more columns and rows. So setting a higher windowresolution for that, only results in bigger text, not more columns and rows. After that you'll have letterboxing.
Hope this helps you better.