How to make slstatus fit in dwm - x-dwm

I am trying to setup slstatus in dwm but i cant get it to fit on the screen. I have tried editing the MAXLEN variable in the slstatus config file. I have looked in the dmenu and dwm config files but could not find any relevant variables.
Here is a image showing my problem (ram usage and time is going off screen)
I am running alpine linux VM in VMware with a 1920x1080 monitor.

Related

Libreoffice fails to display in openbox debian minimal desktop

When I launch libreoffice, either from the openbox applications menu or from the command line, it doesn't display. I only see the libreoffice picture with the loading bar, then it disappears, and that's it, no window at all is displayed. Only when I use the switch-beetween-window keybinding (Alt + Tab) can I see the thumbnails of libreoffice main and the tips windows along with my other open windows thumbnails in the windows-switch menu, but no windows on my desktop nor even any outline of them...
What's more, when I
ps -e | grep libreoffice
no process is returned.
Every other graphical application works well, only libreoffice has theis issue so far.
*I'm using
Debian 11 (5.10162-1) for x86_64
Kernel : 5.10.0-21-amd64
And a minimal desktop environment made of
Openbox 3.6.1 and Polybar 3.5.5*
I tried to run libreoffice in safe mode to override the .config file
libreoffice --safe-mode
Same result.
I tried to reinstall libreoffice, nothing changed.

How do I stop VSCode from starting up maximized?

On just one of my two Linux systems, Visual Studio Code always starts in a maximized window. It doesn't do it on the other one. Both systems are Pop!_OS 20.10, upgraded along the way from each Pop!_OS release from 18.04. VSCode is 1.51.1, and has been doing this since I started using it about 1.36 or so. I'm using the default Gnome Shell on each system. On the system where it doesn't start maximized, it remembers its previous size and placement. If I double-click on the window header on the failing system, it returns to its prior placement and size, but if I close it in that state, when I reopen it it's maximized again.
I'm guessing there's a settings file or something that's set to force it to be maximized, but I didn't explicitly set anything like that, and I wasn't able to find anything when searching that would have that effect.
The failing system is one I built up with a Ryzen 9 3900X, 64 GB RAM, 1 TB M.2 PCIe 4 SSD, and an RTX 2060. The working system is a System76 Oryx Pro v4 with 64 GB and an 8th gen Core i7. VSCode has done this on the failing system ever since I was running it on a dual-hex Mac Pro, and on a 1080p monitor; I'm now using a 3840x2160 monitor - but that's what the Oryx Pro has on it, too.
What am I missing?
Following works on ubuntu 20.10. Position VSCode window where you would like it to open next time. Then, hit <Ctrl><CloseXButton>
This will close your current session. Next time you open this project via code ., you should get VSCode to open in that last state you <Ctrl>-closed it in.
I don't know where this status is stored in the settings file.

Eclipse editor unable to display file contents

