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

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

Related

The window terminated unexpectedly [duplicate]

I am trying to open a folder that I opened before, but it crashed.
I can open other projects, and restarting the computer didn't help.
Maybe it's because I had a big file opened (400mb) in this folder, but I cant close this file because the vscode crashing every time when I tried open the workspace..
https://github.com/microsoft/vscode/issues/126127
https://github.com/microsoft/vscode/issues/130375
I had the same problem.
Just delete the folders under %appdata%/code/backups/ and restart VS.
I solved the problem by restarting my computer and then opening VS code from a different folder.
To open large JSON files, I use Dadroit JSON Viewer, thus preventing the problem from repeating itself.
Not worry much about that!, same issue occurred in my pc but there is easy steps to fix this error as following.
solution: Enable "paging files" option OR increase virtual memory.
steps:
1). Right click on "ThisPC" or "MyPC" and go to properties. then go to "Advanced System setting". [ you can also find that using SEARCH button ]
2). then click on settings of Performance block. its open another pop-up window in that ,go to the "advanced" option .
3). you can see the Virtual memory section ,in that click on change button.
4). now first disable the checkbox of "Automatically manage paging file size for all drive".
-> and select the "custom size:"
-> in Initial size(MB): { you need to add the same value as recommended, which is also displayed downside section }
-> in Maximum size(MB): you need to enter the value that you get multiply by 3 of your allocated RAM size.
for example:
your pc's ram is 4 gb then you can enter 4098*3= "12288mb".
then set it , click ok, ok, ok, and then just RESTART your pc. 🥹
hope god will help you.
It's easy than you think, you just need to update your laptop. and try to use Vs code again you will see that it works.

Ranger won't show image preview

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

ln[*] in Jupyter notebooks when using the %%bash magic

I'm working in Jupyter notebooks, when I use the %%bash magic I get the ln[*] (which means the kernel is busy) instead of the ln[number]. The kernel seems to stay busy until I restart it, and it always does this when using %%bash.
It was working fine until last week, when we were moved to Windows 10 pro with a new AVG antivirus - could this be it?
Any help would be great!
A possible cause is you use the %%bash magic command and not quit with "quit" command,for example the execution result will ask you to keyboard a "ipdb" message when you use "%debug" command ,if you skip this step and execute other cells ,you will get the "[*]" signal and it means those cells will not execute unless you restart the kernel,hope helpful.

Xdebug with PHPStorm 8 -- opens WRONG file at non-existing breakpoint

I am having trouble using Xdebug with PHPStorm. I have searched Google, etc.
I have Xdebug setup on a remote host with my local files mirroring the remote host. I am using the Xdebug Chrome extension.
When I run the debugging through PHPStorm, it OPENS a file and shows a blue-highlighted breakpoint that does NOT exist at that file. It will stay there until I hit "resume" multiple times until I get to the file I actually want to debug. VERY annoying because then the session on Chrome timesout, so I can't debug.
I do not see any code that says xdebug_break(); and I never added a breakpoint to that file. In other words, there are no red markings at the left of the line numbers.
What is going on and how do I fix this? Has anyone else come across this problem?
I have tried skipping and ignoring the file ... still does not work! Yes, I have also viewed breakpoints through a separate window and it does not show the breakpoint that apparently exists.
Check the configuration on PHPStorm stop at first line property and disable it
After that go to Run >> Break at first line in PHP scripts
Try turning it ON and OFF few times. Sometimes it is get stuck in between: showing OFF but in reality it is ON.
This is a well known issue Read: https://youtrack.jetbrains.com/issue/WI-17389
I was having the same problem with my PHPStorm/xdebug config. It turned out I had the path mappings wrong when I mapped the root of the local file directory to the Absolute path on the server - Settings->Languages and Frameworks -> PHP -> Servers.
I fixed the mapping and the system is behaving predictably once again.

Virtual Pascal v2.1 has a small display in Win7 [64bit] - can I make it bigger?

Is there some way [software or VM] that will let me run VP in a larger box - this is really frustrating me.
I thought, from the display, that VP21 was running in DOS, so I tried "DOSBOX", but when I tried to run the VP.exe file, it came back with:
"This program must be run under Win32", so it seems to be Windows with a weird display.
The simplest is to change the setting in VP: set Options->Environment->Screen Size to "Keep original". Then exit VP, size the window the way you want it, and run VP again.
From the command line, you can do it with the mode command:
mode 120,60
is nice and large.
It is very simple (or I missed something obvious): Make a shortcut for vp.exe and edit the proporties. You can change the layout/window size to any values that your monitor allows.
I don't think you can - the app itself preventing full screen mode. And you cannot use DOSBOX because VP21 is a true Win32bit app. You can download and install "real" TurboPascal - that one will run under DOSBOX and that you can expand full screen.

Resources