Skip to content

Instantly share code, notes, and snippets.

@rbreaves
rbreaves / code-server-mod.js
Last active November 8, 2025 03:22
code-server bookmarklet - enlarge Status bar area, remove titlebar
(() => {
const KEY = "__docShiftPlusFooter__";
const SHIFT_PX = 15;
const HEIGHT_ADD = 30;
const FONT_SCALE = 1.2;
const START_DELAY_MS = 5000;
const RESTORE_DELAY_MS = 2000;
// --- Undo / Restore ---
if (window[KEY]?.active) {
@rbreaves
rbreaves / userChrome.css
Created November 8, 2025 00:43
Firefox custom userChrome - fullscreen tabs only, hover over shows address bar, & bookmarks bar.
/* ────────────────────────────────────────────────
AUTOHIDE URL BAR + BOOKMARKS BAR (FULLSCREEN ONLY)
──────────────────────────────────────────────── */
/* Default fullscreen cleanup: hide everything but tabs */
:root[inFullscreen="true"] #navigator-toolbox > *:not(#TabsToolbar) {
max-height: 0 !important;
min-height: 0 !important;
opacity: 0 !important;
overflow: hidden !important;
@rbreaves
rbreaves / init.lua
Created November 8, 2025 00:42
Block macOS menubar while in fullscreen (hammerspoon)
----------------------------------------------------------------------
-- 🚫 Block macOS menubar reveal in fullscreen by redirecting mouse
----------------------------------------------------------------------
local BLOCK_HEIGHT = 5 -- pixels from top edge
local blockMenubar = true
local checkInterval = 0.02 -- seconds (~50 Hz)
local function blockMenu()
if not blockMenubar then return end
@rbreaves
rbreaves / chromerdp.js
Last active November 9, 2025 05:25
One-handed keyboard w/ touchpad for Chrome Remote Desktop on Mobile Devices
// use site to convert to bookmarklet for mobile devices
// https://infocatcher.github.io/Bookmarklets/scriptToBookmarklet.html
(() => {
// === LocalStorage helpers ===
const STORAGE_KEY = 'crd_layout_settings';
function loadSettings() {
try {
@rbreaves
rbreaves / move-all-to-main.applescript
Created October 28, 2025 16:15
Move all apps to primary desktop - macOS
tell application "System Events"
tell application processes
repeat with proc in it
try
repeat with w in windows of proc
set position of w to {0, 0}
end repeat
end try
end repeat
end tell
@rbreaves
rbreaves / displayplacer_local.sh
Created October 28, 2025 16:13
Reset macOS Desktop for local use
#!/bin/bash
# brew install displayplacer
# To generate the config below
# displayplacer list | awk '/^displayplacer /{p=1} p'
# How to run
# ~/displayplacer_local.sh
@rbreaves
rbreaves / displayplacer_remote.sh
Last active October 28, 2025 16:13
Reset macOS Desktop for Remote use
#!/bin/bash
# brew install displayplacer
# To generate the config below
# displayplacer list | awk '/^displayplacer /{p=1} p'
# How to run
# ~/displayplacer_remote.sh
@rbreaves
rbreaves / move_to_three_monitors.jxa
Created October 28, 2025 16:01
Reset Workflow for 3 monitors - macOS
// pre-reqs - homebrew, displayplacer
// brew install displayplacer
//
// How To Run
// osascript -l JavaScript ~/move_to_three_monitors.jxa
ObjC.import('stdlib')
const se = Application('System Events')
const app = Application.currentApplication()
@rbreaves
rbreaves / custom.js
Last active April 14, 2025 22:15
Tmux or i3 style Tile Zooming for Vivaldi Web Browser
// References
// https://forum.vivaldi.net/topic/10549/modding-vivaldi?page=1
// https://forum.vivaldi.net/topic/33122/custom-keyboard-shortcuts-mod
// vivaldi://experiments
// Enable "Allow for using CSS modifications".
// Restart vivaldi
// mod /Applications/Vivaldi.app/Contents/Frameworks/Vivaldi\ Framework.framework/Versions/[current version]/Resources/vivaldi/window.html
// insert inside body tag
@rbreaves
rbreaves / youtube_pwa.js
Created September 27, 2024 02:26
PWA Any Website with a bookmarklet on iOS/Android
javascript:(function() {
var manifestContent = {
"name": "YouTube PWA",
"short_name": "YouTube PWA",
"start_url": "/",
"display": "fullscreen",
"background_color": "#000000",
"theme_color": "#FF0000",
"orientation": "landscape-primary",
};