Skip to content

Instantly share code, notes, and snippets.

@scsmash3r
Last active November 2, 2024 03:39
Show Gist options
  • Save scsmash3r/47676dffcb29f5d47a92d0a0b735369b to your computer and use it in GitHub Desktop.
Save scsmash3r/47676dffcb29f5d47a92d0a0b735369b to your computer and use it in GitHub Desktop.
@socketsupply/socket tips&tricks

How to install from source in Windows environment?

git clone https://github.com/socketsupply/socket.git .
powershell ./bin/install.ps1 -verbose

How to hide window title bar?

Set a frameless option to true in [window] section in socket.ini config file:

; Determines if the window has a title bar and border.
; default value: false
frameless = true

How to make whole window draggable?

Same way you'd do that in Electron - via css properties:

body {
	-webkit-app-region: drag;
	--app-region: drag;
}

How to completely disable native right-click browser menu?

Fastest way is to add this piece of code as an attribute on your whole body. JS in-file implementation will have a slight delay, so potentially user can manage to catch that time and see the native menu. This is why it's better to put it inline in html part.

<body oncontextmenu="return false;">

How to use with Vite?

https://gist.github.com/mecachisenros/12e3240a5d66cffa54089066f9ffe8ff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment