Visual Studio Code transparent window? - text-editor

A have a small resolution on my PC so it's not very convenient to work in several tabs at the same time like: open console window, browser, code editor and some other stuff.
Console has a very cool feature: a transparent background, so it's very very comfortabe to type something in console while looking to some learning material in browser through the trasparent background.
So I guessed if there any way to make VS Code transparent so i can write code and research in browser at the same time not Alt-Tabing any time I have to switch, so I dont have to interrupt my workflow such often.

Use VS Code extension
GlassIt-VSC
search in extension search bar
just install and enjoy
it works great !

Don't know about other OS but Windows can make any window transparent.
I've tried several 3rd party apps and stopped on AutoHotkey (free, Open-source, easy to learn, can be used for much more).
Install AutoHotkey
Create file transparency.ahk
Place inside this file:
^!RButton::
WinGet, currentTransparency, Transparent, A
if (currentTransparency = OFF)
{
WinSet, Transparent, 150, A
}
else
{
WinSet, Transparent, OFF, A
}
return
Run the script
This script will toggle active window transparency(0-255, 0 - transparent, 255 - opaque)
on Ctrl+Alt+Right mouse button
^ - Ctrl
! - Alt
RButton - Right mouse button
Add this script to startup folder (Win+R shell:common startup)
Based on: https://superuser.com/questions/272812/simple-transparency-toggle-with-autohotkey

As far as I know - this isn't possible in e.g. Visual Studio Express or VS Code.
It seems not to be on the feature request list at Microsoft.
One solution I see for you is Notepad++. Install the TopMost add-in. It works like you can see in following screenshot:

