Skip to content

Instantly share code, notes, and snippets.

View florisvaneck's full-sized avatar
🚀
From zero-to-mastery!

Floris florisvaneck

🚀
From zero-to-mastery!
View GitHub Profile
@indivisible
indivisible / backbrightness.py
Created July 3, 2017 20:24
ACPI backlight to panel gamma converter for Alienware 13 R3 OLED
#!/usr/bin/env python3
# based on:
# https://gist.github.com/joel-wright/68fc3031cbb3f7cd25db1ed2fe656e60
import os
import time
from pathlib import Path
from functools import lru_cache
@stolinski
stolinski / keybindings.json
Created June 21, 2017 23:10
VSCode Tab Switching Keybindings
[
{ "key": "ctrl+1", "command": "workbench.action.focusFirstEditorGroup" },
{ "key": "ctrl+2", "command": "workbench.action.focusSecondEditorGroup" },
{ "key": "ctrl+3", "command": "workbench.action.focusThirdEditorGroup" },
{ "key": "cmd+1", "command": "workbench.action.openEditorAtIndex1" },
{ "key": "cmd+2", "command": "workbench.action.openEditorAtIndex2" },
{ "key": "cmd+3", "command": "workbench.action.openEditorAtIndex3" },
{ "key": "cmd+4", "command": "workbench.action.openEditorAtIndex4" },
{ "key": "cmd+5", "command": "workbench.action.openEditorAtIndex5" },
{ "key": "cmd+6", "command": "workbench.action.openEditorAtIndex6" },
@joel-wright
joel-wright / set-backlight.sh
Created January 9, 2017 23:27
AW13 OLED Set Brightness
#!/bin/bash
sleep 1
if [ -f ~/.brightness ]
then
read -r br < ~/.brightness
bri=`echo "${br} * 100" | bc -l | xargs printf "%.0f\n"`
echo $bri
if [ ${bri} -gt 100 ]
@joel-wright
joel-wright / monitor-backlight.sh
Created January 9, 2017 23:26
AW13 OLED Monitor Brightness
#!/bin/sh
path=/sys/class/backlight/intel_backlight
luminance() {
read -r level < "$path"/actual_brightness
factor=$((max / 100))
ret=`printf '%d\n' "$((level / factor))"`
if [ $ret -gt 100 ]; then
ret=100
fi