Skip to content

Instantly share code, notes, and snippets.

View jonathanbossenger's full-sized avatar
🏠
Working from home

Jonathan Bossenger jonathanbossenger

🏠
Working from home
View GitHub Profile
@andrewmackrodt
andrewmackrodt / hidpi-switch.ts
Last active April 7, 2022 04:07
Toggles fractional scaling between 100% and 125%
#!./node_modules/.bin/ts-node-dev
/**
* Based on https://askubuntu.com/a/1267328/170380
*/
import { exec } from 'child_process'
import dbus from 'dbus-next'
const sessionBus = dbus.sessionBus()
  • If you use Slack via Snap, uninstall it and use the DEB version
  • Edit /usr/share/applications/slack.desktop (likely with sudo)
  • Replace the Exec=/usr/bin/slack %U line with:
Exec=env SLACK_DEVELOPER_MENU=true /usr/bin/slack %U
  • Launch it using the launcher as usual and right click somewhere (e.g. top left) and "Inspect element"
  • Go to the "Console" tab