Skip to content

Instantly share code, notes, and snippets.

View noamnotyou's full-sized avatar

Noam noamnotyou

  • Israel
View GitHub Profile
@noamnotyou
noamnotyou / vivaldi-force-new-window.cmd
Last active November 20, 2022 06:20
Force Vivaldi browser to open URL links in new windows
@echo off
title New windows for external links, for Vivaldi browser - by noamnotyou
set workdir=%temp%\noamnotyou
set errmsg="Unknown"
set args=--
set nw=--new-window
set im=-incognito
echo.
@noamnotyou
noamnotyou / visualstudio--replace-high-contrast-theme.cmd
Last active January 26, 2024 18:13
Overrides Visual Studio's theme when in high contrast mode. This script will force Visual Studio to use the theme you select in the prompt quickly and easily instead of manually messing with RegEdit.
@echo off
prompt $G
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if %errorlevel% neq 0 (
set endmsg=This script can only work if ran as admin. Aborting...
goto end
)
echo Make sure Visual Studio is closed before you continue.
@noamnotyou
noamnotyou / Move mouse to same relative position in next or previous monitor DisplayFusion
Last active January 16, 2024 13:20
Custom function for DisplayFusion that will move your cursor to the same relative position in the next or previous monitor (e.g. center of monitor 1 to center of monitor 2). Works with any mix of monitors. Workaround for mouse cursor snagging on monitors with different resolutions or not moving to the right position.
using System;
using System.Drawing;
// Note: this won't work if "lock cursor to current monitor" is enabled, so if like me you don't like having the mouse go to next monitor when you're trying to
// click a corner or edge, you can align the monitors diagonally and only use hotkeys to move the mouse between monitors.
// Made by Noam Schvetz (noamnotyou)
public static class DisplayFusionFunction {