Skip to content

Instantly share code, notes, and snippets.

@ueokande
Created March 13, 2016 09:12
Show Gist options
  • Save ueokande/f7ea00734520955c8a0b to your computer and use it in GitHub Desktop.
Save ueokande/f7ea00734520955c8a0b to your computer and use it in GitHub Desktop.
Gamma configuration by Dialog
#!/bin/bash
value=$(dialog --rangebox 'Gamma' 10 72 -10 10 0 2>&1 >/dev/tty)
[[ $? -ne 0 ]] && exit 1
gamma=$(python -c "print(10 ** ($value / 10))")
xgamma -gamma $gamma
xgamma 2>&1 | cut -f 10 -d' '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment