summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorThomas Ulmer <thomasmulmer02@gmail.com>2026-02-04 14:24:16 -0800
committerThomas Ulmer <thomasmulmer02@gmail.com>2026-02-04 14:24:16 -0800
commit9139a1b136fa2b5adfcac0ac09a4f61aa1ee1ff4 (patch)
treede82bc4776b87f1fbb86f14b4a15d35d009ddd28 /scripts
parenta9bf8f30c746f5b28bb7eb6938e8390127081a32 (diff)
full reorg
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/brightness/brightnessdown3
-rwxr-xr-xscripts/brightness/brightnessmax4
-rwxr-xr-xscripts/brightness/brightnessup3
-rwxr-xr-xscripts/misc/lk.sh28
-rwxr-xr-xscripts/volume/volumedown3
-rwxr-xr-xscripts/volume/volumemute3
-rwxr-xr-xscripts/volume/volumeup3
7 files changed, 47 insertions, 0 deletions
diff --git a/scripts/brightness/brightnessdown b/scripts/brightness/brightnessdown
new file mode 100755
index 0000000..e48bd82
--- /dev/null
+++ b/scripts/brightness/brightnessdown
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo $((($(cat /sys/class/backlight/intel_backlight/brightness) -1) / 2)) | sudo tee /sys/class/backlight/intel_backlight/brightness
diff --git a/scripts/brightness/brightnessmax b/scripts/brightness/brightnessmax
new file mode 100755
index 0000000..d186f28
--- /dev/null
+++ b/scripts/brightness/brightnessmax
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+cat /sys/class/backlight/intel_backlight/max_brightness | sudo tee /sys/class/backlight/intel_backlight/brightness
+
diff --git a/scripts/brightness/brightnessup b/scripts/brightness/brightnessup
new file mode 100755
index 0000000..f1e3a40
--- /dev/null
+++ b/scripts/brightness/brightnessup
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo $((($(cat /sys/class/backlight/intel_backlight/brightness) * 2) + 1)) | sudo tee /sys/class/backlight/intel_backlight/brightness
diff --git a/scripts/misc/lk.sh b/scripts/misc/lk.sh
new file mode 100755
index 0000000..5f760c6
--- /dev/null
+++ b/scripts/misc/lk.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# This is helper that should replace a number of common commands
+#
+# It is intended to be named `lk`, short for "look"
+
+longView=${PAGER:-$(which less || which more || echo "cat")}
+dirView="ls --color=always -Alh"
+
+if [ $# -lt 1 ]; then
+ # take stdin instead
+ $dirView $(pwd) | ${longView}
+fi
+
+for a in $@; do
+ if [ $a == "" ]; then
+ echo "Empty argument skipped"
+ elif [ ! -e $a ]; then
+ echo "$a does not exist" 1>&2
+ exit -1
+ elif [ -d $a ]; then
+ $dirView $a
+ elif [ $(tput lines) -ge $(($(wc -l < $a) - 2)) ]; then
+ cat $a
+ else
+ ${longView} $a
+ fi
+done
diff --git a/scripts/volume/volumedown b/scripts/volume/volumedown
new file mode 100755
index 0000000..aacc4fd
--- /dev/null
+++ b/scripts/volume/volumedown
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exec amixer set Master 5%-
diff --git a/scripts/volume/volumemute b/scripts/volume/volumemute
new file mode 100755
index 0000000..ac0f0d0
--- /dev/null
+++ b/scripts/volume/volumemute
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exec amixer set Master toggle
diff --git a/scripts/volume/volumeup b/scripts/volume/volumeup
new file mode 100755
index 0000000..49d508e
--- /dev/null
+++ b/scripts/volume/volumeup
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exec amixer set Master 5%+ \ No newline at end of file