diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-10-04 15:34:32 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-10-04 15:34:32 -0400 |
commit | 303317564e27914e648b8e80355b0fafb3efff55 (patch) | |
tree | 3c1226d4d0532baa2ed057b2b80253b74b230875 /.local/bin | |
parent | b7abdd2208f41129365b586071747d10ec6992bb (diff) |
Commit laptop-related utilities
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/backlight | 6 | ||||
-rwxr-xr-x | .local/bin/c | 2 | ||||
-rwxr-xr-x | .local/bin/m | 7 |
3 files changed, 15 insertions, 0 deletions
diff --git a/.local/bin/backlight b/.local/bin/backlight new file mode 100755 index 0000000..0657030 --- /dev/null +++ b/.local/bin/backlight @@ -0,0 +1,6 @@ +#!/bin/bash + +backlight=intel_backlight +pct=$1 +read max < /sys/class/backlight/$backlight/max_brightness +bc <<<"scale=2; $max * ($pct/100)" | cut -d. -f1 > /sys/class/backlight/$backlight/brightness diff --git a/.local/bin/c b/.local/bin/c new file mode 100755 index 0000000..7342845 --- /dev/null +++ b/.local/bin/c @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +exec xdotool click "${1:-1}" diff --git a/.local/bin/m b/.local/bin/m new file mode 100755 index 0000000..9f4b4c6 --- /dev/null +++ b/.local/bin/m @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if [[ $# -gt 0 ]]; then + exec xdotool mousemove_relative -- "$@" +else + xdotool mousemove_relative -- 1 1 + xdotool mousemove_relative -- -1 -1 +fi |