All the possible solutions are in:
"How to be cool and make Visual Studio Code (VSCode) transparent " from Emmanuel N Kyeyune
Mainly:
Windows 10
Install the GlassIt-VSC extension
In the VSCode settings (File > Preferences > Settings OR Ctrl + ,):
glassit.alpha (integer): Transparency level [1-255]
glassit.step (integer): Increment of alpha OR:
ctrl+alt+z to increase transparency and
ctrl+alt+c to decrease it as set by the extension
(take care it doesn't override some other shortcuts assigned these hotkeys)
Linux (tested on Ubuntu 18.04)
Based on devilspie
sudo apt-get install devilspie
with instruction like:
( if
( contains ( window_class ) "Code" )
( begin
( spawn_async (str "xprop -id " (window_xid) " -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY 0xdfffffff") )
)
)
PR 52707 "Windows, macOS and Linux transparency" from Charles Milette (sylveon).
The PR has been closed in August 2019:
We currently do not accept more features that are Electron specific. We have seen to many issues lately when updating to newer Electron versions and playing the catch-up game is very painful.
But said PR still includes a ton of options, like the Vibrancy extension.
Update Dec. 2021:
Chaim Eliyah mentions in the comments:
Vibrancy "works" for Mac OS X; it modifies the base CSS files so Microsoft will forever complain about your VSCode installation
(they tell you how to ignore the warning in the README)

If your in Linux(Debian), Install this: Glassit Linux
Don't remember Install requirements:
sudo apt install -y wmctrl x11-utils bash

Related

Can't use Color Picker Extension in VS Code. [processBridge]: Error: Cannot get NPM

Specs:
Windows 10 Home 21H2
CPU Intel i7-8700k
Motherboard ASUS Prime Z370-P II
Visual Studio Code v1.65.2
Node v16.14.2.
npm v8.5.0
The Problem:
When I run Pick Color ...
This happens
How I got here:
I installed node (and npm) as part of a course, from the official website, to use a TypeScript compiler.
In the process Chocolatey and something about Python was also installed. I think I remember seeing some errors in the script, but I'm very new to all of this. Despite that, both are in paths, as shown later.
Also had to use PowerShell and run
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
I checked the installation
Node version
Now this is what happens when I try to use the Color Picker extension. First, the installation guide says
this.
PATH is ok, as shown in the following pictures.
Node Version Manager? Don't remember using that.
Command Pallete, ext install, "Color Picker" not on the list.
Paths:
User Variables Path and
System Path
VS Code:
Trying ext install in the command pallete
I'm very sorry for this last screenshots in spanish.
Lastly I found this old issue on GitHub but I couldn't solve my problem with it:
(Gonna leave link in the comments as I can't go beyond 8 links in my post.)
Do you need this extension? Probably something buggy that will cause you problems with every upgrade. You already have a similar and cleaner solution as a VSCode default:
Just hover over a color and the little square icon next to it in a CSS or SASS/SCSS file, and you'll see the picker pop up. For changing from RGB(A) to HEX and other types, just click the header where you see rgba(84, ...) in the screenshot.

How to use awesome WM with LXSession (LXDE, Lubuntu)

I have Lubuntu. But when i tried to use clean Awesome WM, i thought that can i use awesome WM with GTK themes. I this possible?
I tried to run awesome, but got:
E: awesome: main:463: another window manager is already running
Also, clean Awesome WM works fine without Lubuntu. How to use awesome WM as a Window Manager in Lubuntu?
In some case, you can add --replace to replace the current window manager. LXDE defaults to OpenBox.
Some desktop environment also have settings to replace the window manager (in this case, by AwesomeWM). A quick googling seems to indicate some distribution store this setting in /etc/xdg/lxsession/LXDE/default.
However this is a bit of going in circle around the real issue here. Why run AwesomeWM in LXDE? Their feature set overlap at a rate of almost 100%. If you use lxde only for lxappearance (gtk theme mananger) and PCManFM, note that those 2 applications run just fine from the normal Awesome session. AwesomeWM itself provide the panel, wallpaper and window manager features, which leaves nothing from the original LXDE.

Pen Width font turning to White automatically (Jaspersoft Studio 6.4 Arch Linux Gnome)

Im having some glitching issues while using JasperSoft Studio. (using the latest version from the AUR).Im using GNOME.
Steps to reproduce :
Add Text Field. Select it.
Go to Properties -> Borders -> Click on a border on the square.
The Pen Width (1.0 by default) appears for an instant and then "disappears" (Its still there as I can select it but i think the font color becomes white)
This can be temprorarily resolved by going to preferences and toggling the theme from classic -> GTK or vice versa. The resolution exists only for the current report and does not remain for other opened reports. Really annoying bug.
Ive tried Adwaita and GTK other themes etc...but no use. The bug persists.
I have a version 6.1.1 of Jaspersoft Studio on another machine running the latest UBUNTU GNOME and it works near perfectly.I tried running this version of Jasper on arch using various settings but it stops working as soon as I open a JRXML file. Nothing is clickable and I have to kill the process. I am guessing its a GTK issue.
I dont want to go back to using Ubuntu as I love the Arch experience. Can someone help me to run the AUR version of Arch without this glitch.
And if you think 6.1.1 should run fine on Arch...can someone help me overcome the GTK issue (Ive already tried export SWT_GTK3=0; but it doesnt work)
Thanks.
Try editing the runjss.sh script (probably in /opt/jaspersoftstudio) and add the line
export SWT_GTK3=0
Then try running JSS via that script and see if it helps.
I haven't had the same issue as you but I've been having a lot of Gnome-related problems and I'm using the same combination as your - Arch (Manjaro) and Gnome with JasperSoft Studio 6.4.3. Works perfectly since I added that line.
You can also edit the .desktop file to exec runjss instead of the default exec line.

No title bar in qpdfview

I have qpdfview installed on linuxmint 18.The app doesn't show titlebar and is always in fullscreen(f11) mode.there is no max/minnimize or close buttons nor the taskbar.I am not able to have a floating window.
The reason this happened was once I pressed and holded the f11 button for a few seconds and then from then the titlebar was gone.
I uninstalled the software cleaned the directories then reinsatlled a few times but still the same result.
Image of the qpdfview
Then I observed this unusual output for wmctrl -l command
output
If this issue is related to qpdfview, try to check the local configuration file:
qpdfview uses a configuration file usually located at
"~/.config/qpdfview/qpdfview.conf",
which allows configuration of the toolbars and thumbnails.
look for something that uses fullscreen or no borders
If this is not working or its system wide, check the compositing options of your desktop environment
2.8. You can improve graphical performance of your Linux Mint Mate like this:
Menu button - Preferences - Windows
Deselect: Enable software compositing window manager

Making Mac shortcuts (e.g. Cmd-C) work on linux

Is there a way to map Cmd+C to Copy in linux? (instead of Ctrl+C)
Would be nice if I could also have the emacs style ones, like Ctrl+B to move left by one character.
Is there a way, on Linux/X, to map certain key combos to other key combos?
In the tradition of all open source projects, there's not a way, there are several. At the lowest level you've got kernel keybindings, which is probably not what you want. At the X server level you've got xkb with its myriad utilities. And then it seems that every window manager - gnome, kde, xfce or other - also has a keymapping utility. xkb seems to have lots of utils and such around it, and is likely more complete than any random window manager's keymapping utils, so I'd look at that first.
KDE 3 is probably the most flexible here; there's a pre-defined keyboard shortcut scheme named "Mac Scheme". You can set it through KControl Control Center > Regional & Accessibility > Keyboard Shortcuts or kcmshell keys and it will have effect on almost all KDE applications immediately. You might miss some of those Emacs-like "Ctrl-*" shortcuts that OS X has, but that aside, it works well (as long as your X modifiers are mapped correctly). And if it's not to your liking, it's easily customizable.
You can also set Control Center > Desktop > Behavior to enable a Mac OS-like menubar; all KDE applications will then share a menubar at the top of the screen instead of being individually attached to each window.
Update 02/03/2020
Kinto has now been rewritten in C for Ubuntu/Debian systems using x11. It also uses json config files, making it easier to manage and extend to other applications than just terminals. The app no longer maps to Super in the Terminal apps, it will now properly map to Ctrl+Shift to create the exact same feel as having a Cmd key.
Please checkout the latest release.
https://github.com/rbreaves/kinto
The main change to allow for the Super = Ctrl+Shift change is in this symbols file.
default partial xkb_symbols "mac_levelssym" {
key <LWIN> {
repeat= no,
type= "ONE_LEVEL",
symbols[Group1]= [ Hyper_L ],
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
};
key <RWIN> {
repeat= no,
type= "ONE_LEVEL",
symbols[Group1]= [ Hyper_R ],
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
};
};
Pjz's answer is correct in saying that an xkb solution would be ideal, sadly few have taken that route, most likely due to the difficulty of learning xkb and it seems many have gone the route of using Xmodmap files which is being deprecated while we are on our way to Wayland.
This answer may be several years too late, but here it is any ways.
Kinto is a tool I recently created that will address this problem and does so by using xkb and by listening to what app you are currently using, as it also changes the keymap while using terminals so the mac like experience can be consistent.
https://github.com/rbreaves/kinto
https://medium.com/#benreaves/kinto-a-mac-inspired-keyboard-mapping-for-linux-58f731817c0
Here's a Gist as well, if you just want to see what is at the heart of it all, it will not alternate your keymap when needed though. The Gist also does not include custom xkb keymap files that setup macOS style cursors/word-wise manipulations that use Cmd and the arrow keys.
https://gist.github.com/rbreaves/f4cf8a991eaeea893999964f5e83eebb
Edit: Posting the contents of the gist as well. I cannot realistically post the contents of Kinto.
# permanent apple keyboard keyswap
echo "options hid_apple swap_opt_cmd=1" | sudo tee -a /etc/modprobe.d/hid_apple.conf
update-initramfs -u -k all
# Temporary & instant apple keyboard keyswap
echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd
# Windows and Mac keyboards - GUI (Physical Alt is Ctrl, Physical Super is Alt, Physical Ctrl is Super)
setxkbmap -option;setxkbmap -option altwin:ctrl_alt_win
# Windows and Mac keyboards - Terminal Apps (Physical Alt is Super, Physical Super is Alt, Physical Ctrl is Ctrl)
setxkbmap -option;setxkbmap -option altwin:swap_alt_win
#
# If you want a systemd service and bash script to help toggle between
# GUI and Terminal applications then look at project Kinto.
# https://github.com/rbreaves/kinto
#
# Note: The above may not work for Chromebooks running Linux, please look
# at project Kinto for that.
#
# If anyone would like to contribute to the project then please do!
#
You'll get almost all of the way there if you switch Cmd and Ctrl
xmodmap -e "keycode 63 = Control_L"
That way Cmd will be Control. No other keys will be swapped
Edited: I forgot the "-e"

Resources