Skip to content

Instantly share code, notes, and snippets.

@MiguelERuiz
Created August 2, 2023 20:17
Show Gist options
  • Save MiguelERuiz/4e7185e74337691b721595c205501597 to your computer and use it in GitHub Desktop.
Save MiguelERuiz/4e7185e74337691b721595c205501597 to your computer and use it in GitHub Desktop.
Sepia mode in Ubuntu
#!/bin/bash
# Inspired by:
# https://opensource.com/article/20/4/linux-astronomy
# https://askubuntu.com/a/207435
# Prerequirements: You must install `xcalib` command by typing: sudo apt install xcalib
case $1 in
on)
# adjust color, gamma, brightness, contrast
xcalib -red 1.7 1 64 -green 1.7 1 57 -blue 1.7 1 28 -alter
exit 1
;;
off)
xcalib -clear
exit 1
;;
inv)
# Invert screen
xcalib -i -a
exit 1
;;
dim)
# Make the screen darker
xcalib -clear
xcalib -co 30 -alter
exit 1
;;
*)
echo "$0 [on | dim | inv | off]"
exit 1
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment