This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GitHub source editing font size on my M1 MacBook Pro. | |
// @description For some reason the font size is a little too small _only_ when editing in the source view. | |
// @author Lucas Costi | |
// @namespace https://lucascosti.com | |
// @match https://github.com/*/*/edit/* | |
// @match https://github.com/*/*/new/* | |
// @match https://gist.github.com/*/*/edit | |
// @match https://gist.github.com/ | |
// @grant none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this in to your Atom's init.coffee file | |
# Generic function to wrap text in something (original from https://discuss.atom.io/t/wrap-selection-in-html-tag-command/22318/7) | |
# set multiLine to false to split selections into single line | |
# You can set a cursor position in `before` or `after` using `$1` | |
wrapSelections = (editor, before, after, multiLine = true) -> | |
editor.transact -> | |
editor.splitSelectionsIntoLines() unless multiLine | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Work Gmail multi-line email list | |
// @description Makes sure that the new (late 2018) Gmail interface always shows the three-line previews of email lists (mainly for split-pane mode). | |
// The new Gmail behaviour changes this to one-line when the list pane is wide enough (but not wide enough for my liking). | |
// @author Lucas Costi | |
// @namespace https://lucascosti.com | |
//// The scope below only matches the second Gmail account (which is always my work one). | |
// @match https://mail.google.com/mail/u/1/* | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import fileinput | |
file = "/usr/share/cinnamon/applets/window-list@cinnamon.org/applet.js" | |
#file = "applet.js" | |
searchExp = "alloc.natural_size = 150 * global.ui_scale;" | |
replaceExp = "//***Lucas**** Replaced: alloc.natural_size = 150 * global.ui_scale;\n alloc.natural_size = 400 * global.ui_scale;" | |
for line in fileinput.input(file, inplace=1): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Colour fix for home monitor. See: https://lucascosti.com/blog/2016/08/monitor-colour-problems-over-hdmi/ and http://losca.blogspot.com.au/2013/11/workaround-for-setting-full-rgb-when.html | |
# see if there is the LG monitor we are expecting | |
if edid-decode /sys/class/drm/card0-HDMI-A-1/edid | grep 'Manufacturer: GSM Model 5ab8 Serial Number 137681'; then | |
xrandr --output HDMI-1 --set "Broadcast RGB" "Full" && xrandr --output DP-1 --set "Broadcast RGB" "Full" | |
notify-send "LG home monitor detected: I have set RGB to Full" | |
fi |