summaryrefslogtreecommitdiff
path: root/nixos/parts/scripts
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2024-12-15 12:06:40 +0100
committerMartin Fischer <martin@push-f.com>2024-12-15 12:06:40 +0100
commita827eee040ef62c3939c0b6952cd4ddd1a28702c (patch)
tree1b320f307a1a4e3db60da606af39569ea404be17 /nixos/parts/scripts
parentd02fbcab9fc1f279be6ad12def3294016df3c6c3 (diff)
refactor: define scripts in files
Diffstat (limited to 'nixos/parts/scripts')
-rw-r--r--nixos/parts/scripts/reset-bg2
-rw-r--r--nixos/parts/scripts/set-bg3
2 files changed, 5 insertions, 0 deletions
diff --git a/nixos/parts/scripts/reset-bg b/nixos/parts/scripts/reset-bg
new file mode 100644
index 0000000..5aa20f6
--- /dev/null
+++ b/nixos/parts/scripts/reset-bg
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+echo -en "\033]111\007"
diff --git a/nixos/parts/scripts/set-bg b/nixos/parts/scripts/set-bg
new file mode 100644
index 0000000..e78afdc
--- /dev/null
+++ b/nixos/parts/scripts/set-bg
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+rgb_with_slashes=$(echo "$1" | sed -r 's,(..)(..),\1/\2/,')
+echo -en "\033]11;rgb:$rgb_with_slashes\007"