I've run into a very strange issue with my Eclipse installation. In fact, I've tried installing three different instances and the problem persists, so something must be seriously messed up with my machine.
The best way I can describe it is this. When I open a file in Eclipse (regardless of file type - I've tried .java, .js, .xml, etc.), the file appears to open and the filename is shown at the top of the editor panel as normal. But the file itself appears to be empty or blank.
Upon clicking in the editor window to attempt typing, it gets even more strange. The normal blinking black cursor is the full height of the window. Typing doesn't actually do anything. No text shows up, but it appears as if the file is being edited because the (*) symbol displays next to the filename as if it hasn't been saved since it was last changed.
I would provide a screenshot, but it's simply a blank window with a giant typing cursor. My current environment information is below, but like I said, I've had the issue with three different versions of Eclipse. Also, it's peculiar that this started happening seemingly randomly. Everything was fine but my machine was overdue for a restart. After restarting I opened up my workspace and this just sort of happened. I haven't been able to find any suggestions that aren't "reinstall" or "run Eclipse with the -clean tag" (neither of which worked).
Windows 7 Enterprise
Service Pack 1
Processor: Intel(R) Xeon(R) CPU E5-2695 v2 # 2.40GHz
RAM: 8GB
System type: 64-bit
Eclipse Mars 4.5.2

How can I disable GPU rendering in Visual Studio Code

I'm with bad rendering issues... Seems that the Visual Studio Code window do not clean a screen area before redraw it. The same thing happens here with chrome browser, but in chrome I can start it with " --disable-gpu-rendering " and it goes well.
How can I disable GPU rendering in Visual Studio Code ?
I'm thinking it's a hardware specific problem, and I'm looking for a other way to solve it too.
May be useful know my hardware:
Machine: Notebook dell vostro 3500 (intel chipset)
CPU: Intel i5
RAM: 8G
linux kernel: 4.0
video graphics: intel i915 (latest)
X -version: X.Org X Server 1.14.0
Note that VSCode 1.40 (Oct. 2019) proposes an alternative to the parameter/flag --disable-gpu:
Disable GPU acceleration
We have heard issue reports from users that seem related to how the GPU is used to render VS Code's UI.
These users have a much better experience when running VS Code with the additional --disable-gpu command-line argument.
Running with this argument will disable the GPU hardware acceleration and fall back to a software renderer.
To make life easier, you can add this flag as a setting so that it does not have to be passed on the command line each time.
To add this flag:
Open the Command Palette (Ctrl+Shift+P).
Run the Preferences: Configure Runtime Arguments command.
This command will open a argv.json file to configure runtime arguments.
You might see some default arguments there already.
Add
"disable-hardware-acceleration": true
Restart VS Code.
Note: Do not use this setting unless you are seeing issues!
Note that Gilbert points out in the comments to "How To Fix Screen Flickering Issue On Mac, MacBook, And iMac" from Preeti Seth.
Gilbert adds:
I fixed the problem by disabling automatic graphics switching on my macbook pro.
The setting is located in system preferences -> battery.
It worked!
Under Windows, I can confirm that launching VSCode with --disable-gpu does not create a GPU process:
C:\Users\alex\AppData\Local\Code\app-0.1.0>Code.exe --disable-gpu
Perhaps the same flag works on Linux too?
On Ubuntu, the file to edit is /usr/share/applications/code.desktop.
Change:
Exec=/usr/share/code/code --unity-launch %F
to:
Exec=/usr/share/code/code --disable-gpu --unity-launch %F
For Windows users
Visual studio code is based on chrome, to make it work you'll have to disable hardware acceleration.
Add --disable-gpu --disable-gpu-compositing to the vs code shortcut on your desktop.
Example:
"C:\Program Files (x86)\Microsoft VS Code\Code.exe" --disable-gpu --disable-gpu-compositing
Inside settings.json you can write this:-
"terminal.integrated.gpuAcceleration": "off"
on Mac running in virtualbox you can edit the file in ~/.vscode/argv.json
Add
"disable-hardware-acceleration": true
macOS users can try the following commands in the terminal :
Goto Applications folder :
cd Applications
Open VS Code with GPU Disabled :
Visual\ Studio\ Code.app/Contents/MacOS/Electron --disable-gpu
Note : You might need to supply sudo with second command.
On Linux Mint I had to right click the lower left mint button, then choose configure, then press the menu button. Then press the "Open Menu Editor" button and find Visual Studio Code in the programming group. Click properties and find the command field. There you can set the --disable-gpu option.
If environment variables are mapped correctly, you can simply use cmd.exe to start an instance of code with --disable-gpu . See the screenshot. enter image description here
Sometimes the problem is caused by automatic graphic switching as the computer tries to save energy.
In my case my macbook pro has battery problems so they manifested as the screen flickering whenever I ran an intensive application like vscode.
To disable automatic graphic switching, go to system preferences -> battery and untick Automatic graphic switching.
Refer to this guide: https://wethegeek.com/how-to-fix-screen-flickering-issue-on-mac-macbook-and-imac/

Accessing remote tags file with Emacs

I use Emacs (run natively in OSX) to edit files (mostly python code) on Ubuntu VMs. I run a VM locally, but also access code on EC2. I recently learned about exuberant-ctags and was able to successfully create a tags file on my local VM. The tags file is fairly large (30 MB). I'm accessing the tags file in Emacs using tramp via ssh. My first question is should I expect the access to take a long time? It takes Emacs a few minutes to load the tags file, even though its pulling the file off of a VM running on the same machine.
The second problem I have is that after the tags file is loaded, Emacs (again, running natively in OSX) thinks that the code base is on my local drive, not on the drive of the VM and so gives me a file not found error. So if function X is defined in file Y, how do I get Emacs to figure out that file Y is on the remote machine, not in my local path?
Thanks!